Skip to main content

vwap

The Volume Weighted Average Price.

Measures the average typical price by volume. It is typically used with intraday charts to identify general direction.

Example:​

from openbb import obb
stock_data = obb.equity.price.historical(symbol="TSLA", start_date="2023-01-01", provider="fmp")
vwap_data = obb.technical.vwap(data=stock_data.results,anchor="D",offset=0)

Parameters​

NameTypeDescriptionDefaultOptional
dataList[Data]List of data to be used for the calculation.NoneFalse
indexstrIndex column name to use with data, by default "date".dateTrue
anchorstrAnchor period to use for the calculation, by default "D".

See Timeseries Offset Aliases below for additional options: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases | D | True | | offset | int | Offset from the current period, by default 0. | 0 | True |


Returns​

The calculated data.