# Monte Carlo & robustness

> How much of your result is luck?.

Source: https://www.texttoquant.com/academy/monte-carlo
Level: Intermediate · 6 min · lesson 7 of 12

---

Your equity curve is one path through history, the specific order the trades happened to arrive in. Monte Carlo asks: how different could it have been, and how bad a drawdown should you actually plan for?

## One curve is one sample

The same set of trades in a different order produces a different looking equity curve and a different maximum drawdown. Judging a strategy on the single historical ordering overstates how much you know about it.

## Resample a thousand times

Run this, then open the Monte Carlo risk analysis, on Pro and above. It reshuffles and resamples the trades a thousand times to build a distribution of outcomes. A robust edge stays profitable across most reorderings; a fragile one depends on a lucky sequence.

## Plan for the tail, not the average

The most useful output isn't the median. It's the drawdown you'd face in a bad but plausible run. If the 95th percentile drawdown is deeper than you could stomach, the strategy is too risky for you even if its average looks great.

## Try it

```
Buy BTC when the 20 day moving average crosses above the 50 day; sell when it crosses back below, on 1D, last 3 years.
```

Run it: https://www.texttoquant.com/terminal?q=Buy%20BTC%20when%20the%2020%20day%20moving%20average%20crosses%20above%20the%2050%20day%3B%20sell%20when%20it%20crosses%20back%20below%2C%20on%201D%2C%20last%203%20years.&parse=1

**Takeaway:** Size and judge a strategy by its bad runs, not its lucky one. Monte Carlo turns a single equity curve into the range of outcomes you should actually expect.

## Check yourself

Which Monte Carlo number should you plan your risk around?

1. The median return across all resamples
2. The 95th percentile drawdown, a bad but plausible run
3. The best resampled equity curve

Answer: 2. The average tells you little about what you must sit through. The tail is what ends accounts, so size for the bad run.

Terms used: [monte-carlo](https://www.texttoquant.com/academy/glossary#monte-carlo), [max-drawdown](https://www.texttoquant.com/academy/glossary#max-drawdown), [moving-average](https://www.texttoquant.com/academy/glossary#moving-average)
