Main Content

negvolidx

Negative volume index

Using a fints object for the Data argument of negvolidx is not recommended. Use a matrix, timetable, or table instead for financial time series. For more information, see Convert Financial Time Series Objects fints to Timetables.

Description

example

volume = negvolidx(Data) calculates the negative volume index from the series of closing stock prices and trade volume.

example

volume = negvolidx(___,Name,Value) adds optional name-value pair arguments.

Examples

collapse all

Load the file SimulatedStock.mat, which provides a timetable (TMW) for financial data for TMW stock.

load SimulatedStock.mat
volume = negvolidx(TMW);
plot(volume.Time,volume.NegativeVolume)
title('Negative Volume Index for TMW')

Figure contains an axes object. The axes object with title Negative Volume Index for TMW contains an object of type line.

Input Arguments

collapse all

Data with closing prices and trade volume, specified as a matrix, table, or timetable. For matrix input, Data is an M-by-2 with closing prices and trade volume stored in the first and second columns. Timetables and tables with M rows must contain variables named 'Close' and 'Volume' (case insensitive).

Data Types: double | table | timetable

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: volume = negvolidx(TMW,'InitialValue',500)

Initial value for negative volume index, specified as the comma-separated pair consisting of 'InitialValue' and a scalar positive integer.

Data Types: double

Output Arguments

collapse all

Negative volume index, returned with the same number of rows (M) and the same type (matrix, table, or timetable) as the input Data.

More About

collapse all

Negative Volume Index

Negative volume index shows the days when the trading volume of a particular security is substantially lower than other days.

References

[1] Achelis, S. B. Technical Analysis from A to Z. Second Edition. McGraw-Hill, 1995, pp. 193–194.

Version History

Introduced before R2006a

expand all