Investment Studio > Expressions > Functions > Indicator > NVI

float array[*][2] nvi(float array[*][3] dcv, float start_nvi = 1)

Returns a two-column array containing dates (first column) and corresponding Negative Volume Index (NVI) values (second column).

dcv is a three-column array containing daily price quotes. Each row is structured as follows:

Column # Content
1 The quote date.
2 The day's close (last traded price).
3 The day's volume (number of traded shares).

The array is assumed to be time-sorted, with earlier dates preceding later dates.

Automatic type conversion allows the use of date strings as arguments instead of explicit date values.

start_nvi is the value returned for the start date (first input date), and the start value for the computation of all subsequent output values. If omitted, it defaults to 1.

Interpretation

NVI is a price trend index with a twist: it's updated only on days when volume is down from the previous trading day. On such days,

NVI = previous NVI * close / previous close

On days when volume is unchanged or up from the previuos trading day, NVI is unchanged. In other words, NVI shows how price behaves when volume declines (to see how price behaves on rising volume, use PVI).

The NVI's construction is usually motivated with two hypotheses:

  1. There is "smart money", which moves quietly in and out of the market based on well-informed judgment; and there is "dumb money", which just follows and reinforces prevailing trends once they have been established.
  2. The dumb money is much more plentiful and/or active than the smart money.

If this is true, it's reasonable to assume that high volume days are dominated by dumb money. To discern what the smart money is doing, we should therefore concentrate on the price action on low volume days, when the herd is not stampeding; and that's what the NVI does.

If you find the above assumptions questionable, you may prefer to think that days with declining volume are important because volume tends to lead price. If nobody is interested in buying at the latest quoted price, there will be no trades (no volume) until forced sellers (market participants in urgent need of cash for one reason or another) lower the asking price enough to entice buyers. You would therefore expect low volume days to be mostly down days in terms of price, and the NVI to spend most of its time trending lower. This is indeed the case; and this is why exceptions to the rule, days which are up on lower volume (causing the NVI to rise) can be a bullish sign, especially if they have been preceded by a significant decline. Such declines often end in "panic lows" on high volume, a supply-driven situation where sellers will take any price just in order to get out of the market; once they are out, volume wanes and price starts rising for sheer lack of sellers. This combination of falling volume and rising price will push up the NVI. Based on this reasoning, the NVI should be expected to work better as a generator of buy signals than as a generator of sell signals.

This conclusion is corroborated by empirical studies. In Stock Market Logic (1992), Norman Fosback analyzed data from 1941 to 1975 and found that the odds of a bull market were 96 out of 100 when the NVI rose above its one year moving average. When the NVI fell below its one year moving average, the odds of a bear market were 53 out of 100, effectively a toss-up.

This kind of crossover signal should not be used in isolation, however. While market bottoms tend to be followed by dwindling volume, market tops can be preceded by it, reflecting the fact that demand is weakening as price goes up. This can be enough to cause an NVI crossover just as the market is topping out. NVI crossovers should therefore be verified by other means, e.g. a condition that they only be considered after a significant decline.

For a real life example, consider Motorola (NYSE:MOT) from January 1, 1990 to December 31, 2001:

The top chart shows daily closing prices; the middle chart shows daily volume; the bottom chart shows NVI (black), its 10 day EMA (lime) and its 250 day EMA (blue). Crosses of the short EMA above the long EMA are marked in green, crosses of the short EMA below the long EMA are marked in red.

Note in particular the cluster of whipsaws around March 1, 2000.

Example

Assuming standard US date format settings,

=nvi({{"1/1/1990", 98, 1000}, {"1/2/1990", 86, 858}})

returns the array {{32874, 1}, {32875, 0.877551020408163}}. 32874 is the date code for 1/1/1990; 1 is the default start_nvi. 32875 is the date code for 1/2/1990; -0.877551... = 1 * 86 / 98 is the NVI on that date (since 1000 < 858, i.e. January 2 was a down volume day contributing to the NVI).

See also acd, efi, eom, mfi, mo, pvi, obv, udr.