Stationary Block Bootstrap

Why the Robustness tab uses Politis-Romano stationary block bootstrap by default, how random-length blocks preserve trade-streak structure, and the automatic block-length rule that picks the right value from your data.

Updated 2026-06-03
11 min read
advanced

TL;DR. Stationary block bootstrap resamples your trades in randomly-sized blocks instead of one at a time. This preserves the streakiness — clusters of wins, clusters of losses — that real trading produces and standard iid bootstrap erases. The block length is selected automatically per backtest via the Politis-White rule.

What you'll be able to do

  • Explain why iid bootstrap underestimates tail risk for streaky strategies.
  • Read the auto-detected block length on the Path Luck sub-tab and know what it implies about your strategy's autocorrelation.
  • Decide when block bootstrap is the right tool and when calendar-aware methods are needed instead.

Why blocks, not trades

Take a trend-following strategy. When the market is in a sustained uptrend, the strategy wins many consecutive trades. When the trend ends, it loses many consecutive trades. The winning streaks and losing streaks aren't independent — they're driven by an underlying regime structure that the strategy is implicitly riding.

Resample those trades one at a time with iid bootstrap, and the resampled equity curves will look much smoother than reality. The streaks dissolve. A 12-trade losing run in the original becomes a few scattered losses interleaved with random wins in the resamples. The strategy looks calmer than it is.

Block bootstrap fixes this by resampling in blocks. Take 8 consecutive trades together. They're still 8 trades, but they're 8 trades that include whatever streak structure was present in the original. Glue blocks together to fill a resampled path of the original length. The streaks live; the resampled distribution looks like the actual data.

Placeholder · Diagram

iid vs. block bootstrap — what happens to streaks

Author hint: Two side-by-side diagrams. Left: 'iid bootstrap' — original trade sequence shown with streaks colored (red losing run, green winning run), then resampled below with all trades shuffled and the colored streaks broken up into random scattered colors. Right: 'block bootstrap' — same original trade sequence, then resampled with the colored streaks staying largely intact in blocks. Save to /public/images/guide/robustness/stationary-block-bootstrap/diagram.svg.

Why random-length blocks

Fixed block sizes have a problem: every block boundary is artificial. If your block size is 10, the resampled equity curves all show structural breaks every 10 trades that don't correspond to any real feature of the strategy.

Politis and Romano (1994) solved this by drawing block lengths randomly from a geometric distribution with mean equal to the chosen block length. Some blocks are 3 trades long, some are 17, on average they're whatever the chosen length is. This random sizing produces a stationary resampling — a mathematical property meaning the joint distribution of the resampled series doesn't depend on the starting position of each block. Stationarity is what makes the convergence properties hold rigorously.

The Politis-Romano kernel

For each resample, the platform's kernel:

  1. Picks a starting index uniformly at random from the original trade list.
  2. Draws a block length from Geometric(1/b) where b is the mean block length.
  3. Appends those consecutive trades to the resample.
  4. Repeats from step 1 until the resample reaches the original trade count.
  5. If a block would run past the end of the original trade list, it wraps around (circular bootstrap).

The wrap-around is what keeps every position in the original equally likely to start a block, which is one of the conditions for stationarity.

The auto block-length rule

Choosing the right block length is what makes block bootstrap work. Too short and it degenerates toward iid — streaks aren't preserved. Too long and you don't have enough independent blocks to estimate the distribution reliably.

The Robustness tab uses the Politis-White (2004) rule, which estimates the right block length from your data's autocorrelation structure:

b_opt ≈ ( (2 × ρ₁²) / (1 − ρ₁²)² )^(1/3) × N^(1/3)

Where ρ₁ is the lag-1 autocorrelation of per-trade PnL and N is the sample size. The intuition: more autocorrelation means longer blocks are needed to capture it; larger samples can support longer blocks without losing block-count diversity.

In practice, the auto block length usually lands in the 6 to 25 trade range for most algotrading strategies. Strategies with very low autocorrelation (uncorrelated entries, no streak structure) get block lengths near 1 — which is iid by another name. Strategies with strong streak structure get block lengths of 30+.

The Path Luck sub-tab's run metadata badge shows the auto-detected block length on every Robustness run.

In AlgoLift

Stationary block bootstrap is the default for every resample-based mode on the Robustness tab:

  • Path Luck fan chart — every band visible is built from stationary-block resamples.
  • Tail Risk drawdown envelope — same.
  • All 6 Robustness Score components that read distributions read them from block-resampled distributions.

The platform records the auto-detected block length in the manifest so users can see what the autocorrelation structure of their strategy looks like at a glance.

Placeholder · Screenshot

Path Luck metadata badges — auto-detected block length

Author hint: Path Luck sub-tab top-right area showing the metadata badges: 'Stationary Block' mode, 'Block length: 14', '10,000 sims'. Capture with dark theme. Save to /public/images/guide/robustness/stationary-block-bootstrap/badges.png.

When iid is appropriate instead

iid bootstrap is the simpler, faster method and produces narrower percentile bands. It's correct when:

  • Entries are genuinely independent. A strategy that enters on standalone fundamental events (earnings prints, central bank decisions) with no carry-over between events doesn't have streak structure to preserve.
  • The user has explicitly verified independence. The Robustness tab has an iid toggle that pops a confirmation when used — that confirmation exists so this becomes a deliberate decision.

For most futures-day-trading strategies, iid is wrong. The streak structure is real and bootstrap that erases it produces alternate histories that don't look like the original.

Worked example

Placeholder · Worked Example

Same strategy, two methods

Author hint: Same strategy run through both bootstraps. Strategy A — trend follower on MES 5m. iid result: P95 drawdown 9%, P(DD>25%) 2%. Block result: P95 drawdown 16%, P(DD>25%) 11%, auto block length 18. The block result is the honest one for this strategy because trend-following has strong autocorrelation. Show side-by-side fan chart screenshots if possible.

What this shows. The same strategy produces a much fatter tail under stationary block bootstrap. The iid version's 9% P95 drawdown is what iid resampling sees when it smooths away the losing streaks. The block version's 16% reflects what actually happens when those streaks are preserved. The strategy isn't different — the analysis method is, and the block version is the one that matches reality.

Common misunderstandings

Common Misconception
Myth
A longer auto-detected block length means my strategy is better.
Reality
The block length reflects autocorrelation, not quality. A high-autocorrelation strategy (trend-following) needs long blocks. A low-autocorrelation strategy (independent fundamental triggers) needs short blocks. Neither is intrinsically better — they're just different shapes of edge.
  • "My block length is 1. Something is wrong." Not necessarily. A block length of 1 means the Politis-White rule estimated zero meaningful autocorrelation in your trades. That's iid by another name and is actually the right choice for a small set of strategy types.
  • "Block bootstrap is more conservative — it overstates tail risk." It usually produces wider tails than iid, yes, but those wider tails reflect what your trades actually do. Calling block "conservative" implies iid is the baseline; for most strategies iid is the optimistic version.

When stationary block bootstrap is the right tool

  • Algotrading strategies with persistent regimes. Trend-followers, momentum strategies, mean-reverters with regime-conditional behavior.
  • Strategies where the trade sequence has any clustering structure. Almost all futures intraday strategies fall here.

When it's not enough

  • Strategies with strong calendar dependence. A strategy whose returns concentrate on specific days of the week or month produces resamples that miss the calendar effect even with the right block length. Calendar-conditional resampling (a planned feature) is more appropriate.
  • Strategies with regime-switching behavior. If the strategy operates differently in trends vs. ranges, the regime-conditional bootstrap mode (separate from this one) preserves regime structure that vanilla block bootstrap doesn't distinguish.
Key Takeaway

Stationary block bootstrap is the default for the Robustness tab because it produces alternate histories that look like real algotrading — streaky, autocorrelated, with tails that match what live trading actually produces. iid is faster but for most strategies it tells a comforting story your data doesn't support.