Matana Labs

Monte Carlo simulation in Matana Labs: three methods

A Monte Carlo simulation reshuffles a backtest’s results many times to show how much of the outcome was luck. Matana Labs uses three methods on the run’s days and trades: shuffle the order of days, randomly skip trades, and resample days with replacement. You see the median result, the worst outcomes and how often the drawdown passes your pain threshold.

What it checks

One curve is one realization. The spread shows how much of the result and drawdown were luck.

The question behind it: Where does it work and where not? In the app it is in Analysis Lab → Checks, stage “Deep”. For extra confidence: market regimes, neighboring timeframes, other tapes, noise. Can be skipped.

How it works

Three separate methods over already-computed days and trades: (1) shuffle the order of days, keeping the set of daily P&L; (2) randomly skip 20% of trades; (3) redraw the same number of days from your own days again (like “day sweep”). 2000 times each, seed 11.

How it gets its status

These are the app’s own rules, shown on the check’s card:

With fewer than 30 trades or 20 days in the run, the check still shows its numbers, but its status is at most “with a caveat” and the result is marked as unreliable.

How to read the result

The Monte Carlo check in Matana Labs: a table with three methods and their median result, worst five percent, median drawdown, one-in-twenty drawdown and share worse than the pain threshold, and a histogram of results
“Monte Carlo: three dials” on a test data set: three Monte Carlo methods and the spread of results.

In the score out of 100

When it has a status, it counts toward the overall score with weight 1: “holds” earns full points, “with a caveat” half and “broke down” none; “can’t compute” is left out.

Every plan, the free one included, can run it; any engine runs it needs are counted in backtest-years.

If it breaks down

Budget for the drawdown from the spread, not the baseline one; reduce position size.

This is the app’s own suggestion; under Improvement the app tests candidate changes on the engine before it shows them.

Screenshots show the real app on a test data set. Backtests and simulations are not real trading, and past results don’t guarantee future ones. Not investment advice.

Keep reading

See Matana Labs plans, from free

Questions

What is the pain threshold?

The drawdown you don’t want to see, 20% by default. You can change it on the check’s page; the status looks at how often any method goes past it.

Does Monte Carlo rerun the strategy?

No. It reshuffles the days and trades the run already has, so it is fast. The shuffled history stress test is the version that reruns the engine.

Which method decides the status?

The median of resampled days decides whether it breaks down; the share of drawdowns past the pain threshold, across all three methods, decides the caveat.