Skip to content

Normalized Price Spread Strategy

June 17, 2010

Here is a quick idea I had the other day. I was reading about statistical arbitrage and pair trading and as some of you may know, the notion of spread is quite central in the domain. The idea behind pair trading is somewhat simple; find assets exhibiting similar behavior, then when the spread depart from the mean bet on the subsequent return to normal. Simple, elegant and based on sheer intuition, everything I like in a trading concept.

I looked at ways to incorporate the concept in a simple system. This strategy looks at the normalized spread (difference) between the closing price and a short-term moving average (for this example 3 days). In other words, I use the percentrank function on the difference between the last closing price and the 3 day moving average of a single asset. Enter long if < 50th percentile, short otherwise. The results on SPY since 2000 are presented below.

Conceptually this makes a lot of sense. If the recent price exhibit strong relative strength we expect it to return to normal, the opposite holds true for weak relative strength. Normalizing the spread give use an indication of the degree to which the recent price departs from the past couple days and from there we can expect a given degree of reversion to the mean. If the price becomes “stretched” I would be more confident than if the price was range bound around the mean. That being said, this idea has nothing genius about it; it is yet another relative strength strategy and is very similar to the well known z-score. However, I like that by using the percentile we do not have to assume any distribution thus relaxing the need for normality in the data. It also facilitates the creation of a confidence based bet scheme or a “dimmer approach” à la MarketSci. Regardless, I think that the concept of spread is a good concept, expect it to come back on the blog as I learn more about it.

QF

Advertisements
43 Comments
  1. J Schultz permalink
    June 18, 2010 10:08

    Would it be possible to see the excel sheet for this?

  2. Anand permalink
    June 18, 2010 11:32

    For PercentRank function what is the length of time you used? Also, is it possible for you to share the calculation?

    • June 18, 2010 11:40

      Hello Anand,

      I am sorry I forgot to mention; the lookback period for the percentrank function is 252 days. By share the calculation do you mean a spreadsheet ?

      Cheers,
      QF

  3. Anand permalink
    June 18, 2010 12:52

    Hi QF,

    If you could share the spreadsheet that would be great. I want to compare my calculation with yours. It seems, I have a bug in the spreadsheet i built.

    Best,

    Anand

  4. Anand permalink
    June 18, 2010 13:37

    Thanks QF for sharing the worksheet. In the worksheet you go long when Percentile score is less than .5 right? I got confused with your “long if > 50th percentile” statement. One interesting observation i found when i went back upto 1993 is, this strategy started working from the 2000. Before that it was pretty much working the wrong way. Is that because after 2000 the MR type of strategies started working? Maybe, an adaptive type of trading strategy is required here like the following: http://marketsci.wordpress.com/2008/09/24/how-to-build-an-adaptive-trading-strategy-part-ii-an-example/

    • June 18, 2010 13:59

      Thank you for pointing out my typo ! And yes, since this strategy is MR based and without any adaptive mechanism built-in it doesn’t work well before the MR paradigm shift. The idea for the post was to propose a different (yet another) MR indicator for the reader to explore. There is several modifications possible to improve the system as it is very basic as explained now.

      Thank you for the comments,
      QF

  5. Rick permalink
    June 20, 2010 03:49

    I too would like to get a copy of your spreadsheet. Thanks.

  6. Brent permalink
    June 20, 2010 05:53

    Hi,
    Looks like some nice results. Would you consider this a practical strategy? How many total trades did you observe for the spread strategy? Also, for the buy and hold strategy, I assume you buy at the start of the evaluation period and hold until the end; so I’m wondering what is the meaning of winning percentage of 52.93% relates to for only one trade?

    • June 20, 2010 11:00

      Hello Brent,

      I would not trade the strategy as is, however I think the concept has some merit and deserve further research. Concerning the winning %; I use the following formula: number positive return days / total days.

      Cheers,
      QF

  7. Brent permalink
    June 20, 2010 05:55

    Also, would you mind sending me a copy of your spreadsheet?

  8. Freeman permalink
    June 20, 2010 19:33

    QF-Have you considered making this a conditional criteria for entry into the “adaptive time machine” strategy for CSS Analytics? I’ll curious if that combined they would positively affect trading performance or not. Also could you send the spreadsheet for the normalized strategy?

    ~Freeman

    • June 20, 2010 22:05

      Freeman,

      I sent you the spreadsheet, and considering your question, I am not quite sure I understand how both strategies could be used together since the time-machine is essentially a run analysis strategy and this one being a MR indicator. Could you elaborate some more on your idea please ?

      Cheers,
      QF

  9. pinner permalink
    June 21, 2010 17:02

    An important issue with respect to spread trading is the amplitude of (hopefully temporary) down draws. It is somewhat of a catch-22. Given pairs that you can show are historically correlated in some way, the spread arises once the correlation temporarily diverges. As the divergence (normalized spread in this case) increases, one should have even more conviction in the trade. However, given that you are betting the opposite way there is no guarantee that one can remain solvent waiting for the reversion – or in fact that the correlation remains valid at all.

    Clearly the importance of this issue varies by asset class. It deserves much more consideration for futures and structured products than it does for equities. But it can be important nonetheless.

    To put it in a more concise and well-known way: “The market can behave irrationally much longer than you can stay solvent.”

    • June 21, 2010 18:09

      Thank you for the well thought comment Pinner,

      I agree with everything. I think that the state of short-term MR (market regime) is crucial when making a decision as to trading a system like this.

      Cheers,
      QF

  10. June 21, 2010 20:48

    What securities are you trading in this system?

    • June 21, 2010 23:24

      Hello MP,

      I will have to clarify the post, as it seems to confuse many readers. The spread is within the asset time-series itself, it is not a pair strategy. The symbol traded is SPY.

      Cheers,
      QF

  11. prazor permalink
    June 22, 2010 10:42

    Nice!
    Would appreciate if you could send the file to me also.
    Will share my work with you if i find something useful.
    Thanks.

  12. Paolo permalink
    June 22, 2010 11:39

    I just wanted to make clear how much impact would have broker fees on such frequent strategy…it’s not a bad comment since I consider the bottom line idea very interesting, but simply to put it into real perspective.

    http://www.4shared.com/photo/ChqsENWY/Price_Spread_Strategy.html

    • June 22, 2010 15:21

      Hello Paolo,

      Thank you for the comment, I agree with you that every strategy trading frequently is subject to big influence from transaction costs. I apologize if I didn’t made that clearer in the post.

      Cheers,
      QF

  13. Patrick permalink
    June 23, 2010 14:49

    QF,

    Great work on this analysis. Could you please share the spreadsheet with me. I would like to compare my results with your analysis. THANKS!

  14. dossor permalink
    June 30, 2010 12:16

    Nice work. I would also like to see the spreadsheet to compare results. Thanks QF!

  15. Zhao permalink
    July 27, 2010 05:04

    Hello QF,

    do you think i can have a look at the spreadsheet?

    thanks in advance

  16. Pete permalink
    August 7, 2010 07:27

    Please, can i have a look at spreadsheet?

    hanks

  17. Nik permalink
    August 31, 2010 23:58

    Hello QF, it will be a great favor if you can share the spreadsheet for the normalized price spread strategy

  18. Andreas permalink
    September 28, 2010 12:13

    Can I get your spreedsheet??
    I still confuse with this concept.. when to buy/sell and which pair…
    thanks.

  19. Peter permalink
    October 13, 2010 22:09

    Hi Nik

    I’d also like a copy of that spreadsheet if its still available.

    Many thanks

  20. Tom permalink
    October 30, 2010 21:10

    If still available, could I get a copy of your spreadsheet? Thanks.

  21. tommason permalink
    November 1, 2010 19:23

    Hi could you send me the excel file please ? I am curious about pair trading. thanks

  22. Clive permalink
    November 27, 2010 07:12

    Hey QF, would be extremely kind of you of I could get a copy of the excel spreadsheet…..would be grateful for it…

    Thanks ,
    Clive .

  23. Clive permalink
    November 27, 2010 07:13

    my email id is clive_me@yahoo.com.

  24. Kurt permalink
    January 31, 2011 22:46

    Hello QF,
    Your site has been a godsend in my trading curiosities. I’ve been trying to implement this in a worksheet and I was wondering you could please send me your spreedsheet? Thank you

  25. August 9, 2011 19:08

    I am a bit confused. If
    close – (3-day MA) < percentrank(50)
    this implies the close is significantly larger than the average. Mean reversion would then dictate that you go short, but you are saying to go long in this scenario.

    Perhaps I am misreading you. I am noticing that the strategy makes a killing during the 08/09 crash months. This is a bit counterintuitive because stocks were not at all range bound then. Of course, using just a 3-day MA probably renders my intuitions false. I'd love to see the spreadsheet!

  26. Saravanan Damodaran permalink
    March 7, 2012 02:42

    Please send me the excel sheet…

  27. aywu1958 permalink
    April 3, 2012 23:34

    Hi QF

    May I have a copy of your spreadsheet if its still available.

    Many thanks

Comments are closed.

%d bloggers like this: