Much ink has been devoted to pinpointing the causes of mechanical trading systems failures, especially after the fact. Although it may seem oxymoronic (or, to some traders, simply moronic), the main reason why these trading systems fail is because they rely too much on the hands-free, fire-and-forget nature of mechanical trading. Algorithms themselves lack the objective human oversight and intervention necessary to help systems evolve in step with changing market conditions.
Mechanical trading systems failure, or trader failure?
Instead of bemoaning a trading-system failure, it’s more constructive to consider the ways in which traders can have the best of both worlds: That is, traders can enjoy the benefits of algorithm-managed mechanical trading systems, such as rapid-fire automatic executions and emotion-free trading decisions, while still leveraging their innate human capacity for objective thinking about failure and success.
The most important element of any trader is the human capability to evolve. Traders can change and adapt their trading systems in order to continue winning before losses become financially or emotionally devastating.
Choose the right type and amount of market data for testing
Successful traders use a system of repetitive rules to harvest gains from short-term inefficiencies in the market. For small, independent traders in the big world of securities and derivatives trading, where spreads are thin and competition fierce, the best opportunities for gains come from spotting market inefficiencies based on simple, easy-to-quantify data, then taking action as quickly as possible.
When a trader develops and operates mechanical trading systems based on historical data, he or she is hoping for future gains based on the idea that current marketplace inefficiencies will continue. If a trader chooses the wrong data set or uses the wrong parameters to qualify the data, precious opportunities may be lost. At the same time, once the inefficiency detected in historical data no longer exists, then the trading system fails. The reasons why it vanished are unimportant to the mechanical trader. Only the results matter.
Pick the most pertinent data sets when choosing the data set from which to create and test mechanical trading systems. And, in order to test a sample large enough to confirm whether a trading rule works consistently under a wide range of market conditions, a trader must use the longest practical period of test data.
So, it seems appropriate to build mechanical trading systems based on both the longest-possible historical data set as well as the simplest set of design parameters. Robustness is generally considered the ability to withstand many types of market conditions. Robustness should be inherent in any system tested across a long time range of historical data and simple rules. Lengthy testing and basic rules should reflect the widest array of potential market conditions in the future.
All mechanical trading systems will eventually fail because historical data obviously does not contain all future events. Any system built on historical data will eventually encounter ahistorical conditions. Human insight and intervention prevents automated strategies from running off the rails. The folks at Knight Capital know something about live trading snafus.
Simplicity wins by its adaptability
Successful mechanical trading systems are like living, breathing organisms. The world’s geologic strata are filled with fossils of organisms which, although ideally suited for short-term success during their own historical periods, were too specialized for long-term survival and adaptation. Simple algorithmic mechanical trading systems with human guidance are best because they can undergo quick, easy evolution and adaptation to the changing conditions in the environment (read marketplace).
Simple trading rules reduce the potential impact of data-mining bias. Bias from data mining is problematic because it may overstate how well a historical rule will apply under future conditions, especially when mechanical trading systems are focused on short time frames. Simple and robust mechanical trading systems shouldn’t by affected by the time frames used for testing purposes. – The number of test points found within a given range of historical data should still be large enough to prove or disprove the validity of the trading rules being tested. Stated differently, simple, robust mechanical trading systems will outshine data-mining bias.
If a trader uses a system with simple design parameters, such as the QuantBar system, and tests it by using the longest appropriate historical time period, then the only other important tasks will be to stick to the discipline of trading the system and monitoring its results going forward. Observation enables evolution.
On the other hand, traders who use mechanical trading systems built from a complex set of multiple parameters run the risk of “pre-evolving” their systems into early extinction.
Build a robust system that leverages the best of mechanical trading, without falling prey to its weaknesses
It’s important not to confuse the robustness of mechanical trading systems with their adaptability. Systems developed based on a multitude of parameters led to winning trades during historical periods – and even during current observed periods – are often described as ‘robust.’ That is no a guarantee that such systems can be successfully tweaked once they have been trade past their “honeymoon period.” That is an initial trading period during which conditions happen to coincide with a certain historical period upon which the system was based.
Simple mechanical trading systems are easily adapted to new conditions, even when the root causes of marketplace change remain unclear, and complex systems fall short. When market conditions change, as they continually do, the trading systems which are most likely to continue to win are those which are simple and most-easily adaptable to new conditions; a truly robust system is one which has longevity above all.
Simple algorithmic mechanical trading systems with human guidance are best because they can undergo quick, easy evolution and adaptation to the changing conditions in the environment (read marketplace).
Unfortunately, after experiencing an initial period of gains when using overly-complex mechanical trading systems, many traders fall into the trap of attempting to tweak those systems back to success. The market’s unknown, yet changing, conditions may have already doomed that entire species of mechanical trading systems to extinction. Again, simplicity and adaptability to changing conditions offer the best hope for survival of any trading system.
Use an objective measurement to distinguish between success and failure
A trader’s most-common downfall is a psychological attachment to his or her trading system. When trading-system failures occur, it’s usually because traders have adopted a subjective rather than objective viewpoint, especially with regard to stop-losses during particular trades.
Human nature often drives a trader to develop an emotional attachment to a particular system, especially when the trader has invested a significant amount of time and money into mechanical trading systems with many complex parts which are difficult to understand. However, it’s critically important for a trader to step outside the system in order to consider it objectively.
In some cases, the trader becomes delusional about the expected success of a system, even to the point of continuing to trade an obviously-losing system far longer than a subjective analysis would have allowed. Or, after a period of fat wins, a trader may become “married” to a formerly-winning system even while its beauty fades under the pressure of losses. Worse, a trader may fall into the trap of selectively choosing the testing periods or statistical parameters for an already-losing system, in order to maintain false hope for the system’s continuing value.
An objective yardstick, such as using standard deviation methods to assess the probability of current failure, is the only winning method for determining whether mechanical trading systems have truly failed. Through an objective eye, it’s easy for a trader to quickly spot failure or potential failure in mechanical trading systems, and a simple system may be quickly and easily adapted to create a freshly-winning system once again.
Failure of mechanical trading systems is often quantified based on a comparison of the current losses when measured against the historical losses or drawdowns. Such an analysis may lead to a subjective, incorrect conclusion. Maximum drawdown is often used as the threshold metric by which a trader will abandon a system. Without considering the manner by which the system reached that drawdown level, or the length of time required to reach that level, a trader should not conclude that the system is a loser based on drawdown alone.
Standard deviation versus drawdown as a metric of failure
In fact, the best method to avoid discarding a winning system is to use an objective measurement standard to determine the current or recent distribution of returns from the system obtained while actually trading it. Compare that measurement against the historical distribution of returns calculated from back-testing, while assigning a fixed threshold value according to the certainty that the current “losing” distribution of mechanical trading systems is indeed beyond normal, to-be-expected losses, and should therefore be discarded as failed.
So, for example, assume that a trader ignores the current drawdown level which has signaled a problem and triggered his investigation. Instead, compare the current losing streak against the historical losses which would have occurred while trading that system during historical test periods. Depending upon how conservative a trader is, he or she may discover that the current or recent loss is beyond, say, the 95% certainty level implied by two standard deviations from the “normal” historical loss level. This would certainly be a strong statistical sign that the system is performing poorly, and has therefore failed. In contrast, a different trader with greater appetite for risk may objectively decide that three standard deviations from the norm (i.e. 99.7%) is the appropriate certainty level for judging a trading system as “failed.”
The most important factor for any trading systems’ success, whether manual or mechanical, is always the human decision-making ability. The value of good mechanical trading systems is that, like all good machines, they minimize human weaknesses and empower achievements far beyond those attainable through manual methods. Yet, when properly built, they still allow firm control according to the trader’s judgment and allow him or her to steer clear of obstacles and potential failures.
Although a trader can use math in the form of a statistical calculation of standard distribution to assess whether a loss is normal and acceptable according to historical records, he or she is still relying on human judgment instead of making purely-mechanical, math-based decisions based on algorithms alone.
Traders can enjoy the best of both worlds. The power of algorithms and mechanical trading minimizes the effects of human emotion and tardiness on order placement and execution, especially with regard to maintaining stop-loss discipline. It still uses the objective assessment of standard deviation in order to retain human control over the trading system.
Be prepared for change, and be prepared to change the trading system
Along with the objectivity to detect when mechanical trading systems change from winners into losers, a trader must also have the discipline and foresight to evolve and change the systems so they can continue to win during new market conditions. In any environment filled with change, the simpler the system, the quicker and easier its evolution will be. If a complex strategy fails, it may be easier to replace than to modify it, while some of the simplest and most-intuitive systems, such as the QuantBar system, are relatively easy to modify on-the-fly in order to adapt to future market conditions.
In summary, it can be said properly-built mechanical trading systems should be simple and adaptable, and tested according to the right type and amount of data so that they will be robust enough to produce gains under a wide variety of market conditions. And, a winning system must be judged by the appropriate metric of success. Instead of merely relying on algorithmic trading rules or maximum drawdown levels, any decision about whether a system has failed should be made according to the trader’s human judgment, and based on an assessment of the number of standard deviations of the system’s current performance when measured against its historic-test losses. If mechanical trading systems are failing to perform, the trader should make the necessary changes instead of clinging to a losing system.
A few comments.
Just because a system worked 20 years ago doesn’t mean it should work today. Be careful when you suggest testing a system over a long period. How long is long?
Likewise, how simple is simple? Four rules with a total of four variables? Seven rules with a total of ten variables? I will generally agree that simpler is better but what is simple?
Using the standard deviation of returns should provide similar conclusions to running a Monte Carlo analysis which is not difficult with software that is available. With a MC analysis, as you are aware, one can see the possible returns and possible drawdowns. The future doesn’t have to resemble the past but a MC analysis is one way to test a system.
Easy to give guidelines hard to develop a system with an edge……….and hardest to trade..
if possible share some variable 2 make a trading system.
for simplicity sake make it simple
Buy Rules
Exit Rules (Stops or Profit Exit)
Short Rules
Short Exits (Stops or Profit Exit)
Stay out (if required as per system)
position size (considering max. drawdown)
Thats it… can add any piece of advice u want…
Hello guys
Thanks for the post, I agree with many things that you mentioned. And besides, gives me a couple of ideas to try.
Best regards
Hi All!
Shaun, i agree.. focusing on not losing is a very important success of success.
Tarun, an EA that i have built that is very successful uses a simple pivot point swing trading strategy. A custom indicator of my own gives me a premarket bias (up or down) and my trigger for entry is market price within a 2 pip range of the main daily pivot. exit strategy is simple too, price will either stop out or close half the position at Support1 or Resistance1. Stoploss is then moved to break even. Price will then stop out or reach S2 or R2 at which point half the remaining position is closed again, stoploss is moved to S1 or R1. Price will then stop out or move to S3 or R3 at which point the remaining position is closed.
– That simple strategy is worth 1million dollars over a 15 year period.. free, my pleasure. most people wont do anything with this info anyway lol.
The Dilema:
Simple strategy, highly complicated EA. why? because every strategy has limits and knowing what causes it to fail is the first step to “focusing on not losing”. aka, put meausures in place to anaylize the market and make your EA either shut off or adapt when the market is acting in ways bad for your strategy.
also, R/R, balance protection and using a LOT scale makes the EA pretty complex but its well worth the effort. combine a simple strategy with a detailed managment system inside of a complex EA is worth 50million over 15 years. Dont expect this kind of system to come together over night, i spent 2 years building mine but its been a very exciting journey. If you’re passionate about trading and EA’s just dont give up. stay focused and keep learning.
Good Luck!
Indeed. You could publish most strategies in the newspaper. Almost nobody would do anything with it.
I love the emphasis on “not losing” rather than winning. You’re speaking my language!
I would add 3 points to consider when evaluating the performance of programmed trading systems. First of all when back testing a system in MetaTrader it is important to remember that MT4 does not provide a true tick data stream. It merely simulates the tick data by using data bars stored in the History Center, This means that very recent price history may be constructed from 1 or 5 minute bars and history farther out may be constructed from 15 or 30 minute bars. Running tests over periods of several years may force MT4 to simulate the tick data using bars of even larger time periods. This is whyyou will see many performance tests which were run in MetaTrader over a several year periods that have a characteristic curve. There is a steeply profitable curve in the early years and a flat to losing curve in the recent time period. If the system was run on the true tick data most likely it would perform poorly throughout the testing period because the early years were simulated on 15M or 30M bars and were less volatile than the actual price action of the period.
Secondly, most of the people who design trading systems tend to over optimize their system to maximize the profit obtained during the time period which was used to test the system. As an example let’s say the system designer tested his system over a 5 year period. The natural inclination is to tweak the variables to maximize the profit. The thought process goes something like this: If the system produces a 50% profit and a 2.5 profit factor over this test period then I should get at least an acceptable performance in real time use. Believe me this is the kiss of death in EA programming and the reason so many commercial expert advisers fail. The customer buys into the profitable performance during the back testing period and then inevitably loses when he tries to run the EA with real money. Proper back testing attempts to find the true average performance of the EA based on several testing periods.
Finally, there is the problem that was touched on in the article of knowing if the results you are experiencing are statically valid. Of course as Mr. Flower states if a losing streak is outside 2 standard deviations then chances are something has changed. I would like to point out that the distribution of winning and losing trades is always random and determined by the overall percentage of winners or losers in a sample of trades assuming that it is large enough to be statically valid. To give an example let’s say your system requires a 50% win rate to be profitable. Well, we already know from flipping a coin that has the same 50% win rate that the winners and losers will tend to clump together in winning streaks and losing streaks. Further more we know from the study of statistics that the distribution of winners and losers in the EA with a 50% win rate will be the same as the distribution obtained from tossing a coin. Namely, there will be in a group of 1000 trades on average 8 losing streaks of 5 losers in a row and 8 winning streaks of 5 winners in a row. Similarity in a group of 1000 trades you should also see on average of 4 losing and winning streaks of 6 in a row, 2 losing and winning streaks of 7 in a row and 1 winning and losing streak of 8 and 1 winning and losing streak of 9 in a row.
It is important that the user has a realistic idea of size and number of losing streaks he WILL encounter using the EA. Otherwise he will surely give up and quite the first time he encounters an expected losing series of trades.
Hey Mike,
That’s one of the many reasons that I don’t test anything in MetaTrader. I only use it for live trading. The weak data and inability to test portfolios makes it unusable for my purposes.
You’re right about over-optimizing. The easiest way to avoid this is to minimize the number of parameters in your strategy. I only have 4 in my Dominari strategy, for example.
Thanks for the detailed thoughts!
WOW! I liked it, good thoughts
Thanks.
Hi Trader mates – I simply follow Sam Seiden’s Suppl-Demand approach coupled with Candlestick analysis – works like pure magic. I follow the golden rule of “minimizing losses and leaving profits to run”. Been trading like this for 6 years with consistent INCREMENTAL GROWTH month after month (sometimes small, sometimes big, but always ticking upwards). For me these are the “simple keys” to succeed over the medium to long term.
Slow and steady wins the race.
Where’s that indicator for the hourly where it triggers an entry one stick before? Can’t find it anywhere, does it still work? It has like a bottom graph and let’s you know to get in on the next candle for one candle’s time for that amount of profit, I remembered a while back seeing alot about it from you, but haven’t seen it since and I think I was going to try it out! Regards 🙂
Hey Corinna,
You’re referencing the SB Score. Please let me know what you think of it!