Investment Studio > Expressions > Functions > Indicator > PVI

float array[*][2] pvi(float array[*][3] dcv, float start_pvi = 1)

Returns a two-column array containing dates (first column) and corresponding Positive Volume Index (PVI) 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_pvi 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

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

PVI = previous PVI * close / previous close

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

The PVI'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. The PVI will therefore tell you how the "crowd" is feeling about the market.

If you find the above assumptions questionable, you may prefer to think that days characterized by rising volume and a clear price direction are important because they are days of growing conviction among market participants. If price is rising along with volume, the market is demand-driven: buyers are prepared to pay more in order to entice reluctant sellers (both sides think the asset is worth more). If price is down while volume is up, the market is supply-driven: sellers are prepared to reduce their demands in order to entice reluctant buyers (both sides think the asset is worth less). Declining volume on the other hand means that there is a divergence of opinions: sellers think the asset is worth more, buyers that it's worth less, so supply and demand meet more rarely. If you want the latest "consensus" view on the direction of the market, you should therefore look at the latest day with rising volume.

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 79 out of 100 when the PVI rose above its one year moving average, while the odds of a bear market were 67 out of 100 when the PVI fell below its one year moving average.

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 PVI (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.

The charts show that PVI crossings do well catching major rallies but tend to whipsaw frequently in trading ranges. This suggests using it along with a trend strength indicator like ADX. Note also that PVI tends to track price (as might be intuitively expected), making its peaks and troughs significant features in their own right.

Example

Assuming standard US date format settings,

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

returns the array {{32874, 1}, {32875, 1.13953488372093}}. 32874 is the date code for 1/1/1990; 1 is the default start_pvi. 32875 is the date code for 1/2/1990; 1.1395... = 1 * 98 / 86 is the PVI on that date (since 1000 > 858, i.e. January 2 was an up volume day contributing to the PVI).

See also acd, adx, efi, eom, mfi, mo, nvi, obv, udr.