negvolidx

Negative volume index

Syntax

nvi = negvolidx(closep, tvolume, initnvi)
nvi = negvolidx([closep tvolume], initnvi)
nvits = negvolidx(tsobj)
vits = negvolidx(tsobj, initnvi, ParameterName, ParameterValue,
...)

Arguments

closep

Closing price (vector).

tvolume

Volume traded (vector).

initnvi

(Optional) Initial value for negative volume index (Default = 100).

tsobj

Financial time series object.

ParameterName

Valid parameter names are:

  • CloseName: closing prices series name

  • VolumeName: volume traded series name

ParameterValue

Parameter values are the strings that represent the valid parameter names.

Description

nvi = negvolidx(closep, tvolume, initnvi) calculates the negative volume index from a set of stock closing prices (closep) and volume traded (tvolume) data. nvi is a vector representing the negative volume index. If initnvi is specified, negvolidx uses that value instead of the default (100).

nvi = negvolidx([closep tvolume], initnvi) accepts a two-column matrix, the first column representing the closing prices (closep) and the second representing the volume traded (tvolume). If initnvi is specified, negvolidx uses that value instead of the default (100).

nvits = negvolidx(tsobj) calculates the negative volume index from the financial time series object tsobj. The object must contain, at least, the series Close and Volume. The nvits output is a financial time series object with dates similar to tsobj and a data series named NVI. The initial value for the negative volume index is arbitrarily set to 100.

nvits = negvolidx(tsobj, initnvi, ParameterName, ParameterValue, ...) accepts parameter name/ parameter value pairs as input. These pairs specify the name(s) for the required data series if it is different from the expected default name(s). Parameter values are the strings that represent the valid parameter names.

Examples

expand all

Compute the Negative Volume Index

This example shows how to compute the negative volume index for Disney stock and plot the results.

load disney.mat
dis_NegVol = negvolidx(dis);
plot(dis_NegVol)
title('Negative Volume Index for Disney')

References

Achelis, Steven B., Technical Analysis from A to Z, Second printing, McGraw-Hill, 1995, pp. 193 - 194.

Was this topic helpful?