Volume Weighted Average Price (VWAP)
Calculate the Volume Weighted Average Price (VWAP) for a given price series.
The Volume Weighted Average Price (VWAP) weighs the typical price of each period by its traded volume over a rolling window, giving a more volume-informed view of the average price than a plain moving average.
The formula is as follows:
\[\text{Typical Price} = (\text{High} + \text{Low} + \text{Close}) / 3\] \[\text{VWAP} = \operatorname{Sum}(\text{Typical Price} \cdot \text{Volume},\; \text{Window}) / \operatorname{Sum}(\text{Volume},\; \text{Window})\]Also known as: VWAP.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Volume Weighted Average Price (VWAP) for you. Just ask in plain English.
Calculate the Volume Weighted Average Price (VWAP) in Python
The Volume Weighted Average Price (VWAP) is available in the Technicals module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_volume_weighted_average_price as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(tickers=["AAPL", "MSFT"])
toolkit.technicals.get_volume_weighted_average_price()
Which returns:
| Date | AAPL | MSFT | Benchmark |
|---|---|---|---|
| 2026-06-18 | 300.742 | 408.527 | 745.79 |
| 2026-06-22 | 300.078 | 401.871 | 744.779 |
| 2026-06-23 | 298.585 | 397.059 | 742.923 |
| 2026-06-24 | 297.358 | 392.639 | 741.423 |
| 2026-06-25 | 294.781 | 387.266 | 739.795 |
| 2026-06-26 | 293.098 | 384.145 | 739.184 |
| 2026-06-29 | 291.684 | 381.061 | 739.311 |
| 2026-06-30 | 291.599 | 378.891 | 740.005 |
| 2026-07-01 | 291.799 | 377.956 | 741.457 |
| 2026-07-02 | 292.727 | 377.967 | 741.959 |
Parameters
get_volume_weighted_average_price accepts the following parameters:
- period (str, optional): The time period to consider for historical data. Can be “daily”, “weekly”, “quarterly”, or “yearly”. Defaults to “daily”.
- close_column (str, optional): The column name for closing prices in the historical data. Defaults to “Adj Close”.
- window (int, optional): Number of periods to consider for the VWAP. The number of periods (time intervals) over which to calculate the VWAP.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the VWAP. Defaults to False.
- lag (int | list[int], optional): The lag to use for the growth calculation.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. Defaults to 1.
Related Overlap Indicators
The Technicals module page introduces the module, and the sidebar lists all of its functions.