Calculate the Positive Volume Index (PVI) for a given price series.

The Positive Volume Index mirrors the Negative Volume Index: it is a cumulative index that only updates on days where volume increases from the prior period, compounding that day’s percentage price change onto the running index; on days where volume decreases (or stays flat), the index is carried forward unchanged. Per Fosback, the Positive Volume Index isolates price behaviour on high-volume (crowd-driven) days, which is traditionally read as tracking less-informed, sentiment-driven trading.

The formula is as follows:

\[\operatorname{Index}(t) = \operatorname{Index}(t-1) \cdot (1 + (\operatorname{Close}(t) / \operatorname{Close}(t-1) - 1)) \text{if Volume} (t) > \operatorname{Volume}(t-1)\] \[\operatorname{Index}(t) = \operatorname{Index}(t-1) \text{otherwise}\]

Also known as: PVI, Positive Volume Index.

Positive Volume Index (PVI) in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_positive_volume_index as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["SPY", "IWM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
    benchmark_ticker=None,
)

toolkit.technicals.get_positive_volume_index().tail(5)

Or, after setting up the Finance Toolkit MCP, ask:

How did the Positive Volume Index of SPY and IWM, counted from the start of 2021, develop from 24 to 31 December 2025?

Which returns:

Date SPY IWM
2025-12-24 368.611 308.515
2025-12-26 368.574 306.942
2025-12-29 367.26 305.061
2025-12-30 367.26 305.061
2025-12-31 364.539 302.758

Parameters

get_positive_volume_index accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Can be “intraday”, “daily”, “weekly”, “monthly”, “quarterly” or “yearly”. Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
start_valuefloatThe index value to start the series at. Defaults to 1000.0.100.0
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the Positive Volume Index. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
Share