A rising price does not tell you whether aggressive buying, disappearing offers, or thin depth did the work. Order-flow imbalance (OFI) is a market-microstructure method for measuring the net change in supply and demand at the best bid and ask; it is informative about short-horizon price impact, not a stand-alone forecast.
The signal is in quote events, not just trades
OFI tracks changes at the top of the limit order book. A buy order, a new bid, a cancelled ask, or the reverse can alter the visible balance even when no trade prints. In their study of NYSE data, Cont, Kukanov and Stoikov define OFI from supply and demand at the best bid and ask and report a short-interval relationship between OFI and price changes. Takahashi’s later study applies the model to Amazon order-book data and also examines imbalances between buy and sell orders (Cont et al.; Takahashi).
That distinction matters. Trade volume records executed activity. OFI also reflects limit orders entering or leaving the queue. It is therefore a measure built from order-book events, not a synonym for volume, cumulative volume delta, or a chart pattern.
From book changes to a testable variable
At a high level, classify each event by whether it adds or removes displayed demand at the best bid, or displayed supply at the best ask. Give demand-side changes a positive sign and supply-side changes a negative sign, then aggregate them over a fixed interval. The resulting series is the imbalance. A practical implementation must specify how it treats quote-price changes, queue-size changes, simultaneous updates, crossed or locked quotes, and missing data.
Cont and co-authors report that short-interval price changes in their sample were linearly related to OFI, with estimated impact inversely related to market depth. Takahashi’s Amazon study does not simply reproduce that shape: its abstract reports a nonlinear or concave relation, while describing a broadly similar intraday pattern in estimated impact (Cont et al.; Takahashi). The studies support taking depth and instrument context seriously; they do not establish one universal coefficient or a ready-made entry rule.
A compact research question is: Does a pre-defined OFI measure explain or forecast the next interval’s mid-price change after accounting for depth and trading costs? Keep “explain” and “forecast” separate. A relationship measured over the same interval is not automatically a signal available before the move.
Where the method can mislead
The evidence here concerns equity limit-order books, including NYSE stocks and Amazon. It does not establish that a broker’s OTC forex feed, a CFD quote stream, or a crypto venue will behave the same way. Feeds can differ in event coverage, aggregation and timestamp quality. A displayed queue is also not a promise that size will remain available until an order reaches it.
The reported results are not identical: one study describes a linear impact relation; the Amazon application reports a concave one. That is useful disagreement, not a reason to cherry-pick a formula. OFI can also be associated with price movement because both respond to the same information or liquidity shock. Association alone does not prove that imbalance caused the move or can be captured after spread, fees and slippage.
How you'd actually test it
Write the measurement rules before looking at performance. Use event data with reliable sequence and timestamps; construct OFI only from information available at the decision time. Compare a baseline that uses the previous mid-price or depth with a model that adds OFI. Evaluate both explanatory fit and genuinely forward predictions on later, untouched periods.
Then repeat across instruments, market conditions and sampling choices without selecting only the best result. Include spread, fees, latency and realistic fills; test whether the apparent effect survives after costs. Keep a record of every variant tried. The cTrader backtest verification checklist explains why data, costs and reproducibility need their own checks.
A useful result may be that OFI adds no robust information outside the original sample. That is still an answer. The test is not whether a chart can be made to look convincing; it is whether a predeclared measure survives a fair comparison with the baseline.
The takeaway
Order-flow imbalance turns changes in the best quotes into a measurable pressure variable. The research shows price impact can relate to that variable, while also showing that the form of the relationship can vary. Treat OFI as a hypothesis about a particular feed and horizon—not as a universal signal.