Monday, February 21, 2011

Trading the STI with RSI - Student's Post

Having looked at Bollinger’s bands it is relatively elementary to adapt the backtesting code to test RSI. Thus the opportunity must not be refused.
Theoretical discussion
Since both portend reversals  by exceeding a certain limit I suspected some kind of mathematical similarity between them, but could not prove it. However the mathematically inclined will note the close similarity between taking EMA(U,n) and EMA(D,n) for the RSI and taking  for the Bollinger Band. Based on rough, back of the envelope calculations the standard 30-70 Band for RSI seemed to translate into only a ~1 S.D. Bollinger Band, which means that RSI trading would tend to be more active than BB trading (as the prices cross the bands more often) and perhaps not as profitable.
Testing the RSI
A few things were of interest to me:
  • Does RSI make money with “normal” rules or with “inverted” rules?
  • Does RSI improve if we change the length of periods?
  • Does RSI make money on short and long legs?
Saving my usual chart-filled melodrama, here are the summary statistics (backtesting RSI trading on STI from 1975 to present):

  • Just like Bollinger Bands, it is necessary to “invert” all buy and sell signals in order to make money. (the “window” tests you see have all inverted their signals as well) The “Normal Rules” trading loses 92.8% of its money over time.
  • Inverted RSI makes some but not much money on the short leg; however adding the short leg to the long adds another 3.2% per year. Using the inverted rules for RSI trading also turns strategy returns into positive skew – this is a very nice feature to have.
  • A smaller window (5 day) performs better than the normal 14 day window (“Inverted Long”) and both do much better than a larger window (25 day). Window lengths beyond 50 days show no appreciable advantage over buy and hold.
Because PDT cares about data visualization though, here is the chart (based on the principle that one picture is worth a thousand charts) (note, on these charts I plot the results from 1990-present, just to see if any of the results have changed in more recent times; i could equally do the charts from 1975-present, but that would literally not add any information to the table above.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...