SP EE D B U M P: S ER G LY 1 97 5; A R T: C H R IS TI n E M O R R IS O n
The equity curve judges the success or failure of your system. What makes an equity curve good or bad? What does it take to achieve a good equity curve? We’ll take a look.
by Robert Cocchiola
echnical analysis can lead to successful trading, but only if you have a good equity curve. A good equity curve, like a bad one, is constructed from various parts of your project. The success or failure of your efforts will be revealed in the equity curve, which is the ultimate judge of your creation. Success in trading is not found in the final value of the account.
What makes an equity curve good is the way it indicates steady growth in your account without scary pullbacks. What makes an equity pullback scary? It causes loss of sleep. Your eyebrows start to fall out. You can’t eat because everything tastes like week-old flounder. But most of all, it makes you stop trading and want to kill the friend who convinced you that
What about bars? They’re filters too. Their job is to be the right type and size to absorb noise in the data and reflect patterns of meaningful change in the data.
And finally, what is the optimizer? Its purpose is to marry the bars to the algorithm by tweaking the variables in the algorithm across many iterations to generate good trades in the past and create a behavior that will carry on into the future and make you rich.
Okay! We’re all set. Go forth and subscribe to a platform. Take some courses and buy some DVDs that describe money- making systems. Plug some historical data into a chart. Plug in your get-rich-quick algorithm. Run the optimizer and start trading tomorrow. By the next week, everyone who reads this will be in receipt of a perpetual annuity and my email inbox will be flooded with all your notes of thanks, right?
I don’t think so, and here’s why that won’t happen. The proprietary trading system described on that DVD for $89 or $5,000 no doubt claims to reveal wonderful mechanisms to get you to the promised land. But I’m here to tell you that I have spent many hours with clients who spent good money on “the answer.”
Here is the truth of it. If you had a system that generated steady profits, would you:
a) Trade your account and reinvest all your profits to compound your return and become a multimillion- aire very quickly
or
b) Go through the headache of publishing DVDs containing your system so that lots of folks can use your concept against you?
Given that in every transaction on an exchange, one person just did a smart thing and the person on the other end of the trade didn’t, is the answer really b? And another thing to consider is this: If the system really is useful, how can it stay useful if 10,000 traders buy the system and begin using it, and they all get the same signals that you do, all at the same time? If all of you tried to place a buy order at the same time, who is selling, and at what price?
In my line of work, I have seen all the “unique, confidential, and proprietary” systems than I care to remember, along with the traders who believed in them. The problem is that, regard- less of platform, everybody is trying to solve the exact same problem with the exact same tools. After a suitable amount of frustration, they find themselves subconsciously fashioning a hangman’s noose, frozen with analysis paralysis, and they become desperate enough to try anything.
Z
eroinginLet’s go back and take a closer look at the tools and examine our role in using them.
The optimizer is a useful piece of software. Any lack of desired outcomes that it produces is generally caused by a discrepancy between what it does and what you hope it does. You hope that it will place your algorithm on steroids
TRADING TECHNIQUES
and conquer the market. But what it really does is fairly straightforward: It manipulates parameters to find the least objectionable configuration of an algorithm. The task boils down to creating an aperture, using your supplied bars and algorithm, which will allow the most hopeful data patterns to pass through while blocking the most objectionable. The difficulty is that objectionable data occurs above and below the desirable data. So as it changes your filter’s amount of acceptance and sets the thresholds higher or lower, it is simul- taneously rejecting certain nasty data that was out of reach, while readmitting data that was previously rejected on a prior iteration. When it finishes, it presents the least objectionable result. Generally, this result is only ideal for very little of the data, even though you thought that you would get ideal set- tings. You are thinking positively while the tool is working somewhat negatively.
So what can you do? Think negatively. If you understand its limitations, you can partner with it and remove some of the burden. The single most effective thing I’ve seen is a do not
trade indicator. It is part of the logic that identifies patterns in
the data where no trade should be attempted. In order to design this logic, you must understand what behavior your formula needs to succeed and focus on blocking as much as possible of the data structures that it can’t reasonably handle before asking the optimizer to find compromise. So first, you need to build the positive formula that does what you want it to do.
Next, look at the bar size of the data. What’s going to happen to your algorithm if it hits a patch of big bars? How about a patch of small bars? How about a sequence of three bars up and then three bars down? Any of these conditions and many more can generate losses based on the needs and vulnerabilities of your formula. Note that many formulas don’t like bars that are too big or too small, just like the proverbial Goldilocks, and the optimizer will try to adjust the thresholds to accommodate this. Think of the potential assortment of bars and sizes as Goldilocks’ 3,000 bears. You’ve got to find the “bed” that’s just right or you’ll wake up in a painful state indeed.
W
hichoneis“
jusTrighT”?
The optimizer doesn’t have your brain power or your knowl- edge of what you’ve built. One possible scenario is that you may have a productive set of parameters that produce some nice trades when they are in their element. Unfortunately, when bars of a dangerous configuration are evaluated during optimization, the damage exceeds the good. The optimizer will then walk away from this setting. Remember the concept of the least objectionable behavior. If you can eliminate the dangerous bars for the optimizer, then it might find that the current iteration has now become a sweet spot.
For index futures and all stocks, the potentially nastiest bars can come at 9:30 am US Eastern time (ET). That’s the open of the US markets. If your algorithm finds this data to be unpre- dictable and consequently draws you into bad trades, then block trading at this time until the market settles. One of the quietest times is around 1:00 pm ET. Apparently, people take a break or eat lunch or get up and stretch. Whatever the cause, that time is
much calmer than the open. So pick your poison. Avoid trading times that scare your algorithm. Use hard-fixed rules to offload that headache from the optimizer.
How can you identify data that is too aggressive or too bland? Consider the ATR (average true range), the RSI (relative strength index), the r from linear regression, the relationship between two moving averages, and the current bar’s high, low, and close. I can’t offer specific formulas here because they depend on knowing the strengths and weaknesses of the rest of your logic.
Here’s a brief statement about expectations. Trend-following methodologies tend to have win/loss ratios in the vicinity of 30–35%, while scalps or reversion-to-mean strategies tend to have higher win/loss ratios. Keep in mind that the trend- followers need to score some decent trends to make up for all the losers. Meanwhile, in the mean reversions, you’ll win more trades but the duration of a pullback is shorter, which limits your profit, and when your trade fails, the size of your loss will be substantially larger.
Y
ouandYouropTimiZer:
a
liTTlehelpforYourfriendWhat else can you do to help your optimizer? You could fix the bars. Bar data consists of signal and noise. Signal is a col- lection of bars moving in one direction. Noise is one or more bars that go the other way without starting a reverse trend. Bars come in types and they absorb data to create signal patterns and noise traps. The usual bar types are time-based (for this discussion, we’ll consider minute bars and hourly bars only), range bars, volume bars, and renko bars.
Time bars absorb everything in their time frame. If you have two minutes of signal data and three minutes of noise data and if this occurs continuously within the confines of a five-minute boundary, then congratulations, you’re going to be rich! You will put up a five-minute chart and it will be noiseless. All you have to do is trade the trends. They will be obvious.
Of course, as we know all too well, that’s not going to happen. So observe this: A time bar in a tight time frame will usually be compatible with all other same-sized time bars in the same-time window. That is, you could possibly get good results from a strategy based on time bars that run from 9:45 am ET to 10:15 am ET because the volatility and trading ranges will be similar across days. By confining the times, you offload some of the burden from your partner, the optimizer. If you would like to continue trading, optimize a second strategy for the next hour. Again, the teamwork between you and your optimizer will pay off.
Now take a good look at your main logic. Observe the lag
in the functions that you use and also the minimum window size needed for a successful trade. If your function uses a 10- bar simple moving average either explicitly or internally like a Bollinger Band, it will generate five bars of lag. This means that something that you care about will occur and you won’t be able to recognize it for five bars. So if you’re going to put on a trade — and this is part of the logic — then you will need to move five bars in a direction to get in and then five bars the other way to get out. You’re going to need a data stream of at least six or seven bars in one direction to have time to get in and out and still be able to harvest something. Remember that your logic is held back by the function with the worst lag.
W
haTcanYou doabouTThis?
Smaller bars will generate longer sequences for a directional move at the expense of releasing more noise as data. Range, volume, and renko bars can replace time bars and generate longer sequences while absorbing more noise than their time-based counterparts. The bottom line is that for any collection of data (defined at the tick level of a symbol), there is only one type of bar in only one size that will give the best result for one of your algorithms. You can turn that around and realize that your concept will work best with a certain bar type and size and will disappoint if used in the wrong environment. If you think that your idea is not performing as it should, hold the idea steady and change bar types and sizes along with the time window and observe the variety of results that can come from a single recipe and a given dataset.
T
hepoWerofTheequiTYcurveFinally, we come to the fruit of our labor: the equity curve. This is the bar-by-bar accounting of the cash value of your portfolio. The straightness of the equity growth is far more important than the final value of the account. If you have a daytrading system that yields $30,000 a year and never pulls down the equity by more than $300, then you’re good. You can sleep well and have confidence that you’ve built a bullet- proof system. Take a second mortgage on the house, sell the dog and cat, and get the kids to start a lemonade stand to raise cash for you to trade with. In other words, bet the farm. Put as much money as possible into slow, steady, and safe growth and you will achieve the best results.
However, if you only focus on the final account value, you might drown. A system with a final yearly return of $60,000 may be hazardous to your health. Many times, a system will achieve a high level of profit midway through the out-of-sample period and then give back half of it near the end of the data. This is something you must consider.
Say a system started at zero, then ran up to $120,000, and then down to $60,000. If you began using this system near its $120,000 high point, by the end of the period, the system would show a nice net profit of $60,000, but you would have