Notiz: Algorithm and High Frequency Trading: Chapter I
Understanding Bid and Ask
基本概念
Bid: if you want to buy stocks, you need to bid a high price such that others are willing to sell the stocks to you. The higher the better.
Ask: I want to sell stockes, I will ask for a lowest price to attrack the buyers. So the best Ask is the lower the better.
The Ask price is higher than the bid price, because market maker can buy stocks from person that selling at a higher price and then sell the stocks with a lower price to person who will to buy. This price difference is called spread. If the price are the same, no one willing to do this stock exchange because the market maker is not going to earn anything.
帮助记忆phrase
“The best sell price the ask; The best buy price, the bid”
“Ask price is higher than the bid price”
“BHAL”-Bid High; Ask Low will be executed first.
Limit Order Book
Electric Exchange basic: LOB + matching algorithm.
LO will be added to the LOB according to the price and time priority.
Execution of the Market Order (MO)
Assume sell order comes in:
- Check the best bid over all venues in all exchanges.
- Execute the order according to the volumn of the best bid.
- If there are volumn left, find the next best bid among all venue in all exchanges. –> (order protection rules to ensure MOs get the best possible execution.)
Sell MO will consume the buy LO to lower the depth of the buy LO aka hit the bid.
Buy MO will consume the sell LO to reduce the depth of the sell LO aka lift the offer, lift the price.
Tick Size in LOB
- US: for stock price > $1, tick is $0.01
- EU: different exchange might have different ticks: € 0.001 to €0.05
Price of the Asset
Midprice is used to proxy for the true underlying price of the asset.
Microprice as a more subtle proxy for the asset’s transaction cost-free price.
Microprice
t
=
V
t
b
V
t
b
+
V
t
a
P
t
a
+
V
t
a
V
t
b
+
V
t
a
P
t
b
.
\text{Microprice}_t = \frac{V_t^b}{V_t^b+V_t^a}P_t^a + \frac{V_t^a}{V_t^b+V_t^a}P_t^b\,.
Micropricet=Vtb+VtaVtbPta+Vtb+VtaVtaPtb.