Monte Carlo simulation
Understanding the concept
Declare the data, sampling scheme, position-sizing rule, costs, number of simulations and seed. Distinguish shuffled fixed observations from resampled observations and model-generated shocks. If losses cluster, independent sampling may erase relevant dependence; a suitable block or conditional model can address part of that problem.
Common mistake
Thousands of simulations do not repair overfitting or generate an unseen crisis automatically. Report whether a quoted percentile describes maximum drawdown, terminal equity or another statistic, and its limitations.
Further learning
In the course: 9.2 The math of losses: recovery asymmetry and risk of ruin; 15.10 Strategy Audit — When to Fix the System, When to Fix Yourself. Sources: SciPy: random simulation and resampling.
Percentiles and simulation error
State whether a percentile describes drawdown, terminal equity or barrier breach. Check stability across seeds and path counts. Separate simulation noise from model uncertainty: more paths can reduce the former without repairing a wrong distribution or incomplete history.
FAQ
Is simulated risk of ruin the true probability of account failure?
Are shuffling and sampling with replacement equivalent?
No. Shuffling preserves the outcomes and their sum; replacement can alter both. Path-dependent sizing further changes cash outcomes.