Monte Carlo · Return processes

Stationary Block Bootstrap

Default

block_bootstrap

Draw the future by replaying real stretches of the past. The stationary block bootstrap resamples random-length runs of complete historical trading days, so the shocks in your simulation are shocks that actually happened, in orders that actually occurred, with the cross-asset relationships they actually had.

Overview

A naive bootstrap draws individual days independently, which destroys every temporal feature of a return series: momentum, mean reversion, and the tendency of turbulent days to arrive in clusters. The block bootstrap of Politis and Romano (1994) fixes this by resampling contiguous blocks of days instead of single days. Whatever dependence lives inside a block is carried into the simulation untouched.

The stationary variant uses randomly sized blocks whose lengths are geometrically distributed, rather than a single fixed length. This matters for a technical reason with a practical consequence: a fixed block length makes the resampled series non-stationary, because the probability of sitting at a block boundary depends on where in the block you are. Geometric block lengths make every position statistically equivalent, so the resampled series is stationary whenever the original is.

FolioLab resamples whole cross-sectional rows. On each simulated day, every holding takes its return from the same historical date. This is the single most consequential design choice in the generator: correlation, coskewness, cokurtosis and tail dependence are inherited exactly from history rather than being summarized into a covariance matrix that cannot represent them.

The sampling recursion

Let be the frozen panel of aligned daily simple returns across assets, and let be the historical row a given path reads on simulated day . Each path evolves independently as:

With probability the path jumps to a fresh, uniformly drawn starting date, beginning a new block. Otherwise it simply steps to the next calendar day, continuing the current block. The simulated return vector on day is then the complete row .

Block lengths are therefore geometric with mean , and the modulo makes the sample wrap circularly so that dates near the end of history are not systematically under-sampled as block continuations.

Choosing the block length

The expected block length is the one free parameter, and it is a genuine tradeoff. Blocks that are too short behave like an IID bootstrap and wash out serial dependence; blocks that are too long reuse long stretches verbatim and collapse the effective number of independent draws, understating uncertainty.

Automatic selection (default)

FolioLab selects the length with the Politis-White (2004) rule, including the Patton-Politis-White (2009) correction. The selector estimates the sample autocovariances , finds the smallest lag beyond which the next autocorrelations all fall inside the significance band , and forms flat-top-weighted long-run sums over bandwidth :

where is the Politis-Romano flat-top trapezoidal lag window. The stationary-bootstrap optimum is then

clamped to . Because the sampler draws one shared block structure across all assets, the per-column optima are collapsed with the median. The median resists a single near-IID column dragging the panel around, which the mean does not, while the maximum would let one unusually persistent asset dictate the whole panel.

Fallback and manual override

If the selector cannot produce a sane answer, because the panel has fewer than 32 rows, contains a constant column, or produces non-finite intermediates, the engine falls back to the Politis-Romano rule of thumb . You may also supply the length explicitly. The result always records which of the three paths was taken, as politis_white, sqrt_t_fallback or manual, so the choice is never invisible.

What the block length does and does not establish

It is tempting to claim that block resampling reproduces volatility clustering. FolioLab does not make that claim. The Politis-White selector targets long-run-variance inference on raw returns, and raw daily equity returns routinely show almost no linear autocorrelation while their absolute and squared values remain strongly dependent. A selector that sees little linear structure can therefore pick a short block even when volatility clustering is pronounced.

So the honest statement is narrower: the block bootstrap preserves observed marginal shocks, complete same-day cross-asset rows, and local ordering conditional on the selected block length. The selected length is a documented heuristic pending block-length sensitivity analysis and rolling-origin validation. If clustering behaviour is central to your question, compare against filtered historical simulation, which models conditional volatility explicitly rather than hoping resampling captures it.

Properties and limitations

What it preserves

  • Exact empirical marginal distributions, including skew and fat tails, with no distributional assumption at all
  • Complete same-day cross-asset structure, including tail dependence a covariance matrix cannot encode
  • Local ordering within each sampled block
  • Calendar traceability: sampled row indices are reported, which is what lets CPI deflation reuse the inflation that actually prevailed over the sampled windows

What it cannot do

  • Produce a crisis worse than anything in your sample. History bounds the tail by construction
  • Condition on today. Every historical day is treated as equally representative of tomorrow, whether markets are currently calm or turbulent
  • Preserve dependence at horizons longer than the sampled blocks
  • Escape the drift problem. The centre of the distribution is still the historical mean, with all its estimation error

Capabilities unique to this process

Because it replays dated calendar rows, the plain block bootstrap is the only process that supports the window-based crisis scenarios. The 2008_repeat and covid_repeatstresses work by giving block starts inside the named historical window a 5× sampling multiplier at every restart, which requires a notion of “which real date is this”. Under any other process those scenarios are reported in skipped_scenarios with the reason rather than silently dropped.

The same property drives calendar-aligned inflation: real-wealth outputs deflate by the CPI actually realized over the sampled windows, instead of a flat assumed rate. The FHS, GBM, Gaussian and Student-t processes reconstruct returns rather than replaying dated rows, so they fall back to the disclosed constant inflation model.

Stratified first starts also apply only here: path of opens inside stratum , which spreads opening dates evenly across history and tightens tail quantiles for free. Weighted crisis starts and stratification are mutually exclusive, so stratification switches off automatically under a window scenario.

When to choose it

Use it as your baseline for essentially every long-horizon planning question: retirement funding, SIP goal probability, withdrawal sustainability. It makes the fewest distributional assumptions of any process available, it supports the full scenario and inflation machinery, and it works on the shortest histories.

Reach for something else when your question is explicitly conditional. If you want to know what happens starting from a stressed market, use the regime-switching bootstrap with a bear start. If you want the simulation to react to today's volatility level, use filtered historical simulation.

References

  • Politis, D. N., & Romano, J. P. (1994). The Stationary Bootstrap. Journal of the American Statistical Association, 89(428), 1303–1313.
  • Politis, D. N., & White, H. (2004). Automatic Block-Length Selection for the Dependent Bootstrap. Econometric Reviews, 23(1), 53–70.
  • Patton, A., Politis, D. N., & White, H. (2009). Correction to Automatic Block-Length Selection for the Dependent Bootstrap. Econometric Reviews, 28(4), 372–375.
  • Künsch, H. R. (1989). The Jackknife and the Bootstrap for General Stationary Observations. Annals of Statistics, 17(3), 1217–1241.