StatSim
StatSim generates 1,000 alternative performance paths from a backtest's or portfolio's observed returns. Use it to explore how the sequence of returns affects the outcome and to compare the original result with resampled scenarios.
Open an analysis
- Backtest: open a successfully finished run in your MesoSim backtest library and select StatSim.
- Portfolio: select StatSim in a portfolio preview or a saved result from Portfolios → Simulations.
- Hedged portfolio: use the Hedged / Unhedged selector to choose which performance series to analyze. See Analyze portfolio results.
StatSim uses daily returns. If the source contains several NAV observations on a date, it uses the last observation for that date.
Choose a sampling method
Stationary Bootstrap
The default method samples runs of consecutive observed returns, joining them to create alternative paths. Keeping returns together in blocks retains some of the local patterns in the original sequence. Observations can be sampled more than once or left out of a particular path.
Financial return series are generally not IID (independent and identically distributed): they can exhibit serial dependence and volatility clustering. Vanilla bootstrap samples individual returns independently, breaking those patterns. StatSim uses Stationary Bootstrap to resample blocks of consecutive returns and preserve some of their dependence over time.
For Block length, choose:
- AUTO: let StatSim estimate the expected block length from the return series.
- Manual: enter an Expected length in daily returns to explore a specific setting.
The length is an average, rather than a fixed block size. For example, an expected length of 5 produces blocks averaging five daily returns; individual blocks can be shorter or longer. The resolved length is shown beside the results.
Permutation shuffle
Permutation shuffle is a Monte Carlo approach that generates alternative paths by randomly reordering the observed returns. Each path uses every observed return exactly once. This isolates the effect of the return sequence: a strategy can experience a different drawdown even when it contains exactly the same returns.
CAGR, Sharpe, and Sortino are expected to match the original series under permutation. Both maximum-drawdown measures can change with the ordering.
Read the paths and summary
Compare the original result with the path chart, then inspect the summary table:
- CAGR, Sharpe, and Sortino summarize return and risk-adjusted performance.
- Max Drawdown from Peak and Max Drawdown on Initial Capital show two views of drawdown.
- Minimum, p5, mean, median, p95, and maximum summarize the resampled outcomes. The p5 and p95 rows are the 5th and 95th percentiles for each metric.
Each column is summarized independently. A percentile row does not describe one particular simulated path. If some sampled metrics cannot be calculated, the page identifies their exclusion from the corresponding summaries.
The sampled paths reuse the observed returns. They do not introduce market conditions absent from the source history, and their percentile ranges are not a forecast of future performance.
Are returns reliably positive?
With Stationary Bootstrap, this panel tests whether the mean daily log return is greater than zero. It shows a one-sided p-value and whether the result is statistically significant at the 5% level.
The test provides evidence about the supplied return series. It is not adjusted for strategy selection, optimization, or testing many alternatives. Read it alongside the original backtest and the resampled paths when evaluating a strategy.
The panel explains when the test cannot be calculated, including when returns have zero variance or the NAV series needed an offset before log returns could be computed.
Data requirements
- NAV data must contain finite values on at least three calendar dates.
- Stationary Bootstrap needs at least 20 daily returns.
- A manual expected block length must be between 1 and the available daily-return count.
A portfolio can have enough data for its ordinary analysis but too little for Stationary Bootstrap, particularly after an inverse-volatility warm-up period. Use a longer completed history if needed.
If the calculations are available but the chart fails to load, select Retry chart. For missing result data, inspect the source backtest or portfolio and follow the message shown.