Varadi’s RSI(2) Alternative: The DV(2)

15Jul09

This is a test of an alternative to the blogosphere darling RSI(2) that I’m calling the DV(2). This indicator comes from David Varadi, a frequent commenter and friend of the MarketSci Blog. David works in the alt.-investment industry and is the keeper of the (rarely updated) CSS Analytics blog.

In this post, I’ll describe the DV(2) and show historical results of two strategies using it, and in a follow up post we’ll discuss.

20090715.01 

The graph above shows the DV(2) from April to date. The simple unbounded version (blue, left scale) is calculated as follows: (a) for each trading day calculate: [(close / average of the high and low price) – 1]. And then (b) take the average of today and yesterday’s result.

This results in a value with no definite maximum or minimum value, so there is also a bounded version (red, right scale) that oscillates between 0 and 100 (like RSI(2)). To calculate the bounded version we take today’s unbounded value and compare it to the last year (252 trading days). The highest value over the last year receives a value of 100, the lowest 0, and everything else its percentage rank in between (in other words, we’re using the PERCENTRANK function in Excel).

Geek note: because this indicator requires high and low values, it is not appropriate for indices themselves (which report inaccurate high/low values), only intraday vehicles like ETFs.

20090715.02
[logarithmically-scaled]

The graph above shows the results of two different applications of DV(2) on the S&P 500 ETF SPY, from 2000, compared to buy & hold in grey. This is a proof of concept, so these results are frictionless (i.e. do not account for transaction costs, slippage, or return on cash).

The first strategy (blue) is going long at today’s close when the unbounded DV(2) falls below zero today, and closing that position and going short when it rises above.

DV(2) is similar to RSI(2) in that the deeper the market moves overbought or oversold, the more predictive it has become, so the second strategy (red) is using the bounded version of the indicator and scaling next-day exposure based on how close the indicator is to its extremes. A DV(2) of 50 results in a 0% position, 25 a 50% long position, 0 a 100% long position, etc.

And for the number lovers…

20090715.03

Like RSI(2) and other very short-term indicators, DV(2) only became useful around the turn of the century (hence the reason this test is so short). Since then, the indicator has obviously been an effective predictor of next-day mean-reversion.

In a follow up post I’ll look at where DV(2) and RSI(2) differ, and why DV(2) might be a much better alternative for ETF traders.

[Edit: click for a summary of all posts in this series on the DV(2) indicator]

Happy Trading,
ms

 

To stay up to date with what’s happening at the MarketSci Blog, we recommend subscribing to our RSS Feed or Email Feed.



31 Responses to “Varadi’s RSI(2) Alternative: The DV(2)”

  1. 1 Blue cat

    This reminds me of the Chaikin Money Flow and Colin Twiggs variant the Twiggs Money Flow. In those two cases the indicator (over a longer period) is used to identify trends rather than to suggest reversion bets. That seems to be a general theme: indicators that suggest trends when calculated over longer periods can also be used to suggest short term extreme movements and possible reversion to mean possibilities.

  2. 3 Blue cat

    P.S. One aspect of Triggs’ variant is that he uses what he calls the true range rather than the simple high and low for the day. The Chaikin and Twiggs indicators also make us of volume, which DV doesn’t. What significance do you think there is in that?

  3. 4 kapil kashyap

    Hi Michael,

    What is DV(2)? I have not seen any info on how it is derived.

    Thanks,
    Kapil

    • 5 marketsci

      RE to kapil: you didn’ look very hard ;) …first paragraph under the first graph. michael

  4. 6 DaveT

    Hi Michael
    re “it is not appropriate for indices themselves (which report inaccurate high/low values), only intraday vehicles like ETFs”

    I can find some comment on not actually being able to trade the indecies (so use the ETFs for actual testing), and the index open values being suspect.

    But could you please point me to any discussion about the these dubious high/low index values. Is this in the intraday data and the EOD data too? And given the number of rougue prices seen in ETF intraday data, I’m seeing pots and kettles here.

    Dave

    • 7 marketsci

      RE to DaveT: I don’t have a specific discussion I can point you to. In a nutshell, even though the vast, vast majority of what I do is on actual indices, I don’t use any intraday data from those indices, including the open, high, or low. If I need any intraday data I move to ETFs, et al. michael

  5. 8 DaveT

    thanks for the reply, I just wonder whether I’m miss-reading your post. Are you saying that despite having to trade the ETFs you would be prefer to compute based on a “true” index value (which you could calculate yourself if you really wanted to I suppose), or are you saying that you believe the ETF prices (bad tick filtered) are a more accurate reflection of the actual market, as well being (coincidentally) the prices of the instrument you trade (allbeit a leveraged eod version)?

    • 9 marketsci

      RE to DaveT: neither. I only trade leveraged mutual funds from Rydex, ProFunds, and Direxion, which track the actual indices (more on this here: http://marketsci.wordpress.com/2009/03/09/faq-why-i-trade-leveraged-mutual-funds/).

      Because this particular strategy uses intraday prices (specifically the high and low) I think it’s more appropriate to calculate the indicator using ETF data (which, bad quotes aside, provide a true high and low price at which the ETF actually traded).

      That indicator could then be used to trade an index-tracking product like I trade, but that would be a separate test to see if the indicator is still effective (side note: I’ve tested it and it is, but slightly less so). In this post I tested the ETF-derived indicator actually trading ETFs just to keep things simple and straight-forward.

      I’m not sure if I’ve answered your question, but I hope I’ve rambled enough that the answer is in there somewhere =)

      michael

  6. 10 Matthew Taylor

    Michael,

    On the second plot, you compare the two strategies against a buy and hold SPY. It would be nice (as a general practice) to see also a buy and hold SPY short strategy on the same plot.

    MT

    • 11 marketsci

      RE to MT: I’m not sure why you would do that. The purpose of B&H isn’t to say “look, it beats buy and hold”. The purpose is to give some context to the returns. Most people understand what the S&P 500 has done over the last X number of years, so they can get an idea of how this strategy has performed in relation to that. michael

  7. 12 Evelyn

    Why do you show the Sharpe Ratio as a percentage?

    • 13 marketsci

      Because it makes all my numbers line up nice and pretty…which makes me happy. And anyone who can’t figure out how to translate from % into decimal, probably doesn’t understand anything on this blog anyways. michael

  8. 14 Tom

    Michael –

    Can you say a little more about the “this year” look back period for the bounded version. It looks like you’ve based this on the calendar year for your spreadsheet. Would it make more sense to to a rolling calendar year?

    Thanks. I love your work.

    Tom

    • 15 marketsci

      Hello Tom – it is a rolling calendar year. Note that it’s using the previous 252 trading days (or roughly 1-year). Thanks for the kind words, michael

  9. 16 Brad

    Hello MS! Did you delete a post about dv(2) on NDX that used stops? I can’t find it anywhere. Poster said backtested @ 40% apr. Thanks. Love your work!

    • 17 marketsci

      RE to Brad: thanks for the kind words. If the strategy was using stops, then it didn’t come from me (I don’t do intraday tests like that). I’m guessing it was in the comments to one of my posts. Try looking in the comments section in each of the three posts mentioned here: http://marketsci.wordpress.com/2009/07/22/roundup-dv2/

      Thanks,
      michael

  10. 18 Joe Marc

    Michael
    Re:dv2

    Appreciate your insight so much.
    Was wondering if you could run a test (I don’t know how), that trades with the next mornings open instead of buying on the close (since you need the close to compute the desired action that seems impossible?)

    Thank you for a truly great site.
    Joe Marc

    • 19 marketsci

      RE to Joe: thanks for the kind words. I don’t do tests with intraday execution (b/c it introduces to many investor-specific variables), but maybe one of our quant-minded readers could run this test for you.

      RE: executing at the close – I think you can execute these type of systems at the close – we do it daily with YK and Scotty. Basically, just prior to the broker’s cutoff time for at the close orders, we’re making our best estimation about where the market will close and then trading based on that. Sometimes we get it wrong, but generally speaking, we’re able to follow the strategy as designed.

      michael

  11. 20 Kevin

    Michael:

    I’m just getting up to speed on DV(2). The formula is simple, but I do have one question. Are the historical results based on trading at the next day’s close after a signal change or does one need to anticipate the close late in the day and trade the same day as the signal change, similar to YK2?

    Thanks,

    Kevin

  12. 22 Kevin

    Thank Michael. This got me wondering about the OEX PCR strategy. Is it based on trading the next day or same day just before the market’s close?

    Kevin

    • 23 MarketSci

      RE to Kevin: That test was just before the close, but should be okay with a 1-day delay (would have to test to confirm). These type of longer-term systems are not as adversely-impacted by delaying the trade a day. michael

  13. 24 Kevin

    Thanks again for the speedy reply Michael. Where can I get intraday quotes on $CPC? All I found on stockcharts.com was a graph of closing prices.

    Kevin

  14. 25 Kevin

    Michael:

    On the bounded DV2 version above, as well as RSI(2), is the past 252 day percentage rank range a rolling 252 day range? So each day it would be recalcualted adding yesterday and dropping the day from 252 days ago?

    Thanks,

    Kevin

  15. 26 Bill

    Does the formulae for DV(2) look like this? (Metastock)

    x:=((CLOSE)/(H+L)/2)-1;
    y:=(x+(Ref(x,-1)))/2;
    y

  16. nice work.. thank you!!…

    one question though: how much of the amazing performance is due to nasdaq bubble burst and then credit crisis? it looks like most of it to me….

    it just seems like those two periods have a huge effect on any trading models… who’s to say whether we’ll have anything similar in the next 10-15 years or if we’ll have two or three of these episodes in the next 20 years.

    put another way, it seems like very few models work that well when the market goes more or less straight up for a good number of years like before 2008. i think you just want to be long the market then.

    thanks again… i really appreciate your work and sharing it with us :)


  1. 1 Momentum « Quantivity
  2. 2 System Trading and Backtesting | V-Neck Shaped Recovery
  3. 3 Addition of Bounded DV-2 Statistic

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s