Price Volume Rank (PVR)

Calculate the Price Volume Rank (PVR): a code from 1 (a rising price on rising volume) to 4 (a falling price on falling volume), which shows whether volume confirms a move.

The Price Volume Rank classifies each period by the direction of the close and of the volume, from the most bullish to the most bearish combination: a rising price on rising volume (1), a rising price on falling volume (2), a falling price on rising volume (3) and a falling price on falling volume (4). An unchanged close or volume counts as rising.

The formula is as follows:

\[\text{PVR} = 1 \;\text{if Close} \geq \operatorname{Close}(t-1) \;\text{and Volume} \geq \operatorname{Volume}(t-1)\] \[\text{PVR} = 2 \;\text{if Close} \geq \operatorname{Close}(t-1) \;\text{and Volume} < \operatorname{Volume}(t-1)\] \[\text{PVR} = 3 \;\text{if Close} < \operatorname{Close}(t-1) \;\text{and Volume} \geq \operatorname{Volume}(t-1)\] \[\text{PVR} = 4 \;\text{if Close} < \operatorname{Close}(t-1) \;\text{and Volume} < \operatorname{Volume}(t-1)\]

A moving average of the rank below 2.5 is read as bullish and above it as bearish.

Also known as: PVR, Price Volume Rank.

Example · AAPL, MSFT · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_price_volume_rank:

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["AAPL", "MSFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_price_volume_rank()

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

Did volume confirm the price moves of Apple and Microsoft in 2025, according to the Price Volume Rank?

Which returns:

Parameters

get_price_volume_rank accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
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 indicator values. 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
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Paper Fulks Maxwell Laboratories (fmlabs), “Price Volume Rank,” Technical Indicators Reference.
  • Library Referenced against pandas-ta-classic’s pvr
Share