Studies
How this study is computed
Cont, Kukanov & Stoikov (2014). For every trade the top of book is compared with the previous one: bid size that appeared or improved counts positive, ask size that appeared or improved counts negative, and size that vanished counts the other way. Summed per bar this is OFI, in contracts. The data is Databento TBBO, so the book is observed at each trade only; quote changes between trades collapse into one event.
The model is Δmid = β·OFI + ε. β is a regression through the origin over the previous β-window bars (never the current bar). ε, the move flow does not explain, is summed over the deviation window; that sum is the deviation and equilibrium = mid − deviation. z divides the deviation by its expected spread. Red: price ran ahead of flow (above equilibrium). Green: price fell further than flow justifies (below equilibrium).
Every window ends at the current bar or earlier, so a bar never changes when newer data arrives; scrolling back loads older chunks that line up exactly. “Continuous” uses, for each trading date, the outright contract with the most trades on the previous trading date, so the choice is known at the open; rolls are marked and prices are not back-adjusted. Windows restart on a new contract.