Some trading systems have prolonged periods of winning or losing trades. Long winning streaks may be followed by a prolonged period of drawdown. Wouldn’t it be nice if you could minimize those long drawdown periods? Here is one tip that might help you do just that. Try applying a simple moving average to your trading system’s equity curve and use that as a signal on when to stop and restart trading your system. This technique just might radically change your trading system’s performance.
How to do this? Well the moving average applied to your trading system’s equity curve creates a smoothed version of your trading system’s equity curve. You can now use this smoothed equity curve as a signal on when to stop or restart trading. For example, when the equity curve falls below the smoothed equity curve you can stop trading your system. Why would you do this? Because your trading system is under performing, it’s losing money. Only after the equity curve starts to climb again should you start taking your trades once again. This technique is called trading the equity curve.
Trading the equity curve is like trading a basic moving average crossover system. When the fast moving average (your equity curve) crosses over the slower moving average (your smoothed equity curve) you go long (trade your system live). When the fast moving average crosses under the slower moving average you close your long trade (stop trading your live system).
In the image above the blue line is the equity curve of an automated trading system. The pink line is a 30-trade average of the equity curve. When the equity curve dips below the pink line, such as around trade number 60, you would stop trading the system. Once the equity curve rises above the pink line, around trade number 80, you would start trading the system once again.
It’s a great idea and with some systems this technique can really work wonders. In essence, we are using the equity curve as a signal or filter for our trading system. In the most simple case, it’s a switch telling us when to stop trading it and when to resume trading. But you could also use this signal to reduce your risk or switch to a different system instead of simply turning off the system.
Obviously, you need to track all trades somewhere in order to generate the complete equity curve and moving average. If your live system has stopped trading you will need to still record the theoretical trades it would be taking. Basically you will need to have two copies of your system running. One will be dedicated to taking every trade in simulation mode. This simulation system would be tracking the theoretical equity curve and computing the smoothed equity curve. No real trades would be taken by the simulated system. Its job is to simply track the two equity curves.
The second system will be dedicated to trading live. This live system will have the ability to trade or not trade based upon the results computed by the simulation system. Think of the simulated system as an indicator. It’s always running collecting data and crunching the numbers. This information will then be used by the live system to tell it when to trade and when not to trade.
One method to accomplish this would involve passing data between two charts in TradeStation. Both charts are trading the identical trading system. One trades live while the other trades only in simulation mode. The chart running in simulation mode acts as your indicator by taking every trade and tracking both the equity curve and smoothed equity curve. This indicator chart then passes a simple variable to the live chart indicating if trading should continue as normal or if we should stop trading. The live chart then simply acts on the live market.
This type of setup produces a dynamic trading system that adjusts its trading behavior based upon the system’s performance. It’s a simple concept, but it’s complex to build in TradeStation. Some solutions that I’ve seen are also not very flexible. Overall solutions have proven to require complex programming skills and tedious setup to get this to work.
In short, building custom Easylanguage code to trade the equity curve has been very difficult to do. In fact, it has been well outside the ability of most programmers. But, not anymore.
I’ve recently been introduced to the Equity Curve Feedback Toolkit. This kit allows me to use a simple EasyLanguage function within my code to perform the simulation I need to trade the equity curve. It’s super simple and will only take a few minutes to set up. Let me show you.
I took an example trading system that appeared on System Trader Success called, A Simple S&P System. I then added the Equity Curve Feedback function to my code. Finally, I made a couple minor adjustments to my code. Once that was done, the Equity Curve Feedback function now returns the simulated value of simulated trading system’s equity curve. It does this without DLLs or other complicated setups. With this information you can make a determination if the equity curve is above or below the smoothed equity curve. In other words, you can now turn-off or turn-on your live system based upon the equity curve!
Here is the line of code which does all the magic! That one line, highlighted with a red box, is what computes the simulated trade of your system. You can then use this information to make determinations if your system should be trading or not.
Here is section of the equity curve of the system without using the equity curve feedback.
You can see in the above equity curve we had an 83% drop in equity. Also, there is a six year lag between new equity highs. Below is the the equity curve when a 20-period simple moving average is applied. This means we only take trades when the current equity curve is above it’s 20-period simple moving average.
In this example you can see the drawdown was significantly reduced along with the time between new equity highs. I’ve created a short video demonstrating how I used the Equity Curve Feedback Tool kit with this example system.
I created a video demonstrating using the Equity Curve Feedback Toolkit here.
The short answer is, no. Trading the equity curve works well on some trading systems that have prolonged periods of drawdown. Yet, other systems don’t benefit because the drawdowns are rather shallow and you end up hurting your equity more than anything. But like most things in the world of trading, you’ll have to perform some testing. Test different moving averages and test between halting all trading or reducing contract/share size. Remember, some systems do not benefit from this technique at all.
The Equity Curve Feedback Toolkit can also be use to create even more dynamic systems. For example, you can separate your long and short equity curves. Perhaps during a bear market you should only be taking short trades. Well, you can have your system disable long trades if they stop performing well. Likewise for short trades. In this regard, you could build a regime filter based upon the performance of the strategy.
You could also dynamically adjust your risk. That is, if your equity curve begins to fall you can reduce the number of shares or contracts you trade. Maybe when the equity curve is climbing, you need to increase your risk by buying more shares or contracts. You could also start or stop trading based upon drawdown or if the percentage of winners falls below a threshold. These are all possible with this kit.