At a recent meeting of the Quantopian staff journal club, I presented a paper by Andrew Lo, Harry Mamaysky, and Jiang Wang called Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation (2000). In this paper, the authors utilize non-parametric kernel regression to smooth a stock's daily price time series to a point where the local minima and maxima that a human technical analyst would find relevant can be separated from noisier short-term price fluctuations. The authors then search these denoised local minima and maxima for the patterns commonly pursued by technical analysts. Once they've identified occurrences of particular patterns, the authors test their predictive power by observing the subsequent forward return on the stock.
For a fuller explanation of what is going on in this notebook, I encourage you to take a look at the original paper: https://www.cis.upenn.edu/~mkearns/teaching/cis700/lo.pdf
It is interesting to note that since this paper was written in 2000 and all the data used in my implementation is from 2003-2016, my results can be considered to be "out of sample" with respect to the authors' findings.
As I discuss in the notebook, one of my concerns with the author's methodology is the introduction of lookahead bias via the kernel regression. I'm eager to see how these technical patterns perform as predictors when implemented in an actual trading algorithm. (I'd love some help getting this analysis running as an algorithm on Quantopian.) I imagine we could use Pipeline to scan for patterns on a 40 day lookback window for a large universe of stocks. I'd also be interested to see how this pattern detection works when we smooth price timeseries using an exponential moving average instead of kernel regression.
If you're not familiar with research notebooks, what you need to do is click "Clone Noteook" (you need to be logged in first) and then you can page through the step-by-step of my analysis. You can also "run cell" from the beginning and reproduce all of the results that I did.