Trading the Equity Curve – Part 1 of N?

Only Trade the Best Segments of the Equity Curve – Cut Out Drawdown and Take Advantage of Run Ups! Really?

Equity curve feedback has been around for many years and seems highly logical, but one can’t get an industry-wide agreement on its benefit.  The main problem is to know when to turn trading off and then back on as you track the equity curve.  The most popular approach is to use a moving average of the equity curve to signal system participation.   When the equity curve moves below 30, 60, or 90 period-moving average of equity, then just turn it off and wait until the curve crosses back above the average.  This approach will be investigated in Part 2 of this series.  Another approach is to stop trading once the curve enters a drawdown that exceeds a certain level and then start back up once the equity curve recovers.  In this post, this method will be investigated.

Programmers Perspective

How do you go about programming this tool to start with.  There are probably multiple ways of accomplishing this task, but the two I have most often observed were the two pass process and the inline simultaneous tracking of the synthetic and actual equity curves.  The two pass process generates an unadulterated equity curve and stores the equity and trades either in memory or in a file.  The second part of the process monitors the external equity curve along with the external trades synchronously and while trading is turned on, the trades are executed as they occur chronologically.  When trading is turned off, the synthetic equity curve and trades are processed along the way.   The second method is to create, which I have coined (maybe others too!), a synthetic equity curve and synthetic trades.  I have done this in my TradingSimula_18 software by creating a SynthTrade Class.  This class contains all the properties of every trade and in turn can use this information to create a synthetic equity curve.  The synthetic equity curve and trades are untouched by the real time trading.

Start Simple

The creation of an equity curve monitor and processor is best started using a very simple system.  One market algorithm that enters and exits on different dates, where pyramiding and scaling in or out are not allowed.  The first algorithm that I tested was a mean reversion system where you buy after two consecutive down closes followed by an up close and then waiting one day.  Since I tested the ES over the past 10 years you can assume the trend is up. I must admit that the day delay was a mistake on my behalf.  I was experimenting with a four bar pattern and somehow forgot to look at the prior day’s action.  Since this is an experiment it is OK!

if marketPosition <> 1 and 
(c[2] < c[3] and c[3] < c[4] and c[1]  > =  c[2]) then 
	buy next bar at open;

//The exit is just as simple - 
//get out after four days (includeing entry bar) on the next bars open - no stops or profit objectives.  

If barsSinceEntry > 2 then sell next bar at open;
Simple Strategy to test Synthetic Trading Engine

Here is the unadulterated equity curve using $0 for execution costs.

Non adjusted equity curve of our simple mean reversion system. Wait for a pull back and then a rally before entering.

The Retrace and Recover Method

In this initial experiment, trading is suspended once you reach a draw down of 10% from the peak of the equity curve and then resumes trading once a rally of 15% of the subsequent valley.  Here is an intriguing graphic.

Green means ON. Red means OFF. The lower curve is the resultant curve.

I did this analysis by hand with Excel and it is best case scenario.  Meaning that when trading is turned back on any current synthetic position is immediately executed in the real world.  This experiment resulted in nearly the same drawdown but a large drop in overall equity curve growth – $75K.

Put the Synthetic Equity Curve Engine to the Test

Now that I had the confirmed results of the experiment, I used them as the benchmark against my TS-18 Synthetic Trade Engine.  But before I installed the Equity Curve algorithm, I needed to make sure my synthetic trades lined up exactly with the real equity curve.  The synthetic curve should align 100% with the real equity curve.  If it doesn’t, then there is a problem.  This is another reason to start with a simple trading strategy.

Take a look here where I print out the Synthetic Equity curve on  a daily basis and compare it with the end result of the analysis.

Synth. matches Reality

Now let’s see if it worked.

Testing with Synth. Equity Curve Trading Turned ON!

The equity curves are very similar.  However, there is a difference and this is caused by how one re-enters after trading is turned back on.  In this version I tested waiting for a new trade signal which might take a few days.  You could re-enter in three different ways:

  1. Automatically enter synthetic position on the next bar’s open
  2. Wait for a new trade signal
  3. Enter immediately if you can get in at a better price

Using the 10% Ret. and 15% Rec. algorithm didn’t help at all.  What if we test 10% and 10%.

10% Ret. and 10% Rec.

Now that performed better – more profit and less draw down.  Now that I have the synthetic engine working on simple algorithms we can do all sorts of equity curve analysis.  In the next installment in this series I will make sure the TS-18 Synthetic Engine can handle more complicated entry and exit algorithms.  I have already tested a simple longer term trend following strategy on a medium sized portfolio and the synthetic engine worked fine.  The retracement/recovery algorithm at 10%/15% did not work and I will go into the “whys” in my next post.

Please follow and like us:

2 thoughts on “Trading the Equity Curve – Part 1 of N?”

  1. This is a comment on your equity curves sitting I think your programming skills are correct but the theory and philosophy behind your trading was exactly opposite of what you should be doing look at a trading curve like entering the stock market the retail trader typically enters the stock market once is doing very good and they are well documented for buying at the high the professional trader buys on weakness when the markets doing very badly because it goes against your emotions but the professional knows this is the way to trade and they do much better the same philosophy should be no different an equity curve fitting. When the equity curve declines by 10 or 15% that\\’s when you buy the system or start trading the system when the system recovers close to a % equity peak then that\\’s when you exit the system. I would analyze all the equity drawdowns and equity peaks from the equity curve to determine what the average equity drawdown for the system over a period of time in the system when you\\’ve reached a drawdown of about 75% of past equity drawdowns of that equity curve you start trading the system In addition if you put 10 or 15 systems together once you\\’re out of one system you will look at other systems that have an equity curve signal and trade many different systems only when the equity curve drawdown has been reached try this I think you\\’ll see the results will be substantially better

    1. Hi Michael,

      Very nice observations. In my hedge fund days we traded an MSS (MULTI SYSTEM STRATEGY on futures only) – five or so not so correlated algos and would weight them based on their performance (subjectively and objectively). If system A exceeded a certain level of draw down, funds were shifted to the other algos. And then back later. Real time performance was continually monitored as each algo had its own Master account. Having the master accounts run simultaneously with the allocation shifting algo helped us determine if shifting was working or not and informed us when to shift. Sometimes asset shifting across the portfolio of strategies performed better and sometimes “sticking with all systems full bore” performed better. The equity curve trading paradigm works differently in stocks than in commodities, for sure. One thing is for sure, Equity Curve trading has its fair share of proponents and opponents. Results are highly dependent on the type of markets and type of algorithms. Everyone should do their own research and draw their own conclusions.

      Thanks for the comments – best George

Leave a Reply