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.
Calculation breakdown (first 20 rows; browser paging and CSV include all rows)
Trial · countTerminal equity · quotePath maximum drawdown · %Trades completed · countLoss threshold hit
1860.718.348239200no
21,030.4610.689741200no
3826.9527.719145200no
4913.9315.388982200no
51,161.8410.555668200no
6748.2632.730505200no
71,051.2712.545763200no
81,051.2713.290332200no
91,072.5114.320383200no
101,233.697.771659200no
11951.2316.285338200no
12990.0517.58119200no
131,072.519.588921200no
14718.9229.503831200no
15826.9521.247338200no
16860.721.105449200no
17860.724.994573200no
18970.4414.105905200no
191,072.517.137709200no
20951.2320.148984200no

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.