- in Research by Cesar Alvarez
Equity Curve Monte Carlo Analysis
Imagine the following. You spent time developing a strategy with a compounded annual return of 24% and max drawdown of 18%. Profitable 10 of the last 11 years. An average 21 day rolling correlation with the SPY of .20. Passes your out-of-sample testing. Passes your parameter sensitivity testing. Raise your hand if you would trade this? I would be the guy jumping up and down saying “yes!”.
Now you trade the strategy and the first year you lose money. Do you stop trading it or keep going? What about after two years, your average return is only 11%, half the backtested results? Do you stop trading it or keep going?
I would have a hard time trading it after two years. I can say I have done this before with strategies. Here is the issue, the above one year and two year scenarios are quite possible.
The Strategy
This strategy is based off a mean reversion strategy I am trading. I modified it so it could trade during all market conditions and for a CAR of around 20%. One thing I did not like about this variation was the low drawdown, which I will come back to later.
Equity Monte Carlo Traditional Method (Method 1)
One popular way of evaluating a strategy is through using Monte Carlo on the daily equity data. AmiBroker provides this functionality for free whenever you do a backtest. What this method does is each day randomly pick one of the daily returns from the entire backtest, with replacement. It does this for the number of days in your backtest and builds up an equity curve. Do this 1000 times and then you can look at the percentiles for the CAR and MDD. Here are the charts for this strategy.
Most people look at the 5% level to see what a “worst” case scenario is. For CAR at the 5% level you have 10.9%. This means that 95% of the time one can expect the 11-year CAR to be above this value.
The 50% percentile value of 17.5% is what I would consider a more realistic expectation of future returns. Our original return of 24% probably had a lot of luck involved.
Looking at the 5% level for Max Drawdown, we get a value of 24.8%. Meaning that 95% of our runs had a MDD of less than 24.8%. The median MDD is 16%.
There are several reasons I rarely use equity curve Monte Carlo analysis. The first is that we rarely trade for the entire backtest period before deciding if the strategy CAR is in line with expectations. On the MDD analysis, it tends to paint a more positive picture than other analysis.
Equity Monte Carlo without Replacement (Method 2)
Because of the under performance of a strategy I currently trade, I thought about other ways of how to analyze the equity curves.
Instead of replacing the daily returns after randomly picking one, we keep it out. The consequence of this is that the CAR of every Monte Carlos run is the same. But the MDD will be different because of the path to the final will be different. I like this because I have taken one part of the randomness out of the equation, the final CAR. This lets me focus on yearly returns and MDD. I used AmiBroker to create all the random equity paths and then used Excel to analyze the CAR, MDD and yearly returns.
Using this method, we get a much more negative few of MDD. The 5% level is now 36%. I mentioned at the beginning of the post that I did not like the fact that strategy had a low MDD of 18%. When I see a value that low, the path taken was probably lucky and that drawdown is low compared to what is likely. The median MDD is 25%. Both values are much worse than method 1.
Imagine trading this strategy and now you have a 25% drawdown. Besides not being happy, now do you keep trading or not? Using method 1, the 25% drawdown is at the 5% level. Meaning you would likely conclude this is what out of the ordinary and stop trading. Using method 2, this is only a 50% level move, so in this case you would probably not stop trading because of this analysis.
Yearly Returns
Here is a chart of the 11,000 yearly returns, 11 years per backtest times 1000 backtests.
The worst return is a bone jarring -35.5%. The 5% percentile level -8%. The 50 percentile is 23.6%.
Looking at the percentile returns for yearly returns of the strategy, we see they range from the 5^{th} percentile to the 88^{th} percentile.
Now to the question I asked at the beginning of the post. What do you do if after the first year of trading the strategy loses money? Using the Traditional Monte Carlo Method, you get no information about this from the traditional charts. One could generate the equity curves and so similar analysis.
Using Method 2, from the thousand runs, 12% had a first year loss. Having a losing year to start with is nothing to worry about.
What about having a two year return less +12%, this is half the strategy CAR. That happened 20% of the time. Quite possible to happen
Most people, myself included, would likely stop trading a strategy if the above happened. But as you can see these are not unlikely situations.
What about having a two year return under zero. That happened 4% of the time. If this happed, I would be concerned.
Large Market Years
I started this analysis because the SPY was up 21% last year and I was surprised that one strategy that I trade was not up more. When you trade a low correlation strategy, it’s hard to beat the market when it is up big. Looking at this strategy we can see there is a 45% chance of not beating the market. And a 26% chance you do not even do half the market return. These are both likely events and yet something that would cause people to stop trading the strategy.
Final Thoughts
This analysis assumes a strategy with low correlation to market. If the strategy highly correlates with the market, now one must consider how the market did along with how the strategy did for the year to get a better feel of how the strategy is doing compared to the market.
I rarely do this analysis because daily returns tend to be serially correlated and this type analysis ignores that. It is still useful to do because we can see how likely losing years are and underperformance. I prefer to use Sensitivity Analysis for my strategy evaluation.
Backtesting platform used: AmiBroker. Data provider: Norgate Data
Good quant trading,