Limiting Trading Strategy Drawdowns with an Equity Curve Filter

In an effort to limit the drawdown of a trading system I like to employ a filter on the strategy’s equity curve.  Meaning that if the strategy runs into a rough period I have a set of objective rules that tells me when I should take the strategy offline. 

The most common type of filter I employ for the equity curve is based off of a 100 trade moving average of the curve.  When the equity curve is trending above the average the system remains active, when the equity curve drops below its average the system is taken offline until the curve turns upward again. 

I typically trade mean-reversion type strategies which have a  typical trade distribution with many small winning trades with the occasion large loss. The trades are also short in duration with anywhere from 3-12 trades per day placed by each strategy.  Its after a string of large losses occurs that the curve will drop below its moving average.  This type of filter would not work with a typical trend following strategy which would have many small losses and the occasional large win as the filter would likely take the strategy offline before it has a chance to place one of its few winning trades.

Below is the equity curve of the AUD/NZD strategy which I have been trading for much of the year along with its 100 trade moving average.  Recently the strategy has experienced a drawdown which erased nearly all the gains that had been earned through the year. The goal is to attempt to reduce the severity of the drawdowns. 





If the strategy is turned off when the equity curve drops below its 100 trade moving average we end up with the following result. As can be seen, when the strategy is in an uptrend the filtered equity curve provides a slight drag on profitability.  But once the equity curve takes a noticeable downward turn





Just so we’re comparing apples to apples, the stats for the unfiltered strategy will start at trade 100 (which is where the 100 trade MA starts).  The moving average filter cuts nearly half the trades out over the time period, reducing the drawdown by nearly 50%, as well as increasing the system profit by 37%. 

  Original Filtered
Trades 432 226
Avg. Trade (Ticks) +0.31 +0.83
Total Profit (Ticks) +135.7 +186.8
Max Drawdown (Ticks) -443.6 -226.90


In theory one could apply any number of technical indicators to a strategies equity curve in an effort to help improve its profitability, as well as to make a determination if a strategy has stopped working and should no longer be traded.  I also blogged in the past about tracking the overall equity curve of a trading account which is trading a portfolio of strategies and move excess funds into and out of the account.

I am continuing research on this topic and will be exploring other possible means for determining when a strategy should be disabled or should be removed from a portfolio all together.


twitter: @LimitUpTrading
twitter: @RobTerp


23 thoughts on “Limiting Trading Strategy Drawdowns with an Equity Curve Filter

  1. nice work Rob – I am curious as to how you are plotting your equity curve MA. I run my program in Tradestation and don’t think it is possible to do so within that environment. I am trying to test different MA settings for my returns and so far I have been using excel, though this process of optimization is somewhat tedious. Perhaps you have some suggestions?

  2. Thanks guys. The charts were generated in Excel, although I do have a custom app I wrote which I can load in the equity curve data and have it run through some different filter scenarios. As far as my strategy goes, I have it coded in a custom app I wrote which is connected to Interactive Brokers trader workstation. Currently I’m turning the strategy on/off manually based on the equity curve, but I would like to chart it directly from the app, and have it turn on/off the strategy automatically based on where the equity curve is.

    What you could possibly do with TradeStation is to export your trades to Excel, create the equity curve data, save it as a csv and import it back into TradeStation as a custom datasource. So to trade station it looks like stock/futures data. You could then code a Moving Average strategy and run the strategy on that equity curve data. So you’re basically creating a trading system that would tell you how well your filter did based on your equity curve, if that makes sense. I did the above with AmiBroker (mentioned in another blog post), and then used AmiBroker to optimize the filter values.

  3. Thanks for the detailed reply Rob – I was actually able to locate a lower chart indicator in the Tradestation forums so that should suffice for the time being, especially until I can build it into my execution logic. Once this is taken care of, I will be able to test out different MA period settings, but I was curious as to how you came up with the 100 trade setting for your trading. I’ve seen this figure with other people’s work (it was the default setting for the Tradestation indicator), so it seems to be somewhat commonplace.

    • I was playing around with some different MA numbers and found that below 100 (75, 50, 25) there was too much whipsaw and trying moving the period above 100 (125, 150, 200) provided too much lag. I’m planning on trying to test some different indicators as well, such as Bollinger Bands, Linear Regression and a few others.

  4. I would be very interested in hearing about any and all of the results you come up with that you are willing to share in regards to alternative methods of using traditional indicators for EC management. I will post my results once I am able to run some tests…I am also implementing at a counter trend system.

    • Yea, I will definitely post the results of other options I investigate. I will be interested in yours as well when you have them available. Do you have a blog that you will post them on, or on Linked-in?

      • I dont have a blog but I will post the results here and on Linkedin. Ive been able to run 3 tests (100, 75, and 50 trade MAs) and my system actually performs better in each instance without the MA filter.

      • here are my results on counter trend system returns over 3 years (1447 trades) at various MA settings:

        MA period filter PnL period gain improvement

        250t $35,592.00 $36,213.00 -1.74%
        225t $38,971.00 $38,505.00 1.20%
        200t $39,813.00 $39,143.70 1.68%
        175t $41,139.30 $39,993.60 2.78%
        150t $41,085.30 $40,454.10 1.54%
        125t $40,681.50 $40,726.50 -0.11%
        100t $39,725.40 $40,747.50 -2.57%
        75t $40,936.80 $41,515.50 -1.41%
        50t $39,790.50 $42,364.80 -6.47%
        25t $38,211.30 $43,063.50 -12.70%

        as you can see, not exactly the most effective rule for my particular system, but interesting nonetheless.

      • Rob – that is an excellent point in regards to the effect on drawdowns, which I’m assuming had to have been reduced. my excel skills are somewhat limited though…perhaps you could share a method of coming up with drawdown figures in excel?

  5. Another way of doing this is to look at the t-stat of the last n trades, this gives you the probability of your last n trades having a mean profit > 0.

    • Craig, I run a t-test when I am looking at whether or not to begin trading a strategy I have designed, but haven’t thought of continually running on a subset of the recent trades in the equity curve. Good idea, I’m going to add this to my list of things to investigate further.

      • I use a rolling window of the last 120 trades with a minimum of 30, to go live with a system I set the bar at being 90% sure the mean > 0. One of the disadvantages of these types of ideas is that they don’t account for trading frequency, but nothing’s perfect.

  6. Rob _ I am unable to see your formulas in the google doc, but I have been able to chart my spreadsheet values in order to find the max DD values – clearly this takes capital preservation to another level and is something I will be implementing moving forward

      • I was able to use your formula and chart the drawdowns for 75, 100 & 175 trade MA filters – it now becomes a question of risk tolerance, among other things. Using the shortest period, I give up the most profit, but exit drawdowns earlier. Personally, I will most likely choose between 100 and 75 as the 175t MA setting flatlines when my EC drops below, reducing any chance of re-entering at a more advantageous phase of the unfiltered EC rebound.

  7. Hi Rob,

    Glad to have come across your site and this post in particular. I’ve just started my journey on automated trading so hope to find more useful tips on your site. Can you direct me to any posts in particular? Any work on when to cut a strategy would be of interest.

    At the present time my thinking is to have an expectation of results prior to ‘go live’ and run the strategy live and if it doesn’t hit the expectation within 10% then cut it. Have you done much work on this?


    • Hi Paul,

      This is the first post where I am taking a look at the equity curve for an individual strategy, and will be trying out a number of different ideas. There was an interesting comment in the thread above about using the t-stat of the last x trades to determine if the avg. trade p/l was still above 0.

      There was also and interesting article in Futures magazine recent talking about trading based on a strategy’s equity curve as well:

      Look forward to see how things come along with your automated strategy.


  8. Hi Rob,

    I would be interested to know if you are willing to share your source or parts of it. I am an IB customer and trade options. I would like to automate many of the adjustments I use to hedge risk, so that I can spend less time watching the market. IB’s automated trades are not capable of doing this with enough accuracy or in many cases triggered by the right metrics.

    I had already contemplated using their Java API and probably to use the NetBeans IDE. Having something that already does part of the job would be a boost.

    Can you please consider?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s