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.



6 comments:

  1. Nothing has changed in financial markets since the beginning of time. RSI is best used looking for divergences.

    ReplyDelete
  2. I did some divergence modeling a long time ago, using peak/trough patterns of the underlying vs the indicator. I always like to objectively test out ideas :)

    ReplyDelete
  3. After the crash of 1987 I back-tested many different momentum combos looking for the fewest false signals. The 12x3x3 weekly slow stochastic has stood the test of time.

    ReplyDelete
    Replies
    1. Interesting, I'll keep that in mind for future analysis.

      Delete
  4. Hi, two questions:
    1. what trading cost assumptions did you put into the analysis?
    2. Why did you only look at "oversold" opportunities. Would it not make sense to also consider "overbought" situations?
    Best

    ReplyDelete
    Replies
    1. Hi Wolfgang,
      1. I did not include trading cost. This was not a backtest simulation, just an analysis to determine the pure effectiveness of oscillators. As such it did not include concepts of starting capital, transaction cost, etc, just percentage return over time.
      2. I looked at oversold only in the article simply to keep the article simple. I developed a tool for Quantacula Studio, the Indicator Edge Analyzer, that looks at both long and short efficiency of indicators.

      Delete

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...