Trading risk-of-ruin simulator
Run reproducible finite-horizon simulations from your win rate, payoff, sizing and loss threshold assumptions. The estimated frequency describes this model, not future markets.
Inputs
Hypothetical example. Replace these inputs with your own.
Result
Calculation result
Example result
- Trials reaching the supplied loss threshold
- 0 %
- Threshold-hit trials
- 0 count
- 95% Monte Carlo sampling interval lower
- < 0.000001 %
- 95% Monte Carlo sampling interval upper
- 0.382676 %
- Mean terminal equity
- 993.68 quote
- Median terminal equity
- 990.05 quote
- 5th percentile terminal equity
- 778.79 quote
- 95th percentile terminal equity
- 1,233.69 quote
- Median path maximum drawdown
- 15.071079 %
- Median trades to threshold among hit trials
- Not defined count
- Mean completed trades per trial
- 200 count
- Independent binary outcomes use your supplied win probability, fixed reward and per-trade costs. Equity is floored at zero; each trial stops at the first loss-threshold hit.
- The loss threshold is measured from starting capital, not from a later peak. A zero loss allowance hits immediately; a 100% allowance requires zero equity.
- One global xorshift32 stream with the supplied nonzero seed runs in trial order. Stopped trials consume only executed draws. Percentiles use type-7 linear interpolation.
- The 95% Wilson interval describes Monte Carlo sampling under these assumptions, not confidence in future market performance. Serial dependence, changing edge, gaps and execution are excluded.
- All trials contribute to the aggregates. The table and CSV contain only the first 100 trial summaries.
- Median trades to threshold is undefined because no trial reached it.
| Trial · count | Terminal equity · quote | Path maximum drawdown · % | Trades completed · count | Loss threshold hit |
|---|---|---|---|---|
| 1 | 860.7 | 18.348239 | 200 | no |
| 2 | 1,030.46 | 10.689741 | 200 | no |
| 3 | 826.95 | 27.719145 | 200 | no |
| 4 | 913.93 | 15.388982 | 200 | no |
| 5 | 1,161.84 | 10.555668 | 200 | no |
| 6 | 748.26 | 32.730505 | 200 | no |
| 7 | 1,051.27 | 12.545763 | 200 | no |
| 8 | 1,051.27 | 13.290332 | 200 | no |
| 9 | 1,072.51 | 14.320383 | 200 | no |
| 10 | 1,233.69 | 7.771659 | 200 | no |
| 11 | 951.23 | 16.285338 | 200 | no |
| 12 | 990.05 | 17.58119 | 200 | no |
| 13 | 1,072.51 | 9.588921 | 200 | no |
| 14 | 718.92 | 29.503831 | 200 | no |
| 15 | 826.95 | 21.247338 | 200 | no |
| 16 | 860.7 | 21.105449 | 200 | no |
| 17 | 860.7 | 24.994573 | 200 | no |
| 18 | 970.44 | 14.105905 | 200 | no |
| 19 | 1,072.51 | 7.137709 | 200 | no |
| 20 | 951.23 | 20.148984 | 200 | no |
Saved scenarios
Save up to 20 new-tool scenarios on this device, separately from the six existing tools. Prices and balances stay out of the URL. DCA, journal and correlation scenarios save settings and a digest, requiring the matching CSV again to calculate.
Saving requires browser storage and Web Locks.
Formula and worked example
A seeded xorshift32 stream selects independent wins/losses. Stake uses your fixed initial or current-equity fraction. Wins add stake × (reward R − cost R); losses subtract stake × (1 + cost R). A trial stops when equity reaches the threshold based on starting capital.
Hypothetical boundary test: with 0% wins, 100% risk and no costs, a one-trade trial reaches a 50% loss threshold every time. With 100% wins and zero reward/cost, equity stays unchanged. Changing the seed samples another path set; it does not supply evidence for the assumed win rate.
These estimates use bounded decimal arithmetic. They are scenario calculations, not trading instructions or forecasts.
Methodology sources: Monte Carlo methodology
Related tasks and reading
This website is developed by Zack White and Vincent Hale.