Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
$FB RSI Strategy

This post is part of a broader series on technical analysis available on my website, www.andrewshamlet.net .

Feel free to reach out with comments or questions: [email protected] // @andrewshamlet

Summary

The Relative Strength Index (RSI) is a momentum indicator that compares the magnitude of recent gains and losses over a specified time period. RSI values range from 0 to 100.

For this strategy, we buy $FB when the RSI is less than 30, and we will sell $FB when the RSI is greater than 70. The RSI will be calculated at a minutely frequency, as opposed to a daily frequency.

  • During 01/01/16 – 12/31/16,

    • The RSI Strategy produces 32.2% return, resulting in $3,220 pre-tax return.
    • FB Buy & Hold produces 10.0% return, resulting in $1,000 pre-tax return.
    • SPY Buy & Hold produces 12.0% return, resulting in $1,200 pre-tax return.
    • Compared to the SPY Buy & Hold, the RSI Strategy produces $2,220 Alpha whereas FB Buy & Hold produces ($200) Alpha, both on $10,000, principal.
4 responses
  • During 05/19/12 – 12/31/16,

    • The RSI Strategy produces 147.4% return, resulting in $14,740 pre-tax return.
    • FB Buy & Hold produces 238.5% return, resulting in $23,850 pre-tax return.
    • SPY Buy & Hold produces 89.6% return, resulting in $8,960 pre-tax return.
    • Compared to SPY Buy & Hold, the RSI Strategy produces $5,780 Alpha whereas FB Buy & Hold produces $14,890 Alpha, both on $10,000 principal.
    • Thus, on the broader time horizon, FB Buy & Hold outperforms the RSI Strategy.
    • The question still stands: what about 2016 makes the RSI Strategy superior in performance to FB Buy & Hold?

Compared to the SPY Buy & Hold, the RSI Strategy produces $2,220 Alpha
whereas FB Buy & Hold produces ($200) Alpha, both on $10,000,
principal.

The real beauty of the RSI strategy is that for most of the timeframe that $10,000 principle can be working (on other stocks) for you while you wait for the buy signal.

The question still stands: what about 2016 makes the RSI Strategy superior in performance to FB Buy & Hold?

Luck. And hindsight. That's my best guess.

My second guess is that RSI works best in conjunction with other indicators. 30 and 70 aren't the only aspects to RSI as far as I understand. If RSI steadily stays above 40, that's also a bullish indicator, so in that sense all of 2012-16 the RSI is telling you to buy and hold. Then there are the moments where RSI's valleys move opposite the stock. I don't know. I think it's a lot of hocus pocus.

My own experiments with RSI show it's a great way to lose money during crashes and pullbacks and miss out on gains during strong bullish trends. Sometimes it's amazing how it predicts valleys and peaks right before they happen... and sometimes it's flat out wrong. With some stocks it just bleeds money. So how do you choose which stocks are appropriate to use RSI with?

Is it possible to code that for futures?

I can't seem to get all Futures contracts to run and RSI is indicator to initiate long and short positions