Documentation & User Guides
Learn the basics, or refine your skills with tutorials designed to inspire.
Last updated on 29. 8. 2025 by Kornel Mazur
Monte Carlo Tests
Page contents
Monte Carlo Tests
Monte Carlo Tests are an integral component of StrategyQuant X’s robustness testing framework, designed to assess the stability, resilience, and potential risk exposure of trading strategies. Through the use of controlled randomness, these simulations allow users to evaluate how their strategies might perform under a range of unpredictable and adverse conditions.
What Are Monte Carlo Tests?
Monte Carlo Tests are a statistical simulation method that evaluates trading strategies by subjecting them to randomized variations in parameters such as:
- Trade execution order
- Market conditions (spread, slippage)
- Strategy input parameters
- Historical price data
These simulations generate a distribution of outcomes rather than a single result, providing deeper insight into a strategy’s potential behavior and highlighting worst-case scenarios that may not be visible in traditional backtesting.
The primary purpose of Monte Carlo testing in StrategyQuant X is to:
- Detect overfitting or fragility
- Assess robustness under random perturbations
- Evaluate confidence intervals of key metrics like Net Profit and Drawdown
- Support informed decision-making before deploying strategies in live environments
Monte Carlo Methods in StrategyQuant X
In StrategyQuant X, two types of Monte Carlo tests are available:
1. Monte Carlo Trade Manipulation
This method performs simulations by manipulating the sequence and availability of executed trades. It is computationally efficient as it does not require backtesting; instead, it operates directly on the existing trade list from the main backtest.
Available Manipulation Techniques:
- Randomize Trades Order
- Shuffles the order of executed trades.
- 2 types of Randomization:
- Resampling: the program randomly samples a specified number of trades from the entire pool of historical trades. The key difference with this method is that the list of trades may vary each time; it can select the same trade multiple times while potentially omitting others entirely.
- Exact: This method considers all trades.
- Randomly Skip Trades
- Simulates skipped trades with a defined probability.
- Reflects real-life issues such as:
- Connectivity loss
- Platform failures
- Manual trading interruptions
Interpretation of Results
Each simulation produces:
- A unique equity curve
- A summary table of key metrics (Net Profit, Max Drawdown, etc.) across selected confidence levels (e.g., 80%, 90%, 95%)
Example:
If the original Net Profit was $6,990 and Monte Carlo results at 95% confidence show $3,943, this means there's a 5% chance the strategy would earn less than $3,943 under similar trade disruptions.
Key Insight: Helps identify the risk of deterioration in performance due to execution variance.
2. Monte Carlo Retest Methods
Unlike trade manipulation, these simulations introduce variations that require full re-backtesting of the strategy for each scenario. They are computationally intensive but offer valuable insights into strategy sensitivity.
Monte Carlo Retest Methods:
- Randomize history data (by tick), with probability X% up / X% down and max price change of ATR X% up / X% down
- This randomizes tick values as they come from the data feed, with independently adjustable probability and size of change up and down.
- DOES THIS REQUIRE TICK DATA????
Key Retest Methods:
- Randomize Strategy Parameters
- Applies random changes to parameters (e.g., indicator periods) within a defined range.
- Settings:
- Probability of Change – chance that a parameter will be modified
- Max Parameter Change – % deviation from original value
- Example: Parameter = 60, Max Change = 10% → new value range = 54–66
- Randomize History Data
- Alters OHLC values slightly using a defined probability and magnitude (based on ATR).
- Simulates sensitivity to small changes in price behavior
- Settings:
- Probability of Change – per bar
- Max Price Change – % of ATR
- Randomize Starting Bar – this will test the strategy behavior when the testing starts on a different starting bar. It is obvious that a good strategy cannot be sensitive to which bar you start the test.
These methods test if the strategy is overfitted to specific conditions in the historical data or parameter values.
Performance Considerations
Each Monte Carlo Retest simulation requires a full backtest.
Example:
If one backtest takes 0.5 seconds, running 100 simulations would require approximately 50 seconds per strategy.
Confidence Levels
StrategyQuant X supports the following confidence levels:
50, 60, 70, 80, 90, 92, 95, 97, 98, 99, 100
Filtering Support
You can configure filters to automatically reject strategies that deteriorate significantly in MC scenarios.
Example:
Filter out any strategy where MC Net Profit < 80% of original Net Profit.
Only these values are accepted for valid results.
Monte Carlo testing provides a powerful way to stress-test strategies, offering a more realistic assessment of their live trading potential. By identifying weaknesses that are not visible in standard backtests, traders can make more robust and confident deployment decisions.
Was this article helpful? The article was useful The article was not useful
Page contents


