这是用户在 2024-9-30 18:33 为 https://zhuanlan.zhihu.com/p/665737407 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

高频交易漫谈101-004 一个简单信号

萝太 等 167 人赞同了该文章
发布于 2023-11-08 16:27・IP 属地浙江 ,编辑于 2023-11-08 16:28・IP 属地浙江

Headlands 的 Max Dama举了一个简单例子:
the order book could look like this:
Sell 10 for $99.25

Sell 5 for $99.00 (best offer)

Buy 10 for $98.75 (best bid)

Buy 10 for $98.50

This is the main view of the market data input used by the strategy algorithm.

Strategy algorithm

To put into practice what we discussed above, let’s outline a market taking strategy utilizing what is often referred to as market micro-structure signals that may have made money back before quantitative trading became very competitive. Some companies have each member of their intern classes program a strategy like this as a teaching project during a summer. This strategy calculates some signals using the order book as input, and buys or sells when the aggregate signals are strong enough.

Market microstructure signals

A signal is an algorithm that takes market data as the input and outputs a theoretical price for a security. Market micro-structure signals generally rely on price, size, and trade data coming directly from data feeds. Please reference the order book state provided previously as we walk through the following signal examples.

  • A basic signal, likely used in some form by most firms, is ‘book pressure’. In this case book pressure is simply (99.00*10 + 98.75*5)/(10+5) = 98.9167. Because there is more demand on the bid, the theoretical price is closer to the offer than the bid. Another way of understanding why this is a valid predictor it is that if buy and sell trades randomly arrive in the market on the bid and offer, then there’s a 2/3 chance of them filling the entire offer before the entire bid, because it’s 2 times bigger, so the expected future price is slightly closer to the offer than the bid.
  • A second basic signal that many quantitative trading firms use is ‘trade impulse’. A common form is to plug trade quantity into something like the book pressure formula, but with the average bid and offer quantity in the denominator instead of the current quantity (let’s say the average is 15). So if there is a sell trade for 9 on this book, the trade impulse would be -0.25*9/15 = -0.15. This example signal would only be valid for the span of 1 packet. Another way of understanding why this is a valid predictor is that sometimes buy and sell trade quantity is autocorrelated over very short intervals, because there are often multiple orders in flight sent in reaction to the same trigger by different people (this is easily measured), so if you see one sell trade, then typically the next order will also be a sell.
  • A third common basic signal is ‘related trade’. Basically, you could just take the same signal as (2), but translate it over from a different security that is highly correlated, by multiplying it by the correlation between them.

The book pressure and trade impulse signal are enough to create a market taking strategy. After the sell trade for 9, the remaining quantity on the book is:

Sell 10 for $99.25

Sell 5 for $99.00 (best offer)

Buy (10-9 = 1) for $98.75 (best bid)

Buy 10 for $98.50

But our theoretical price is = book pressure + trade impulse = (99.00*1 + 98.75*5)/(1+5) + -0.25*9/15 = 98.79167 – 0.15 = $98.64167! Since our theoretical price is below the best bid, we will send an order to sell the last remaining quantity of 1 at $98.75, for a theoretical profit of $0.10833.

That is a high-level overview of a simple quantitative strategy, and provides a basic understanding of the flow from the input (market data) to the output (orders).

这个小信号覆盖了订单薄不平衡和交易冲击,是一个很好的说明如何从微观结构中告诉模型故事的例子。这个例子里,信号的权重是被实证检验定义了,好处是鲁棒,减少过拟合。坏处是不能抓住市场的regime shift,更好的处理是分开成多个信号,并且加入条件因子,就是这是什么情况下发生的,大涨后?横盘时?什么交易时间?大单小单?上一个行情是怎么样的?为什么没有扫完?等等可能有数十种条件,如何在模型中使用条件因子是极端重要的,这个也是无数先辈的心血结晶啊。

很喜欢这个小例子,希望大家也喜欢

发布于 2023-11-08 16:27・IP 属地浙江 ,编辑于 2023-11-08 16:28・IP 属地浙江
理性发言,友善互动

15 条评论
默认
最新
aryastark

一个spoofing就把这策略干趴下了 [大笑]

05-31 · 广东
okwh

造市商的生存策略是什么?

09-12 · 吉林
古力拉多
没看
08-05 · 广东
古力拉多
根据理论价格和实际价格的差确定方向,这样理解对不对
08-05 · 广东
看看

这一段来自哪篇文章?

06-04 · 上海
艾艾puppy
我关注的人
立刻测下[赞同]
01-15 · 上海
smqd

效果咋样

03-19 · 上海
liuxr
高频飘过[捂脸]
2023-12-04 · 加拿大
Top量化猎头Junco

飘过~

2023-11-09 · 广东
smqd

请问为什么trade impulse计算前面要乘0.25?谢谢!

2023-11-09 · 上海
张无忌
tick size就是0.25
2023-11-09 · 上海
村里

感谢哈哈哈

05-29 · 美国
洪十七

讲的很清楚,感谢

2023-11-09 · 上海
点击查看全部评论
想来知乎工作?请发送邮件到 jobs@zhihu.com