Thursday, January 4, 2018

RSI - King of Oscillators

Which technical indicators work and which don't?  How can we objectively measure their effectiveness?  I just completed an interesting analysis of technical oscillators over several sets of historical data.  I calculated the oscillators' "Edge Factor" -  dividing the average 5-day return of buying the market when the oscillator is oversold by the average 5-day return of the entire universe of historical data.

Why Oscillators?


I analyzed technical oscillators because of their standardized overbought and oversold levels.  There is a commonly accepted interpretation that when a technical oscillator is below its oversold level this presents a buying opportunity.  Of course, it can be more complicated than that, and technicians often seek confirmation, but the very word "oversold" means that the underlying is due for a rebound.

Analysis Basis


I first determine the overall 5-day return of the entire universe of historical data by processing each bar of history.  In my analysis I used daily data, so each bar of data represents one day.  I generate a profit value by subtracting the closing price at bar+5 from the open price at bar+1, and then converting this to a percentage profit.  I use this bar+1 method to simulate taking a position on an indicator/oscillator value that is available when bar+0 is completed.

I add all of the percentage profits together, and then divide by the total number of occurrences (observations) in the historical data.  In this way I arrive at the average 5-bar % return of the underlying universe of historical data.

Next I perform a similar process, but I only consider bars of data that occur when the oscillator in question is below its oversold level.  We would hope that the average profit in this case is higher than the average profit of the overall market, and I found this to be the case for all the oscillators I tested (except for some of the oscillators on the S&P100).  I divide this value by the average return of the universe to determine the oscillator's "Edge Factor".

Universes Tested - Survivorship Bias


I created this analysis using Quantacula Studio, and if you wish to reproduce it be sure to have at least the Q99 build.  I performed the analysis on the Dow 30, S&P 100, and Nasdaq 100 over a ten year period, using the Q-Premium data.  Note that this data correctly uses the historical components of the respective indices, eliminating survivorship bias from the analysis.  The Quantacula Studio code for this analysis can be found in this Discussion Forum post.

Results


Here's a table that summarized the Edge Factors of the oscillators on the different historical data sets.


RSI was the clear king of oscillators in this analysis, at least using the parameters and historical data that I tested with.  Drop me a note if there's another oscillator you'd like to see added to this analysis.  And download Quantacula Studio (with 30 day free trial) to try this analysis for yourself.  I'll be producing a YouTube video shortly that describes how step by step.



Crypto Rotation Model

In a previous post I published results of an analysis I performed on oversold technical oscillators.  I ran this test on the historical dat...