Volume Flow Indicator (VFI)

Calculate Markos Katsanos’ Volume Flow Indicator (VFI): the volume of the periods with a meaningful move of the typical price, signed by the direction of the move, which shows whether money flows in or out.

The Volume Flow Indicator refines On-Balance Volume in three ways: it uses the typical price instead of the close, it ignores moves too small to matter (below a cutoff that scales with the recent volatility of the typical price) and it caps the volume of a single period at a multiple of the average volume, so one spike cannot dominate. The sum of that signed volume over the window, divided by the average volume, is smoothed with a short EMA.

The formula is as follows:

\[\text{Typical Price} = \frac{\text{High} + \text{Low} + \text{Close}}{3}\] \[\text{Volatility} = \text{Population Standard Deviation of} \;\ln\left(\frac{\text{Typical Price}}{\text{Typical Price}(t-1)}\right) \;\text{over 30 periods}\] \[\text{Cutoff} = \text{coefficient} \cdot \text{Volatility} \cdot \text{Close}\] \[\text{Average Volume} = \operatorname{SMA}(\text{Volume},\; \text{window}) (t-1)\] \[\text{Capped Volume} = \min(\text{Volume},\; \text{volume\_coefficient} \cdot \text{Average Volume})\] \[\text{Signed Volume} = + \text{Capped Volume if Typical Price} \;\mathord{-} \;\text{Typical Price}(t-1) > \text{Cutoff},\;\; \text{-Capped Volume if it is below -Cutoff, else 0}\] \[\text{VFI} = \operatorname{EMA}\left(\frac{\operatorname{Sum}(\text{Signed Volume},\; \text{window})}{\text{Average Volume}},\; \text{smooth\_window}\right)\]

Katsanos read a VFI above zero as a bullish flow of money and below zero as a bearish one, a crossing of zero as a change in trend and a divergence from price as an early warning. The VFI is in units of the average volume (a sum of up to window periods), so it is comparable across tickers.

Also known as: VFI, Volume Flow Indicator.

Example · AAPL, MSFT · 2020 to 2025

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

from financetoolkit import Toolkit

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

toolkit.technicals.get_volume_flow_indicator()

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

Was volume flowing into or out of Apple and Microsoft in 2025, according to the Volume Flow Indicator?

Which returns:

Parameters

get_volume_flow_indicator 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”, in which case the open, high and low prices are adjusted for dividends in the same way."Close"
windowintThe number of periods for the average volume and the sum of signed volume. Defaults to 130, about six months of trading days.20
coefficientfloatThe multiple of the volatility times the close that a move of the typical price needs to count. Defaults to 0.2.0.2
volume_coefficientfloatThe multiple of the average volume that a single period’s volume is capped at. Defaults to 2.5.2.5
smooth_windowintThe number of periods for the EMA that smooths the result. Defaults to 3.5
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 Katsanos, M. (2004). “Using Money Flow to Stay with the Trend.” Technical Analysis of Stocks & Commodities, 22(6).
  • Paper Katsanos, M. (2004). “Volume Flow Indicator Performance.” Technical Analysis of Stocks & Commodities, 22(7).
  • Library Referenced against pandas-ta-classic’s vfi
  • Library Shares similar logic as finta’s VFI
Share