Monte Carlo Simulation
Monte Carlo simulation tests your strategy's robustness by running thousands of randomized variations. If a strategy only works with trades in the exact order they occurred, it's fragile. Monte Carlo reveals how it performs under different conditions.
This is one of the most common reasons strategies fail in live trading — see Why Strategies Fail for the full picture.
Where to find it: In the app sidebar, open Monte Carlo. It has four tools, each covered below:
| Sidebar entry | What it answers |
|---|---|
| Robustness Test | Is my edge real, or lucky trade sequencing? |
| Health Validation | Does the edge persist out-of-sample, or is it overfit? |
| Capital Sizing | How much capital do I need to trade this safely? |
| Survival Test | Will the strategy survive degraded conditions? |
A fifth tool, Crisis Dependency, also lives under the Benchmark section and is covered on its own page.
On the Robustness Test and Health Validation pages you pick a strategy, set Starting Capital and Number of Simulations/Method in the Simulation Settings card, and click Run Simulation (or Run Validation). Progress is shown per method as the engine works through Shuffle, Bootstrap, Block Bootstrap, Parametric, and Stress+.
What Makes AlgoChef's Monte Carlo Different
Most Monte Carlo tools ask one question: "What is my net profit at the 95th percentile?"
AlgoChef asks a fundamentally different question: "Does my strategy's composite quality score stay stable across thousands of randomized scenarios?"
Here's why that distinction matters. Net profit at a single confidence level tells you one number about one outcome. It says nothing about whether your strategy's risk profile, statistical reliability, or overall quality holds up under randomization — or collapses.
AlgoChef's Monte Carlo recalculates the full CSI (Casey Strategy Index), along with the separate Profitability, Risk and Confidence scores, for every single simulation run, across all five methods. Each run produces a complete quality assessment, not just a P&L figure.
The result: AlgoChef measures the variability and stability of your strategy's composite score across thousands of scenarios. If the CSI and the other scores remain stable across simulations, the strategy is marked as robust. If they collapse or vary wildly, the strategy is fragile — regardless of what the net profit line shows.
This gives you confidence intervals across 20+ metrics, displayed as gauges — the same visual system as the Strategy Analyzer — so you can immediately see where your strategy holds up and where it doesn't.
Info
The difference in plain English: Other tools tell you "your worst-case net profit is X." AlgoChef tells you "your strategy's overall quality verdict stays strong even under randomization." That's a much more meaningful test of robustness.
Simulation Methods
AlgoChef offers five simulation methods, each testing a different aspect of robustness:
1. Shuffle (Fisher-Yates)
Randomly reorders your trades. Tests whether the strategy's profitability depends on the specific sequence of wins and losses.
Best for: Checking if results are order-dependent.
2. Bootstrap (With Replacement)
Randomly samples trades from your history, allowing the same trade to appear multiple times. Simulates "what if I had more/fewer of certain types of trades."
Best for: Estimating the range of possible outcomes with your trade distribution.
3. Block Bootstrap
Preserves consecutive trade sequences (streaks) while shuffling blocks. Maintains the temporal structure of winning and losing streaks.
Best for: Strategies where streaks matter (mean-reversion or momentum systems).
4. Parametric
Generates synthetic trades based on your strategy's statistical profile (mean, standard deviation, skewness). Creates entirely new trade sequences.
Best for: Testing if the statistical edge holds in synthetic scenarios.
5. Stress+ (Shuffle + Noise)
Shuffles trades AND adds random noise to each trade's P&L. The most aggressive test.
Best for: Worst-case scenario analysis with degraded trade quality.
Robustness Test (Full History)
What It Tests
The Robustness Test answers: "Is my strategy's edge real, or just a product of lucky trade sequencing?"
It runs thousands of simulations across your entire trade history, reshuffling and resampling trades to see if your strategy's quality scores hold up — or collapse.
How to Read Results
Robustness Grade
The headline metric. It measures tier stability — the percentage of simulations where your strategy's CSI stays in the same tier as the median result.
| Grade | Tier Stability | Meaning |
|---|---|---|
| Excellent | ≥90% | Edge is highly robust across randomization |
| Good | 75–89% | Edge is solid with minor variability |
| Caution | 50–74% | Significant quality variation — investigate |
| Failed | Below 50% | Strategy is fragile — results are order-dependent |
Tier Stability %
The exact percentage of simulations that stayed in the same CSI tier. A strategy with 94% tier stability means only 6% of simulations dropped (or rose) to a different tier.
Score Robustness
Shows how stable each of the other scores is across the simulations:
- Profitability Score — Does return quality hold up under randomization?
- Risk Score — Do drawdowns and volatility stay controlled?
- Confidence Score — Does statistical reliability remain stable?
If one score is significantly less stable than the others, it shows where the strategy is fragile.
Equity Fan Chart
A visual showing all simulation equity curves overlaid. The spread of the "fan" tells you how much path dependency affects outcomes. A tight fan = robust; a wide fan = order-dependent.
Confidence Intervals
| Percentile | Meaning |
|---|---|
| 50% | Median outcome — what's most likely |
| 75% | 3 out of 4 simulations were better than this |
| 90% | Only 10% of simulations were worse |
| 95% | Near worst-case |
| 99% | Extreme worst-case |
These intervals are calculated across 20+ metrics, not just net profit.


Health Validation (IS/OOS)
What It Tests
Health Validation answers: "Does my strategy's edge persist out-of-sample?"
It splits your trade history into an earlier baseline (in-sample) and a recent period (out-of-sample), then runs Monte Carlo simulations on each, in line with the Health Score. If the IS and OOS distributions diverge significantly, your strategy may be overfit to historical data.
How to Read Results
- Health Score Comparison — Compares the database health score with the Monte Carlo-calculated health score to validate consistency
- Method Histograms — Distribution of scores across simulation methods, showing overlap (or divergence) between IS and OOS
- IS vs OOS Divergence — Quantifies how much the out-of-sample results deviate from in-sample expectations
Info
A strategy that scores Excellent in-sample but Caution out-of-sample is likely overfit. Look for strategies where IS and OOS distributions overlap significantly.

Capital Sizing
What It Tests
Capital Sizing answers: "How much capital do I actually need to trade this strategy safely?"
It uses Monte Carlo simulations to model Risk of Ruin (RoR) and maximum drawdown probabilities at different capital levels, giving you data-driven capital recommendations.
Configuration Options
| Parameter | Default | Description |
|---|---|---|
| Starting Capital ($) | Auto (2× margin) | Your account size — auto-calculated from margin requirements |
| Number of Simulations | 15,000 | Number of Monte Carlo runs |
| Resampling Method | Bootstrap | Simulation method to use |
| Ruin rule | Margin (futures with a margin requirement) / Floor + Max drop from peak (everything else) | When a simulated account counts as ruined — see The ruin rule |
| Margin buffer | 10% | Margin rules only. Extra room "on top" of margin. 0% = plain margin |
| Ruin floor | $3,500 | Floor rule only. A fixed dollar amount the account must stay at or above. $0 = no floor |
| Max drop from peak | 50% | Used by Margin + Max drop from peak and Floor + Max drop from peak |
| Max DD Threshold | 25% | Maximum drawdown you're willing to tolerate |
| Confidence Level | 98% | Statistical confidence for recommendations |
Click Run Capital Analysis to start.
How to Read Results
Dual Curve Chart
Shows two curves plotted against starting capital:
- Risk of Ruin curve — Share of simulations that hit your ruin rule at each capital level
- Max Drawdown curve — The deepest fall from peak at your confidence level (for example P98: 98% of simulations fall no further)
Where these curves cross your targets shows roughly how much capital you need. Goal Seek calculates a single estimate and marks it on the chart.
Goal Seek: Dual-Constraint Capital Planning
Finds the minimum starting capital where both of these hold:
- Risk of Ruin is at or below your target
- Maximum drawdown (at your confidence level) is at or below your target
The minimum is solved directly from the simulations, not read off the chart's capital steps, then rounded up to the next $100. The Risk of Ruin and drawdown shown next to it are measured at that rounded figure (rounding up only adds room, so both stay within your targets in the simulations), and the same figure appears on the chart as the Required marker.
The ruin rule
A simulated account is "ruined" when it breaks the rule you pick. Risk of Ruin is the share of simulations that hit the rule. Capital Sizing and the Survival Test use the same rule.
| Asset | Rules offered | Ruined when |
|---|---|---|
| Futures | Margin (default) | The account goes below margin per contract × contracts traded × (1 + buffer) |
| Futures | Margin + Max drop from peak | Either of the above, or the account falls the chosen % (default 50%) or more below its highest point so far |
| Forex, stocks, crypto, no instrument, or futures with no margin requirement set | Floor + Max drop from peak | The account goes below a dollar floor (default $3,500), or falls the chosen % (default 50%) or more below its highest point so far |
A few details:
- The buffer is "plus X% on top". With the default 10%, the line is margin × 1.10. Set it to 0% to use plain margin.
- The "highest point so far" includes your starting capital, so the drop is measured from the best the account has been, not from where it started.
- Contracts traded is the largest contract count recorded in the strategy's trades. If your import has no contract column, the tool assumes 1 contract and says so next to the rule.
- The margin line is a fixed dollar amount. More starting capital does not move it. It gives the account more room above it, which is why Risk of Ruin falls as capital rises.
- A futures strategy whose instrument has no margin requirement set uses the floor rule instead, and a note under the rule links to the Instruments page. Set the instrument's margin there to use the margin rules. The tool never guesses a margin for you.
- The floor, like the margin line, is a fixed dollar amount and is "below" (strict): an account sitting exactly on the floor is not ruined. A floor of $0 means the drop alone decides. If your starting capital is at or below the floor, the tab warns you, because every simulation is ruined at the start or by its first loss.
Worked example (simulated): margin is $10,000, you trade 1 contract, and the buffer is 25%. The ruin line is $10,000 × 1 × 1.25 = $12,500. Every simulation that ends a trade with the account below $12,500 counts as ruined. Starting with $30,000 leaves $17,500 of room above the line; starting with $15,000 leaves only $2,500. If 90 of 1,000 simulations cross the line, the simulated Risk of Ruin is 9%.
The rule is shown in plain words under the controls, for example "Ruined if the account goes below $12,500 (margin $10,000 × 1 contract + 25%)". For the floor rule it reads, for example, "Ruined if the account goes below $3,500 or falls 50% or more below its highest point." Changing the rule, buffer, floor or drop recalculates the curves instantly from the saved simulations, with no re-run.
Tip
The calculator never recommends capital below the margin line or the floor. Results are simulated from historical trades and describe what could happen under the rule you chose. They are not a prediction.

Survival Test (Stress Testing)
What It Tests
The Survival Test answers: "Will my strategy survive degraded market conditions?"
It systematically degrades your strategy's performance metrics — reducing win rate, shrinking profits, and increasing losses — then runs Monte Carlo simulations under each scenario to see if the strategy remains viable.
Predefined Scenarios
Seven scenarios with progressively worse conditions:
| Scenario | Win Rate ↓ | Profit ↓ | Loss ↑ | Consecutive Losses |
|---|---|---|---|---|
| Baseline | 0% | 0% | 0% | — |
| Mild Stress | 5% | 10% | 10% | — |
| Moderate Stress | 10% | 20% | 15% | — |
| Severe Stress | 15% | 30% | 25% | — |
| Extreme Stress | 20% | 40% | 35% | — |
| 5 Consecutive Losses | — | — | — | 5 in a row |
| 10 Consecutive Losses | — | — | — | 10 in a row |
The degradation scenarios progressively stress the three core performance levers. The consecutive loss scenarios test streak resilience independently.
How to Read Results
Survivability Score (0–100)
The headline metric. A weighted average of normalized survival rates across all scenarios, where more severe scenarios carry less weight (since they represent increasingly unlikely conditions).
| Score | Grade | Status |
|---|---|---|
| ≥80 | Excellent | Viable for live trading |
| 60–79 | Good | Tradable with awareness |
| 40–59 | Caution | Increase capital before trading |
| Below 40 | Concerning | Not viable at this capital level |
Survival Rate per Scenario
Each scenario shows what percentage of simulations survived (didn't hit ruin). Ruin here uses the same ruin rule as Capital Sizing, so a futures strategy is judged against its margin line (plus buffer) and any other strategy against its dollar floor and its drop from peak. The thresholds for "good" survival vary by severity — a 50% survival rate under Extreme Stress is actually rated Excellent, while the same rate under Baseline would be Concerning.
Severity-Aware Thresholds
| Severity | Excellent | Good | Caution |
|---|---|---|---|
| None (Baseline) | ≥95% | 85–94% | 70–84% |
| Low | ≥90% | 75–89% | 55–74% |
| Moderate | ≥80% | 60–79% | 40–59% |
| High | ≥65% | 45–64% | 25–44% |
| Extreme | ≥50% | 30–49% | 15–29% |
Set Starting Capital ($), the ruin rule and Number of Simulations, then click Run Stress Tests. The education tabs above the results (Overview, Baseline, Max Consecutive Losses, Mild/Moderate/Severe/Extreme Stress) explain each scenario in detail.

Related: Crisis Dependency Analysis
After stress-testing with Monte Carlo, you may also want to check whether your strategy depends on market crises. Crisis Dependency Analysis removes trades from major crisis periods (2008 GFC, COVID, etc.) and recalculates your scores to reveal if your edge disappears without market panics.
Robustness vs Survivability: Quick Reference
These two tests answer different but complementary questions:
| Robustness Test | Survival Test | |
|---|---|---|
| Question | Is the edge real? | Can it survive bad conditions? |
| What changes | Trade order/selection | Win rate, profit size, loss size |
| Measures | CSI tier stability | Survival rate under stress |
| Tells you | If results depend on lucky sequencing | If the strategy has enough margin of safety |
| Use when | Validating backtest quality | Sizing capital for live trading |
Tip
A strategy can be robust (edge is real) but not survivable (not enough capital buffer), or survivable but not robust (lucky sequencing masks a weak edge). You want both.
Tips for Getting the Most from Monte Carlo
- Run all five methods — Each reveals different fragilities. A strategy that passes Shuffle but fails Parametric may have distributional assumptions baked in.
- Check Score Robustness — If the Profitability score is stable but the Risk score is not, look closely at how the strategy handles losing periods.
- Use Capital Sizing before going live — Goal Seek gives you a simulation-based estimate at your chosen confidence level, under your assumptions, not a guess.
- Don't ignore consecutive loss scenarios — Even strategies with high win rates can be devastated by unexpected streaks.
- Run Health Validation before trusting robustness — A strategy that's robust in-sample but diverges out-of-sample is likely overfit.
- Check crisis dependency — A strategy that only works during market panics will underperform in calm markets. Use Crisis Dependency Analysis to find out.
Tip
Ready to stress-test your strategy? Start your 14-day free trial.