一个最简单的算法交易例子# Stock
b*e
1 楼
短线交易中,买卖股票,期权,期货的时候,总是有bid和ask两个价格,我们买入的时
候希望尽量靠近bid,卖出的时候希望尽量靠近ask。然而,market order的执行正好相
反,买入执行在ask,卖出执行在bid;而手工limit order又跟不上迅速变化的价格,
特别是本金在百万级别以上。这个时候,由计算机执行的算法交易就展现出快速准确的
威力了。
未完待续,有兴趣的请回复,然后继续展示算法,当然这么简单的算法很多人拍脑袋就
想出来了。抛砖引玉,希望从这个例子来有深度地讨论算法交易能做什么,不能做什么。
for example, buy 100 contracts of AAPL [email protected] expiring on Nov 15, 2013
below the price $5.90 within 10 seconds (it simply stops after 10 seconds
even if the order is not fully executed).
The last bid price of [email protected] is 5.60, the last ask price is 5.85. The gap
is 0.25, or around 4% of the ask price. Obviously a large number of
accumulated percentage of 4% means big. If your trading volume is $10m every
year, it means 400k USD! That's the cost of market order type.
Well, you can use limit order type. After you input the target price and
number of contracts, saying 5 seconds later, the bid price moves to 5.80 and
the ask price is 6.05 now. This is the cost of limit order type.
候希望尽量靠近bid,卖出的时候希望尽量靠近ask。然而,market order的执行正好相
反,买入执行在ask,卖出执行在bid;而手工limit order又跟不上迅速变化的价格,
特别是本金在百万级别以上。这个时候,由计算机执行的算法交易就展现出快速准确的
威力了。
未完待续,有兴趣的请回复,然后继续展示算法,当然这么简单的算法很多人拍脑袋就
想出来了。抛砖引玉,希望从这个例子来有深度地讨论算法交易能做什么,不能做什么。
for example, buy 100 contracts of AAPL [email protected] expiring on Nov 15, 2013
below the price $5.90 within 10 seconds (it simply stops after 10 seconds
even if the order is not fully executed).
The last bid price of [email protected] is 5.60, the last ask price is 5.85. The gap
is 0.25, or around 4% of the ask price. Obviously a large number of
accumulated percentage of 4% means big. If your trading volume is $10m every
year, it means 400k USD! That's the cost of market order type.
Well, you can use limit order type. After you input the target price and
number of contracts, saying 5 seconds later, the bid price moves to 5.80 and
the ask price is 6.05 now. This is the cost of limit order type.