CSS Analytics’ DVI Indicator Revealed


This week’s series is on CSS Analytics’ DVI Indicator (read our first post).

Up to this point the DVI has been a black-box indicator only available for a fee from CSS, but in honor of this series, David Varadi (the fellow geek behind CSS) has agreed to make the indicator public.

Click for an Excel Workbook showing how the DVI is calculated.

Everything should be self-explanatory if you have cursory experience with Excel. Scroll down to see the final DVI readings in column K.

[Edit: click for a summary of all posts in this series on the DVI indicator]

Happy Trading,

. . . . .

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

9 Responses to “CSS Analytics’ DVI Indicator Revealed”

  1. Hi Michael,
    Thanks to David and yourself for sharing this code!

    I used the spreadsheet to build an Amibroker indicator. In the process I noticed that the 2nd part of the formula in column D: (AVERAGE(C364:C368)+(AVERAGE(C269:C368)/10))/2 contains a division by 10. This seems odd given the summation of two averaged ranges (it basically underways the 2nd average). Is this correct? When removing the division by 10 I am getting better results in a quick & dirty system that I have made with the indicator.

    ps. Let me know if you want me to share the Amibroker indicator

    • 2 MarketSci

      Good stuff QD. Thanks for that. michael

    • 3 MarketSci

      RE to QD: good question. that’s how david has it coded and I confirmed that my final DVI values match his. absolutely feel free to share the amibroker code. i’m not sure if it would come across well in this comments box, so probably easier to write a blog post and then link to it from here. michael

    • 5 Josh

      I also thought the division by 10 was odd. Since David’s default lookback length for the DVI is 250 trading days, if one were to change this they might want to scale all the other lookback lengths accordingly. Otherwise you might end up over/under-weighting the short-term vs. the long-term.

    • 6 TopTick

      QD: I think the /10 is simply a weighting factor — the long average contributes only 1/10 as much to the result as the short-term average.

      You may notice that some other factors are probably artifacts of the evolution of the DVI, or clues to DV’s thinking, such as the /2. Since the sum of the short and long averages are used in ranking, it doesn’t matter that they are divided by 2. My guess is that when devloping this indicator DV was thinking of “averaging” the long and short averages (he does like smoothed series, and even wrote a blog post a long time ago about a seventh order moving average system! see http://cssanalytics.wordpress.com/2009/08/02/the-case-of-the-mysterious-7th-derivative/)

  2. 8 Josh

    Hi Michael,

    Here’s a link for Tradestation code that I whipped up:


    The way it handles percentrank is different from excel; it doesn’t interpolate values, so the exact indicator values will be slightly different. This is because percentrank is mind-numbingly slow in Tradestation. Of course you have no need for Tradestation code but maybe some of your readers will.


  1. 1 DVI Indicator for Amibroker « Quanting Dutchman

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