Monte Carlo simulator for trading
Run your trades through 1,000 to 10,000 random sequences and see the drawdown to plan for, the chance of ruin and the capital it takes. Paste a trade list or enter a win rate and win/loss ratio.
Runs in your browser. Nothing you type is uploaded.
Equity across the sequences
- 90% of sequences
- Middle 50%
- Median
- Starting capital
- Ruin line
Embed this tool on your site
Free to use. Paste the code into your page; it carries the numbers in the form right now. Everything runs in your visitor's browser.
How it works
A Monte Carlo simulation redraws your trades in random order, thousands of times, at the same trade size. The spread of results shows how far the same trades could have fallen.
Example: a 45% win rate, wins 1.5 times the losses, a loss of 200 per trade and 200 trades, over 1,000 sequences. The median max drawdown is 2,400, the 95th percentile is 4,900, and 1.6% of the sequences lose half of a 10,000 account.
How to read the result
Plan around the 95th percentile of max drawdown. The median is a typical run of these trades; one sequence in twenty falls further than the 95th percentile. Compare that figure with what you would sit through before you stopped the strategy.
Chance of ruin is the share of sequences that lose the part of the capital you set as the ruin line. Suggested minimum capital is the smallest account at which no more than 5% of the same sequences reach that line. In the chart, the darker band holds the middle half of the sequences and the lighter band holds 90% of them.
How to run it on your own backtest
Export the list of trades from your backtest report, switch to My trade list and paste the net result of each trade, one per line. Use trades from one strategy at one fixed size, after costs. Set the ruin line to the loss that would make you stop, and start with 10,000 sequences.
What it does not tell you
Drawing trades at random keeps your average trade and its spread but breaks up any clustering, so losing runs in real markets can be worse. It also can't say whether the edge is real: trades from an overfit backtest only measure the risk of a strategy that may not exist. Use out-of-sample trades, at a fixed size, after costs.
Questions
What is a Monte Carlo backtest?
It takes the trades from a backtest and replays them thousands of times in random order to see how deep drawdowns could go. It measures the risk of the path. It does not test whether the strategy has an edge; walk-forward analysis and out-of-sample data do that. This simulator draws trades with replacement, so the net result also changes from one sequence to the next.
Is Monte Carlo simulation free?
This MC simulator is free, with no sign-up, and takes up to 200,000 trades. It runs in your browser, so nothing you paste is uploaded.
How many simulations should I run?
1,000 sequences show the shape of the results. Use 10,000 when you care about the 95th percentile or a chance of ruin under 1%, because rare outcomes then rest on more sequences. The same inputs always give the same result, so a link you share shows the same figures.
How many trades do I need?
As many as you have, and at least 100 or so before you trust the numbers. The simulator only draws from the trades you give it, so a short list can't produce a loss larger than the largest one in it.
How is the suggested minimum capital worked out?
For each sequence the simulator finds the deepest loss from the start. It takes the level that 95% of the sequences stay within and divides it by the ruin line. A loss of 3,400 with a ruin line of 50% gives 6,801. Margin is not included, so check that the account also covers it.
Turn this calculation into an automated strategy
AlphaPrime generates, backtests and filters strategies automatically.
For education. Not investment advice. Check the exchange before you trade.

