Methodology
Stack Signal applies results from rigorous quantitative research to support product development. The Pulling & Stacking Indicator is a product of that research: each element it draws, and each element we chose not to draw, is the outcome of a defined research process. A design question is stated as a hypothesis, a test is designed for it, the result is confirmed on data held out from the discovery work, and only then is a design decision made.
This page describes that process and the decision each study produced. It does not describe our research software, and it presents no trading results. Where a design element rests on a reasoned engineering judgement rather than on a statistical test, we say so.
This page describes research methods, not results. Research on historical data is hypothetical: it is prepared with the benefit of hindsight and carries none of the risk of real trading. The hypothetical performance disclosure at the end of this page applies to everything described here, and the full text of every disclosure is on the disclosures page.
Our research standards
Every study, whether it concerns a trading rule or an element of the indicator, is held to the same standards. They are listed here in the order in which a study meets them.
Event-level market replay
Our simulations replay the market one event at a time: every trade print in sequence, with the order book (ten price levels per side) and the top of the book exactly as they stood at that instant. A simulated order fills only against an executed trade price, never against a quoted level at which no trade occurred, which removes optimistic fill bias. For every simulated trade we record the maximum favourable excursion and the maximum adverse excursion: how far price moved in its favour, and against it, while it was open.
Trades are marked at the value they would have realized, not at their most favourable point. A price that was touched is not a move that was captured, and our studies show that peak marking can overstate a rule substantially. We therefore do not use it.
Point-in-time data
Every input uses only the information available at the moment of the decision. Daily inputs and regime labels are lagged to the prior session, the value a trader would have had at the open, and the same lag applies in training and in evaluation. This excludes look-ahead bias. Because look-ahead bias can enter a study through any data join, we audit every input for it rather than assume its absence.
Walk-forward out-of-sample evaluation
For each trading day, models are refit on a rolling 12-month window that ends at the prior session and are evaluated on that day only. The window then advances by one session and the process repeats. Every day is therefore scored by a model that has not seen it.
Calibration by full re-simulation
When a parameter changes (a threshold, a stop, a time limit), the full simulation is run again with the new value. We do not re-weight or filter a list of trades recorded in an earlier run. A recorded list reflects one set of parameters only: a different stop changes the trades that follow it, which the earlier list cannot represent. In our own comparison of the two approaches on the same question, they reached opposite conclusions, which is why re-simulation is our standard.
Significance testing
We use non-parametric tests, which do not assume that the data are normally distributed:
- Day-block permutation tests and day-block resampling. Whole days are shuffled or resampled together, because events within a day are not independent. We report the number of days a result rests on, not only the number of events.
- Sign tests across days, to establish whether an effect is consistent from day to day or concentrated in a few days.
- Kruskal-Wallis tests when comparing several groups.
- Spearman rank information coefficients (IC) between a reading and the outcome that followed it.
When several hypotheses are tested together, significance thresholds are corrected for the whole family (Holm's method), so that the number of tests run cannot manufacture a discovery. Every candidate filter is compared with null baselines of the same size: the same test on shuffled labels, and the same number of events drawn at random from the same days and times of day. A filter that does no better than a random selection of the same size is rejected. Results must also survive the removal of the most favourable days.
Separation of discovery and confirmation
A rule is identified on one sample and confirmed once on a separate sample it has not seen. Before the confirmation run, the hypotheses, the measure and the pass criteria are written down and committed, so that every confirmation is pre-registered. The held-out sample is used once, and a rule is never retuned on the data that confirms it.
- Discovery sampleLook for a rule, as freely as needed.
- Write it downHypotheses, measure and pass mark, committed before the held-out data is read.
- Held-out sampleTest the frozen rule once. No tuning on these days.
- Design decisionA confirmed result informs the design choice.
Regime identification and distribution modelling
Market behaviour depends on conditions, so our research includes a general regime identification step: each session, or segment of a session, is classified by the conditions in which it traded. Our toolset includes hidden Markov regime models and simpler rule-based groupings (trending up, trending down, choppy, quiet). Results are reported per regime and per year as well as pooled, because a result that holds in one kind of market and reverses in another is not a single result. Scheduled-event days and contract-roll weeks are reported separately, because they behave as a different market.
Regime models are prone to over-fitting. Our protocol therefore requires a regime model to produce a stable classification across repeated random seeds and on a held-out period before any result conditioned on it is used. Our studies use constrained groupings that meet that standard.
Beyond averages, we model the distribution of outcomes: gradient-boosted and deep order-book models, and quantile forecasts of the range ahead with conformal calibration, so that an interval specified to hold 90% of the time holds approximately 90% of the time out of sample. A consistent finding of that work is that the selection of inputs matters more than the choice of model architecture.
Engine certification and independent review
We maintain more than one simulation engine. A fast engine performs most of the work, and a slower engine that replays every event is the reference against which it is certified: both must produce the same trades on the same days before the fast engine's results are accepted. The indicator is held to the same standard. Each platform's implementation is checked against a reference implementation on the same recorded market events, number for number.
Results are also submitted to independent review: a reviewer with access to the data and the claim, but not to the authors' working notes, is tasked with refuting the result. Results that do not survive review are withdrawn.
The scale of the research
Few order-flow tools publish how they were researched. We publish ours because the scale and discipline of the work is the product's foundation. The figures below describe the size of the research and the systems that carry it out. They describe the work, not its results.
Our research dataset is a full-depth record of E-mini S&P 500 futures (ES). Every event is stored: each trade and each change to the order book, timestamped to the microsecond, with ten price levels on each side of the book. A five-year simulation, 2021 to 2025, replays about 11 billion events of 45 fields each, close to 500 billion data points. More than 500 million of those events are trades, the only prices at which a simulated order may fill.
From that record we derive 498 features, describing order flow, price movement and market context over windows from 2 minutes to 233 sessions, and 46 labels, recording what followed each event from 1 minute to 4 hours ahead.
The reference engine replays every event in sequence and simulates a year of the market in about 12 minutes. The fast engine, certified against it, simulates a year in about 50 seconds. That speed is what makes full re-simulation practical as a standard: every parameter change is evaluated by running the simulation again. Walk-forward evaluation refits the models for each trading day, about 250 times for each year evaluated.
| Measure | Figure |
|---|---|
| Market events, 2021 to 2025 | About 11 billion |
| Fields per event | 45 |
| Data points in a five-year simulation | Close to 500 billion |
| Trades among those events | More than 500 million |
| Derived features | 498 |
| Labels | 46, from 1 minute to 4 hours ahead |
| Research database on disk | About 2.5 terabytes |
| Reference engine | About 12 minutes per simulated year |
| Certified fast engine | About 50 seconds per simulated year |
| Walk-forward refits | About 250 per year evaluated |
| Full-depth order-book days, rebuilt from exchange messages | 92 |
Scale is not evidence on its own. Every study that draws on this data is held to the standards above: point-in-time inputs, walk-forward evaluation, held-out confirmation and independent review.
How the research defined the design
This section takes each element of the indicator in turn: the question asked, the study that answered it, and the resulting decision. Our order-book research was conducted on E-mini S&P 500 futures (ES), a highly liquid market. The indicator is designed to apply to any instrument with an order book, and its σ scale is what makes that possible, but we do not claim results for markets we have not studied.
The σ readout: a scale-free reading
Question: how can flow be read on a common scale across instruments, sessions and volatility conditions, when raw contract counts cannot be compared? Decision: the readout divides net flow by its own recent variability and shows how many standard deviations it sits from zero, over a lookback of 5× the flow window, with the band at ±3σ. This is the same normalization, net flow divided by its own band, on which our order-flow research is built.
Example: if Total Flow's standard deviation over the last 25 minutes is 1,500 contracts and the 5-minute flow is +6,300, the readout is +4.2σ. On a thinner instrument, the same +4.2σ may correspond to a few hundred contracts.
We also measured what the normalization removes. Dividing by recent variability removes the activity level by design: the σ reading measures how unusual flow is, while the size of the move that follows tracks raw flow size, band width, traded volume and recent range. In a held-out sample drawn in four equal groups (trending up, trending down, choppy, quiet), band crossings occurred about as often on quiet days as on active ones. The σ readout is therefore presented as a measure of how unusual flow is for the instrument at that moment, not as an indication of the size of any move that may follow, and the documentation states this.
The window ladder: 2, 3, 5 and 10 minutes
Question: should the indicator present one flow horizon or several? Our horizon analysis answered it in two ways:
- In our testing, an IC ladder that scored the same model separately at each horizon from 1 to 45 minutes found that information about the size of the next move peaked at around 3 minutes and decayed only gradually to 45 minutes. This result concerns move size, from a model with many inputs, rather than the indicator's lines in isolation.
- Across the trading mechanisms we studied, the distinguishing characteristic was timescale: whether flow persisted or arrived in a short burst.
Decision: the indicator presents four horizons at once, the 2, 3, 5 and 10-minute windows on which our research dataset is computed, so that every cell on the ladder corresponds to a series we have studied. The ladder makes the persistence distinction visible: a burst appears in the 2-minute cell and not in the 10-minute cell, and a sustained campaign appears in all four.
Support and resistance bands, and the warm-up
Each band is ±3σ of the core line over its lookback. It is plotted at zero until two windows of data have been seen, and it is drawn as provisional until its full lookback is seeded. This is an engineering decision grounded in sampling statistics rather than a backtest result: a standard deviation estimated from a few minutes of data is unstable, and a band built from it would be visually indistinguishable from a fully seeded one. The indicator therefore marks the difference explicitly.
We studied price behaviour around band crossings on 92 days of full-depth order-book history and on the indicator's own recorded market replays. A crossing marks flow at least three standard deviations from its norm: flow that is unusual for the instrument at that moment. Decision: the indicator presents crossings, arrows and alerts as context for the trader's own judgement.
Level depth, and levels entering the depth
The default Level Depth is 10 levels per side, and Count levels entering the depth defaults to Off. Both were evaluated in a study on full order-book history reconstructed from exchange messages. The discovery sample was the 20 widest-range days of a year. The confirmation sample was 72 held-out days selected in advance in four equal groups (trending up, trending down, choppy, quiet), with the hypotheses committed before that data was read.
- Depth: 10 levels is the depth of our underlying research. In the discovery sample, depths of 10, 20 and 30 levels were nearly indistinguishable around strong moves, so 10 was retained.
- Levels entering the depth: this rule had a far larger effect than depth. With the rule On, each tick of price travel credits a whole level to the side price is moving into, so the lines tend to read against a strong move in progress. With it Off, the hypothesis that the lines agree with a strong move already under way was confirmed on 57 of the 67 held-out days that contained one. The default was set to Off accordingly.
The confirmed result concerns agreement with a move that has already begun, which is how the lines are designed to be read: as a record of what the book and the tape are doing now.
The core line: Total, Passive or Placement
Total Flow is the default core line because it is the construction on which our order-flow research is built. In our research history Total Flow and Passive Flow behave as nearly the same series, and our audit established that the research series and the shipped Total Flow account for trades differently. Passive and Placement Flow are therefore offered as core lines as well, each labelled for what it measures.
Each core line has its own band, sized from its own variability. The measurement behind that decision: on the 92 full-depth days, Placement Flow moved about half as much as Total Flow. Measured against Total Flow's 3σ band, Placement would have required about 5.4σ to cross. It did so about twice a day, and on 24 of the 92 days not at all. Against its own band, a 3σ crossing is on the same scale whichever line is selected.
The deep-book warning
Hypothesis: disagreement between flow at the top of the book and flow across the deeper book carries information. The indicator computes the same flow twice, at the top of the book only and at the full Level Depth, and the warning appears when both are at least 1σ from their norm in opposite directions.
Our research studied this hypothesis at specific trade setups. Agreement or disagreement between the two depths was associated mainly with the size of adverse excursions (how far price moved against a position), much more than with the direction of the outcome.
Decision: the measure is presented as a caution indicator of adverse risk, rather than as an entry signal, and it is described in those terms.
Absorption and initiative
When Passive and Aggressive Flow lean in opposite directions, the console tile reads ABSORPTION; when they lean the same way, INITIATIVE. The label summarizes the relationship between the resting book and the tape at a glance.
The label also has a mechanical property that users should understand. Passive Flow already contains the executions (a trade removes resting size), so the two components lean in opposite directions only when placement opposes the tape by more than the tape's own size. Decision: the label is included to show what the book and the tape are doing, as context for the trader's own judgement.
Stale, waiting and warm-up states: the raw-stream principle
Design principle: the indicator reflects the raw feed from the trading platform. It does not filter, clean or smooth the data. Data hygiene is part of our research process (for example, simulated trades act only on executed prices), but a display of what the user's feed reports must not alter that feed.
Requirement: a loss of data must never be displayed as quiet flow. Our operational testing showed that an interrupted data stream and a quiet market are indistinguishable on a flow line. The indicator therefore states explicitly when it cannot see: STALE when no events have arrived for a defined period, WAITING FOR ORDER BOOK DATA when no book is available, and warm-up states while a band is being seeded. The same requirement governs the treatment of a newly delivered order book as a starting state rather than as stacking: some platforms deliver the initial book as hundreds of individual inserts, and counting them would display a burst of flow that did not occur. This case is covered by a regression test.
Buy and Sell lines: book-change and combined flow
Our research measures pulling and stacking in two ways, which we call book-change flow and combined flow. The indicator's menus use different names; this section sets out how they correspond.
- Book-change flow measures only what the order book did. At each price, it compares the resting size now with the resting size at that same price a moment earlier, and adds up the changes over the nearest levels, per side: stacking (orders added) counts as positive, pulling (orders cancelled) as negative. A trade also removes resting size, so executions appear in book-change flow too, as reductions on the side that was hit. In the indicator, book-change flow is Passive Flow.
- Combined flow combines the order book with the tape. It is book-change flow plus the size of each trade, credited to the side that initiated it: buyer-initiated volume is added to the buy side, seller-initiated volume to the sell side. In the indicator, combined flow is Total Flow.
Combined flow minus book-change flow is therefore the classic volume delta. In Flow mode, Total Flow is combined flow (buy side minus sell side), Passive Flow is book-change flow, and Aggressive Flow is the difference between them, so that Total = Passive + Aggressive exactly, on every event.
The Buy / Sell Lines setting determines what the two lines plot:
- With executions (the default) plots book-change flow per side. The Buy Line is the bid side's book-change flow and the Sell Line the ask side's, and the Delta Line (Buy minus Sell) is Passive Flow.
- Placement only is neither combined flow nor book-change flow. It starts from book-change flow and returns each trade to the side it consumed: sell volume is added back to the Buy Line, buy volume to the Sell Line. In these terms, the Buy Line is the bid side's book-change flow plus (sell-side combined flow minus sell-side book-change flow). What remains is orders placed and cancelled, and the Delta Line is Placement Flow.
- Combined flow is not offered as a pair of Buy and Sell lines. It is presented as Total Flow in Flow mode.
A worked example
Suppose 300 contracts rest on the bid at one price, a seller sells 100 into them, and no other order is added or cancelled. The bid now shows 200.
| Construction | Buy side | Sell side | Buy minus Sell |
|---|---|---|---|
| Book-change flow (With executions) | −100 | 0 | −100, Passive Flow |
| Combined flow | −100 | +100 | −200, Total Flow |
| Placement only | 0 | 0 | 0, Placement Flow |
The single trade moves Total Flow by twice its size: once as a reduction of the bid and once as aggression. Book-change flow counts it once. Placement does not count it, because no order was placed or cancelled. Aggressive Flow is the difference between the first two rows, −100.
Why both constructions are offered
Book-change flow measures what the resting book did, including size consumed by trades. Combined flow adds which side was aggressive, so it responds more strongly to a one-sided tape. The Buy and Sell lines use book-change flow per side on every platform, which is also the classic reading of earlier versions, and the Delta Line equals Passive Flow.
Our analysis of the decomposition showed that neither construction is free of executions: book-change flow contains the tape once, combined flow twice. Placement only was introduced as the execution-free pair for that reason. It has one known property to keep in mind: a trade against hidden or iceberg size is returned in full, although that size never appeared in the book.
In our research history, combined flow and book-change flow behaved almost as the same series, each measuring a different aspect of the same activity. The indicator therefore presents both, each labelled for what it measures.
Scope and limitations
- No reading of the indicator is presented as a forecast of the direction or size of the next move. Every line, band and arrow is presented as context for the trader's own judgement.
- Results do not transfer unchanged from our research data to the shipped indicator. The two differ in data feed, in event granularity and, for Total Flow, in how trades are counted. Platform feeds also differ: for the same exchange minutes, two platforms' feeds reported materially different traded volume.
- The defaults are a starting point. Our order-book research was conducted on a highly liquid market, and the settings allow depth and bands to be adjusted for other instruments.
Questions about our methods are welcome at contact@stacksignal.com.
Hypothetical performance disclosure. Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown; in fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk of actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all which can adversely affect trading results. The full text of every disclosure is on the disclosures page.