Volume Adjusted Moving Average

The Volume Adjusted Moving Average (VAMA) weights each close with its traded value relative to the average volume, so the closes of the busiest periods count the most.

The formula for the Volume Adjusted Moving Average first gives each period a weight: its close times its volume relative to the simple moving average of the volume over n periods:

\[\text{Weight} = \frac{\text{Close} \cdot \text{Volume}}{\text{SMA}(\text{Volume}, n)}\]

The average weights each close of the last n periods with its weight:

\[\text{VAMA} = \frac{\sum_{i=0}^{n - 1} \text{Weight}_{t-i} \cdot \text{Close}_{t-i}}{\sum_{i=0}^{n - 1} \text{Weight}_{t-i}}\]

Where Close(t-i) and Weight(t-i) are the close and the weight i periods ago. Like the VWMA, it leans towards the prices at which most trading took place, and since the weight includes the close, also somewhat towards the higher prices of the window.

A moving average smooths the price by averaging it over the last n periods, so that the trend shows through the noise of single periods. It is the oldest and most widely used trend indicator: the direction of the average shows the direction of the trend, the price above (below) it an uptrend (downtrend), and other indicators, from the MACD to the Bollinger Bands, are built on it. Every moving average trades smoothness against lag: the more periods it averages, the smoother it is and the later it turns after the price. The averages differ in how they weight the prices within the window and whether they adapt their speed to the market, each a different answer to that trade-off.

Also known as: VAMA.

In the Finance Toolkit this is get_moving_average with method="volume_adjusted", the same function as Moving Average.

Example · ^GSPC · 2021 to 2025

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

from financetoolkit import Toolkit

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

toolkit.technicals.get_moving_average(method="volume_adjusted", window=50)

Which returns:

References

  • Paper Arms, R.W. Jr. (1983). “Volume Cycles in the Stock Market: Market Timing Through Equivolume Charting.” Dow Jones-Irwin, on adjusting prices for the volume traded.
  • Library Referenced against finta’s VAMA (Volume Adjusted Moving Average)
Share