TEST THE ASSUMPTIONS

Strategy resilience lab

How much does the sequence of trades matter? Resample your realised net R results, preserve short runs with moving blocks, and compare smaller risk with higher execution costs. Every result is conditional on your sample and model.

No account required. This module reads files in your browser and does not send their contents to a server or save them in browser storage. Other site scripts follow the site privacy policy.

1

Start with chronological net R

One observation per closed trade, in its original order. R = net realised P&L / positive initial monetary risk. Keep the same trade unit, costs and risk definition throughout. Open positions and partial fills need reconciliation before import.

No observations loaded

Separate values with a new line, space or semicolon. A decimal comma is accepted (1,5 = 1.5); commas do not separate observations here. Use 2–20,000 finite values between −1,000 and +1,000 R.

Import a CSV, TSV or text file

Quoted delimiters, escaped quotes, UTF-8 BOM and CRLF are supported. Review separator and column selection. A wrong or missing R blocks the import; no invalid trade is silently omitted. Headers and other columns stay out of exports. Import never sorts rows.

2

Choose the resampling model

No longer than the historical sample. Relevant only to moving blocks.
0.05 R means 5% of the initial risk for every sampled trade.

Avoid subtracting costs twice. Use realised net R observations and zero additional cost for the baseline. Additional cost is a stress assumption deducted again on every trade, including winners and breakevens.

Moving blocks copy consecutive observations from randomly chosen valid starts, without wrapping the end of the sample. Blocks are joined at random. This preserves some short runs; it does not prove stationarity, independence between blocks or coverage of every regime. IID discards observed serial dependence.

Methodology and reproducibility

Version 1.0.0, 26 October 2026. Each path resamples the empirical distribution of supplied trades with replacement. IID draws one trade at a time. Moving-block bootstrap draws a block start uniformly from 0 to N − L and copies L consecutive trades; the final block is truncated to the requested path length. Block length 1 is equivalent to individual resampling. At L = N, every path repeats the original full sequence and the apparent uncertainty collapses. Test several plausible lengths; a chosen block length is an assumption, not an estimate of the true dependence horizon.

Equity after a trade is max(0, equity × [1 + risk/100 × (sampled net R − additional cost R)]). Risk is a constant fraction of current simulated equity. Equity at zero stays zero; this absorbing floor is a model convention and does not model contractual liability or negative balances. Maximum drawdown is the largest percentage decline from a running equity peak, including the starting equity. It differs from a loss relative to starting capital.

Check the arithmetic: starting at 100 with risk 10%, observations −1 R then +2 R and no extra cost gives 90 then 108, with 10% maximum drawdown. With another 0.05 R cost, the same trades give 89.5 then 106.9525. The order and equity compounding matter.

Quantiles use linear interpolation at index (paths − 1) × p after sorting. The generator is Mulberry32 with a 32-bit unsigned integer seed. Identical version, sequence, settings and seed reproduce the same run. Sensitivity cases restart the seed to use common random draws. Five cases cost 5 × paths × trades steps, limited to 5,000,000 in total. More paths reduce simulation noise at fixed assumptions; they do not remove model error or repair a small, selected or dependent sample.

These percentiles are not forecasts, validated probabilities of future outcomes or statistical confidence bounds for a strategy. Historical R values may omit rare gaps, execution failures, simultaneous portfolio exposure or different market regimes. The tool does not estimate uncertainty in the empirical distribution itself. Separate an untouched evaluation sample and record your chosen assumptions in the strategy testing protocol.

Method references: Efron (1979), Bootstrap Methods: Another Look at the Jackknife; Künsch (1989), The Jackknife and the Bootstrap for General Stationary Observations. These describe resampling methods, not a validation of this trading model.

Jarosław Wasiński

Editor-in-chief, ForexMechanics.com • Macro & FX analyst

Independent analyst and practitioner with over 20 years of experience in financial markets. Actively involved in Forex since 2007, with a focus on fundamental analysis, OTC market structure, and disciplined capital risk management.

  • Creator and editor-in-chief of MyBank.pl, providing reliable financial education since 2004.
  • Author of hundreds of in-depth market commentaries, structural analyses, and educational materials for traders and investors.
  • Advocate for market transparency, promoting education grounded in hard data and institutional reports (BIS, ESMA, CFTC).

All content is educational and informational only – it does not constitute investment advice or a recommendation. Remember: leveraged trading (Forex/CFD) carries a high risk of rapid capital loss.