February 14, 2018

Trading the Equity Curve

A popular method for determining if a strategy should be kept trading is trading the equity curve. What this means we apply an indicator, say 200-day moving average, to the equity curve. When the equity curve falls below this value we stop trading. We then continue to paper trade the strategy until it gets above the moving average and then trade it live again. The general idea being that you get out when the strategy is doing poorly and get back in when it is doing well. Also once a strategy breaks, this gives you a simple way of getting out of it.

In this example we would stop trading during the blue oval because the equity curve is below the moving average.

Often people will pick an indicator to use and then trade the equity curve live without seeing how the backtested results may have changed. Conceptually I like trading the equity curve because it is potentially good way of getting out of a strategy that is no longer working. But for strategies doing fine but simply going through a drawdown, what kind of effect does it have?

If one trades using the equity curve, one should test using the equity curve.

The Strategy

We will be using the ConnorsRSI strategy from this post. The test period is from 1/1/2001 to 12/31/2017. The reason for testing so far back is I wanted to give the equity curve signals lots of triggers. Here are the baseline results without trading the equity curve.

The Methods

These are the methods I will test. If you have other ideas, put them in the comments below. If I get enough new ones, I will test them.

  • The curve is above the (50,100,200) day moving average for last 5 days
  • The 50-day moving average is above the 200-day moving average
  • The 20-day moving average is above the 50-day moving average
  • The 50-day moving average is above the 100-day moving average
  • The (6,9,12,18) month return is greater than zero, (ROC)

The two most popular that I have seen are the equity curve being above the 200-day moving average and the 50-day moving average above the 200-day moving average. Which I have tested in the past on my own.

When the equity curve test is not true, we stop taking new trades. Any currently open trades we simply exit as they normally would.

The Results

Click for larger image.

My first observation is that all the stats got worse or stayed about the same, CAR, MDD, Ulcer Index, Sharpe Ratio. Clearly using equity curve trading does not improve your strategy. Using the MA200 has a 29% reduction in CAR.

What I like is that using the 1 year return (ROC252) above zero had only 15% reduction in CAR with about the same MDD. For protection from a broken strategy this could be worthwhile. The 1.5 year rule had eve better results.

The MA50>MA200 rule did a good job. If you used the C>MA50 rule. Your results would have been greatly reduced. This is why we test ideas. You never know which ones will work and which won’t.

Different Set of Parameters

Let us see if this pattern holds up with a different set of parameters. I choose these parameters to have more volatility in the strategy and trying to see if that would make using the equity curve better.

Click for larger image.

 

Again, we see the one year (ROC252) and the 1.5 year (ROC378) return above zero doing well.  After that the returns really drop.

Broken Strategy

I went looking for an old strategy I traded for a few years that I stopped trading because I thought it was broken. Here are the results of that strategy since 2001 without using an equity curve.

Click for larger image.

 

You can see that starting 2015, it stopped working. Could using the equity curve stopped the bleed those years? Reduce the max drawdown?

Click for larger image.

 

At first glance this looks good. The ROC252>0 method reduces drawdowns and increases returns. The 2015 to 2017 results are better. What worries me a little is the difference between the 9 month(ROC189>0) and 18 monthROC378>0) methods as compared to the ROC252>0. Then comes the problem of how long do you give it to get back? I still believe the strategy is broken and would not start trading it again.

Spreadsheet

Fill the form below to get the spreadsheet with all the results and additional stats. I also ran with many more parameters in the ConnorsRSI strategy.

Final Thoughts

Clearly using equity curve to stop trading can have a dramatic negative change in your results. This is why you should test with this vs simply saying that is what I will do in live trading. Depending on your method you may reduce your returns by as much as 50%.

I currently don’t use this. But I like what I see for the ROC252>0 method. I must investigate this more. The big advantage of using the equity curve is that it gets you out of a broken strategy and that makes me want to investigate this more.

Backtesting platform used: AmiBroker. Data provider: Norgate Data (referral link)

Good quant trading,

Fill in for free spreadsheet:

spreadsheeticon

Click Here to Leave a Comment Below

Jane - February 14, 2018 Reply

This is what I call a circuit breaker. It will hurt performance – always – but needed to reduce the risk of system failure.

    Cesar Alvarez - February 14, 2018 Reply

    The problem is if you don’t test what you are suing on your strategy, you may greatly reduce the returns which I think is worse.

Ryan - February 14, 2018 Reply

I have never been able to get equity curve trading to work without seriously impacting performance. Plus, it’s another rule that impacts degrees of freedom along with additional lines of code that need to be maintained.

I think that it’s a gimmick people use to try and cheat drawdowns (not going to work!).

There are also better ways when determining if your strategy is broken or not.

However, I respect your decision to test and test again as this is the only way that one can come up with an independent assessment on validity of the idea.

    Cesar Alvarez - February 14, 2018 Reply

    What ways do you think are better for determining if a strategy is broken or not?

Akshay - February 14, 2018 Reply

What do you use currently to know that strategy might be broken..do you have any objective rule? Since you said u stopped trading the above strategy some time back, how did you identify that?

    Cesar Alvarez - February 15, 2018 Reply

    Honestly this is my weakest area of trading. I do not have a systematic way of stopping a strategy. Every 6 months I compare the strategy’s performance to the type of market. I try to determine if the strategy has underperformed what I would expect given the market conditions. If I see 12-18 months of “poor” performance, then I stop.

Ola - February 15, 2018 Reply

Hi Cesar,
thanks for a great post.
Have you ever tried dynamically changing your position size depending on how your equity curve is doing?
Another thought (completely untested) is what you could achieve if you treated your equity curve in a trend following manner i.e. you enter and exit as if it was a trending stock?
Cheers,
Ola

    Cesar Alvarez - February 15, 2018 Reply

    I have not tested the dynamic sizing. To me, that is trying to do too much with the curve. Using the curve to trend follow is basically what all the rules I tested are doing.

Leave a Reply: