Workspace / Research tools
Data analysis

Seeded Risk of Ruin Simulator

Explore how position sizing and an assumed trade distribution interact across many possible sequences. Enter a win probability, average win and loss in R units, cost per trade, equity fraction, number of trades, path count and drawdown threshold. A repeatable seed lets you compare settings against the same underlying random sequence. Everything runs locally in your browser. This is an independent binary-outcome Monte Carlo model, not a market forecast, historical backtest or measured probability that your own account will fail.

Explicit assumptionsFormula & methodology includedNo account required

Enable JavaScript to analyze data in this browser. The methodology and worked example remain available below.

Worked example — illustrative data
Paths crossing drawdown threshold0%
Median ending return113.01%
5th percentile ending return48.86%
95th percentile ending return223.57%
Median maximum drawdown10.27%
Simulated paths1,000
Each trade multiplies equity by 1 + risk fraction × (winning R or −losing R − cost R). Threshold uses drawdown from the running peak.

Synthetic independent binary outcomes, fixed input payoffs and fixed fraction of current equity. This estimates model-specific drawdown breach frequency, not real-world bankruptcy probability. Seeded output is reproducible. Dependence, gaps, changing edge and liquidity are absent.

Model statisticValue
Threshold (%)40
Breach count0
Trades per path250
Seed42

Translate R outcomes into equity changes

One R is the reference amount risked before the outcome multiplier is applied. With equity fraction f, a winning step changes equity by the factor 1 + f × (average win R − cost R). A losing step uses 1 − f × (average loss R + cost R). Position amounts therefore shrink after losses and grow after gains. Costs apply to every simulated trade. Keep a loss step within the model's valid capital range; leverage liquidation rules are not reconstructed from this equation.

Interpret threshold breaches carefully

Here ruin is an operational drawdown threshold chosen by you, measured from each path's running equity peak. It need not mean an account reaches exactly zero. The reported breach share is the number of paths crossing that threshold divided by simulated paths. A larger path count reduces random sampling noise but cannot repair incorrect assumptions. A fixed seed makes an experiment reproducible; changing the seed explores a different finite sample. Terminal equity alone can conceal a serious drawdown earlier in a path.

Stress the assumptions, not only the seed

Every trade is drawn independently from the same win probability and two outcome sizes. Real trades can cluster by market regime, share exposures or experience larger losses during gaps. This model does not reproduce those dependencies, changing liquidity or varying payoff distributions. Compare lower win probabilities, larger losses and higher costs, then inspect how smaller equity fractions change the output. Illustrative defaults are not estimates of an existing strategy. A low simulated breach share is conditional on your inputs and is not account protection.

Your research workspace

Save selected inputs and research notes explicitly in this browser. Compare assumptions and restore a saved setup without submitting a trade. JavaScript enables the controls.

Find a tool or explanation