Registered: Dec 2011
01-15-12 07:50 PM
Monte Carlo How-To thread
There seems to be allot of confusion on the board regarding what Monte Carlo simulation is and how it protects traders from disastrous drawdown's and blowing up their account. I thought I'd share what I learned with anyone who has not yet taken advantage of using Monte Carlo with their backtest data.
How Monte Carlo works - an example:
With a set of backtest data from 01/2008-01/2012 (four years) - the Monte Carlo simulation works by randomly selecting x% of the trades (usually 25% of the trades) during the four year period. The simulation repeats over and over N times - it's recommend to use at least N > 1,000.
So for this four year period, a 25% sample would create data for a one year period.
Using the maximum drawdown in your original backtest data is not an accurate way to determine the statistically worst drawdown in the future. By running thousands of 25%-sample simulations, you can more confidently determine the absolute worst-case scenario going forward by looking at which sim had the largest drawdown - in other words, which sim had the "worst luck" by randomly selecting the worst trades during the four year backtest period.
You may be surprised to find that the worst-case Monte Carlo sample may have a significantly worse drawdown than your original backtest data. Use this point as your worst case scenario - not the maximum drawdown in your original backtest data - and calculate your necessary leverage over time from there. Common ways to calculate leverage over time are the Kelly Criterion, Half-Kelly, and Sharpe Ratio formulas.
Outside of Monte Carlo, it is also important to consider that any system, no matter how non-curve fitting it may be, does not last forever. You should always be looking for other technical edges, as well as trading other non-technical methods such as more generic support/resistance, MA crossovers, etc. Also, consider keeping up your discretionary skills with paper trading, so that you'll have something to confidently fall back on when your system fails earlier than expected!
To calculate Monte Carlo sim's - check if your software platform has this feature integrated. Ninjatrader has Monte Carlo simulations in the Strategy Analyzer window; just right click on the "trades" tab on your backtest data and select Grid > Monte Carlo Simulation. If you don't have Ninja, you can download it for free to run your data via the free historical feed. Some Excel files available from Microsoft for free also do Monte Carlo simulations.
I hope this helps clear up what Monte Carlo simulation is and how you can use it with your trading. If I missed anything, please post and add on!