So far: A market maker quotes both sides and earns the gap between them, and the gap has to widen when more of the people trading know where the price is going (lesson 2).
Every trade has a buyer and a seller. Each sack bought is a sack sold, so a market can never have more buying than selling, counted in trades. Yet prices do rise when people are keen to buy. To see how, you have to ask of each trade which of the two chose to trade right then.
Who crossed
Go back to the board lesson 1 left behind, with the best bid at 51 and the best ask at 53. A maker pinned a note and waited. A taker arrived, read the board and took that note at its price. The trade needed both of them, but only the taker decided it should happen now, and crossed the spread to make it happen.
Exchanges record this. Next to each trade's time, price and size, the tape says which side the taker was on. In a taker buy, the buyer crossed and took a note at the best ask; in a taker sell, the seller crossed and took one at the best bid. Add them up over a minute and you get taker buy volume and taker sell volume. Buys minus sells is the volume delta.
Below, forty takers arrive at that board, each wanting one sack straight away, while makers keep two sacks waiting at every price. You choose how many of the takers are buying and how many selling, and watch the price.
Set how many takers in every ten are buying, then send them in. Watch the price follow the gap between buys and sells.
No takers yet. 40 takers will each buy or sell one sack straight away, 5 in every ten of them buying.
Forty sacks change hands whatever you choose, so the volume is the same every time. With five buyers in every ten, takers bought 20 and sold 20, and the price ended at 52, where it started. With seven in ten, they bought 28 and sold 12, a volume delta of +16, and the price ended 10 higher, at 62.
Each taker buy removes a sack from the ask side. When buys outrun sells, the asks run out faster than makers replace them, and the best ask has to move up, taking the price with it. The volume says how much traded. The delta says which way the people in a hurry were leaning, and the price follows the lean.
A crowd or one big player
The same delta can come from very different people. Twenty-six sellers might each sell one sack, a few at a time, with buyers cutting in between them. Or one seller might want 12 sacks gone at once.
An order to sell 12 sacks takes the first note at the best bid, then the next, and keeps going down the board until it has all of them. The exchange prints one trade for every note it fills, so the tape shows 12 trades of one sack, all sells, all at the same moment, between the buys of everyone else.
Switch between a crowd of sellers and one big seller. Both sell the same amount, so look at the runs on the tape.
- Volume delta
- −12
- Longest buy run
- 2
- Longest sell run
- 4
- Run imbalance
- −0.33
Most of the crowd sold, but buyers kept cutting in, so no run of sells lasted more than 4 trades.
Both tapes hold 14 taker buys and 26 taker sells, a volume delta of −12, and both leave the price at 45. Counted trade by trade, the sizes match too: every trade is one sack, because each fill is the size of the note it took. What gives the big seller away is the order of the trades.
A run is a streak of trades in a row whose takers were on the same side. In the crowd, the longest run of sells was 4 trades. The big seller's order printed 12 in a row. The trade run imbalance puts the longest run on each side against each other: the longest buy run minus the longest sell run, divided by the two added together. It goes from −1, when only sellers ever kept at it, to 1. The crowd's tape scores −0.33, the big seller's −0.71.
The maths
With Lbuy the longest run of taker buys in a bar and Lsell the longest run of taker sells:
run imbalance = (L_buy − L_sell) / (L_buy + L_sell)
The crowd: (2 − 4) / (2 + 4) = −0.33. The big seller: (2 − 12) / (2 + 12) = −0.71.
Flow that hurts
Lesson 2's stall lost money to customers who knew where the price was going. Those customers trade in a recognisable way: they all want the same side, and they come just before the price moves. So flow that piles up on one side while the price jumps around suggests that the people taking a market maker's notes know something. Market makers call such flow toxic, the word David Easley, Marcos López de Prado and Maureen O'Hara used for it in 2012.
The flow toxicity score puts a number on it, a minute at a time. It takes two counts for the minute: the volume delta, and how much the price moved around inside the minute. It measures each against every minute of the day so far as a z-score, where 0 is an ordinary minute and 2 or −2 is far from ordinary. Then it multiplies the two.
Pick one of four minutes below and see where it lands on each count, against a toy morning of 30 ordinary ones.
Try all four minutes. The score only grows when the orange square is far from the grey ones on both lines.
How one-sided: taker buys minus taker sells, in sacks
z = −0.1: right by the average
How busy: how far the price moved around, in coins
z = 0.0: right by the average
- Volume delta
- 0 sacks
- Price moved around
- 3 coins
- The score points to
- Neither side
Takers bought as much as they sold, and the price moved around the usual amount, so the score is 0.
Take a minute when takers sold 12 sacks more than they bought: far from usual, a z-score of −2.8. If its price moved around an ordinary 3 coins, a z-score of 0.0, the score comes to 0. If its price moved around 6 coins, a z-score of 2.5, the score drops to −7. A large score needs both: flow leaning hard to one side, in a minute when the price is busier than usual. Then the sign says who was pushing, below zero for sellers and above zero for buyers.
The maths
For each minute, with d its taker buys minus taker sells and r each trade-to-trade return inside it:
busyness v = √(Σ r²)
z(x) = (x − mean) / standard deviation, over the day's minutes so far, this one included
flow toxicity score = z(d) × z(v)
In real data
What you learned
- Taker buy, taker sell
- A trade where the buyer crossed the spread and took an ask, or where the seller crossed it and took a bid.
- Volume delta
- Taker buys minus taker sells. The price follows the delta, not the volume.
- Run
- A streak of trades in a row whose takers were all on the same side.
- Trade run imbalance
- The longest buy run against the longest sell run, from −1 to 1. One large order shows up as one long run.
- Flow toxicity score
- A minute's volume delta and how much its price moved around, each against the day so far, multiplied. Large when the flow leans hard while the price is busy.
Check yourself
1. In one minute, takers bought 30 bitcoin and sold 50. What was the volume delta?
2. One order sells 12 sacks against a board with one sack on each note. How many trades does the tape show?
3. Which minute gets the most negative flow toxicity score?