The “SPY RSI No Lie” Swing Trade System

She's thinking about how financial blogs can be a bit boring when they have too many graphs.
She’s thinking about how financial blogs can be a bit boring when they have too many graphs.

 

Here’s a free system for you. I call it the “SPY RSI No Lie” system. It’s called that because I like stupid titles, and internal rhymes are an added plus.

I read a post on Jeff Swanson’s System Trader Success recently about using a short-period RSI value to trigger trades with the S&P 500. Jeff’s post was more from a theoretical standpoint, as it used the SPX index (rather than a tradable ETF or future) and also traded on the same day the RSI is calculated. The index issue is easily translated to SPY or an equivalent ETF. Calculating the RSI of the day before the day is actually finished is, well, technically impossible. But in practice, it’s doable in a sort of almost/kinda/fuzzy-round-the-edges sort of way. I thought I’d take a look at an easily tradable system.

This system was optimized on the period of 2000-2013, and then confirmed with out-of-sample data from 2014 through April of 2016.

The system:

• $1500 position size (rounded down to whole shares), $30,000 account size.
• no commissions or fees (yeah I know, we’ll get to that.)
• Calculate the two-period RSI for the day, after the close.
• signal is when the RSI value falls below 28.
• Buy at the next open.

Exit:

• calculate the 7-day moving average of the closing price.
• Sell at the close, when the close is above the previous day’s moving average. Note: this can be a same-day trade.

That’s it! Pretty simple. So let’s take a look at some graphs.

SPY RSI no lie 2000-present 1500 015

Above is the full set of data from 2000 to April 2016, so it includes the in-sample and out-of-sample periods together.SPY RSI no lie 2014-present 1500 015

And this is the out-of-sample period. It’s bumpier because the resolution is finer, but it still trends nicely in the right direction. A winner, right?

But wait, what if we throw in some commissions? Our trade size is <=$1500, but what if we’re paying $4.95 each leg of a trade? How does our system work then?

SPY RSI no lie 2000-present 1500 4_95

Well hey, that looks like garbage!

SPY RSI no lie 2014-present 1500 4_95

And as we zoom in, it still looks like garbage! Commissions are eating up our profits. Which is why you should open a brokerage, because that’s where the real money is…

If you happen to be comfortable risking more than $1500 per trade, you can make the effects of those commissions disappear (almost). I ran an optimization on the position size for this system, and here’s what it looks like:

SPY RSI no lie 2014-present opt 4_95The system doesn’t become profitable until a position size of $2000, but even then it’s just break even. To get the most bang for the buck, you probably want a $10,000 position size.

What if we traded a 3x ETF like UPRO instead? Would that be better?

UPRO RSI no lie 2009-present 1500 4_95

It’s better than buying SPY with that position/commission size. But the total profit is less (even with the 3x leverage). And you can see 2015 looks like it’s rounding off and heading back the wrong way.

UPRO RSI no lie 2014-present 1500 4_95

The OOS period is profitable, but only just.

There is, however, a solution to this problem.

Robinhood.

Robinhood is a brokerage that you use primarily on your mobile device. And their main selling point: zero commissions.

A quick aside here: I don’t work for them, they’re not paying me, heck they don’t even know I exist. I get nothing for saying this. But it’s such a game-changer to  trade with zero commissions, that I just have to mention it. Yes you do still have to pay the exchange fees, but that works out to about 2¢ per trade. This means you can trade with incredibly tiny positions, or use systems that make many incremental and small profits, and not suffer the drag of commissions.

Below is the system trading with SPY and a $1500 position size, but using a $0.03 fee instead of a $0.02 fee…just to be safe.

 

SPY RSI no lie 2000-present

Looks a lot like our original system, doesn’t it?

SPY RSI no lie 2014-present

And our OOS sample set too. Nice.

That said, Robinhood is a strange beast in some ways. You can set limit orders, stop orders and stop-limit orders. But you can’t do a market-on-close order! I find that incredibly frustrating, because I want the official closing price, not some price that’s sort of near it. This also means I have to be available around 1pm PST to make my trade, which adds a little stress.

You can of course do a market-on-open order, just by placing your order in the after-hours period. What about limit-on-open and limit-on-close orders? Forget about it.

That said, I’ve changed the way I develop my trading systems now. I have two tracks: those that make money with “old fashioned” commissions, and those that make money with zero commissions. I haven’t put all my financial eggs in one basket yet, nor am I likely to. But it sure does give me options like the system above! (No, Robinhood doesn’t do options…)

12 thoughts on “The “SPY RSI No Lie” Swing Trade System”

  1. Also, Robinhood doesn’t have margin accounts. So tying up your funds as you wait for trades to settle will definitely put the brakes on any very active trading.

    1. Hi Mark and thanks for your comment! True about margin accounts. However they will be shortly introducing a sort-of margin, in that you’ll be able to reinvest the proceeds of a sale immediately, without having to wait the three days for settlement, and without interest. This will will remove that impediment (although those using this “instant” service will be subject to “pattern day trader” rules.)

  2. 10% over 16 years? Why not do a 10-year CD (Vanguard’s current rate is 2.15%) and then let the money collect dust after the 10-year term?

    1. In a word: compounding.
      In two words: reduced risk.

      My testing almost always uses a fixed position size per trade, rather than letting the position size get bigger and compounding the results. This allows me to compare system performance more easily. In reality however, I’m going to invest more as my account grows. When you let this system compound the returns, it picks up buy-and-hold by the tail, smacks it three times and then shoves it down a flight of stairs.

      If you bought $30,000 of SPY at the beginning of 2000 and held it until the present, you’d have some decent money. Your ending capital would be $42,148, which is a return of 40.49%. Pretty decent.

      If you started using the SPY RSI No Lie system with that same $30,000 at the start of 2000, and kept reinvesting your entire account each time (i.e. compounding), your account would be $257,332 by now. That’s a gain of 857.77%. And that includes your transaction costs of $13.98 for the total of 466 trades you made. Just checking with my calculator and…yup…$257,332 is better than $42,148.

      Let’s talk about drawdowns. Buy-and-hold has been a bumpy ride since 2000. Your account at one point would have been 56.24% under water. The worst drawdown using the SPY RSI No Lie system was 23.73%. Your risk is lower, partly because you’re only in the market 37% of the time, rather than 100% of the time.

  3. You are correctly focused on the cost of trading. But why not calculate the signal 10 mins prior to close, and trade commission-free using EOD priced open-ended SP500 2x Rydex or Profunds Mutual funds (with a 3:55 pm deadline). Any idea how your results would look using RYTNX as a vehicle? My suspicion is they would be very good results.

    1. Thanks Jim, I might look into that next. Would be interesting to see if the results are better than day-after. I did test to see if the results were better if the open was below the previous close, but that didn’t help.

      Although your specific vehicles I’m curious about. Those funds aren’t tradable via Robinhood (I’m pretty sure), so you must be using a brokerage that allows you to trade mutual funds commission-free on a short term basis? One of my other brokerages has commission-free funds, but only if they’re held for thirty days (and no leveraged ones).

      1. Thanks Matt.

        Easiest way to trade these leveraged (2x) funds is to set up an account directly with Rydex ( or Profunds).

        Rydex allows trading at morning fix ( a 10:30 am deadline for 10:45 fix) as well as at EOD ( a 3:55 pm deadline for EOD.

        Very efficient vehicles for next day focused trading. No commission, fills, slippage, spreads, etc.

        Rydex funds and Profunds ( tradeable daily) are also available through some of the better variable annuities ( tax deferred accounts, so no Schedule D reporting of trades.)

        Best of luck. Regards, Jim P.

  4. Hi Matt,

    Could you please confirm you applied the filter “Price>200 MA” as mentioned in the Jeff Swanson’s System Trader Success post? If so, why your system did not stop trading in 2008/2009?

    Have you tried shorting SPY when RSI(2) was overly high?

    Cheers.

    1. Hi Tonio. I did NOT apply a MA200 filter. I suspected that might leave money on the table, so I started without it. As you can see from the graph, the results in 2001-2002 and 2008 are turbulent, but there’s still money to be made, even in those bear markets.

    2. Oh and I forgot to answer the other part of your question. I have not yet been able to find a way to reliably short SPY (or go long SH) using RSI. If you have any ideas, let me know!

  5. Hi Matt,
    I was curios if you’ve written an algorithm for this system of trading that could be used on quantopian. I would love to give it a go.
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *