When Technical Analysis is Not Appropriate for Algorithmic Trading (Part 2)
Posted by Mark on October 17, 2019 at 11:54 | Last modified: April 15, 2020 07:36Technical analysis (TA) is sometimes a bad fit for algorithmic trading. I left off discussing the challenge of using a computer for identification because trendline definition is very subjective.
A corollary to trendline subjectivity is that any price pattern based on trendlines will also be subjective. This includes pennants, flags, wedges, triangles, cup and handles, [inverse] head and shoulders, double tops [bottoms], etc. While all these may look perfect in hindsight, how the trendlines are drawn will determine the [absence of] price patterns seen at the right edge of the chart. The trendlines define trade triggers for breakouts and breakdowns. The “art” of TA is whether to require exacting measures or what fudge factor to use, which will then give rise to multiple ways to draw/view the patterns. What works for one instance may not work for another and in no instances would a computer ever accept such fuzzy logic in the first place.
Subjectivity is not suitable for algorithmic trading. Computers understand true or false with nothing in between. Any number of people studying a suitable algorithmic script should be able to process it in exactly the same way (assuming they all have adequate intelligence to understand its complexity). Objectivity has validity in algorithmic trading: subjectivity dose not. EWT is subjective and invalid. Trendlines are subjective and invalid. Price patterns based on trendlines are subjective and invalid.
Strategies with a future leak—another description of hindsight bias—are invalid. A future leak is when future data is used to make a determination. Imagine going back four weeks and buying or selling depending on what happened two weeks ago. I can do this in backtesting because I have the subsequent data. Things fall apart at the right edge of the chart, though:
“Should I buy or sell today? It depends on what happens two weeks from now.”
That makes no sense! I can’t wait two weeks to decide what to do now because if I wait two weeks, then I’m two weeks late to do what I needed to do in the first place.
As mentioned in this first paragraph, trade like you backtest. If we can’t do that, then we have no valid trading strategy at all.
One of my research ideas is to look at MAE distributions to test for significant differences between large sample sizes. This may be a useful data mining tool (something I will talk about in later posts), but it is not acceptable as a trading strategy because it contains a future leak; MAE can only be calculated once the trade is completed.