Volume Weighted Average Price (VWAP)
get_vwap(quotes, year, month=1, day=1, hour=0, minute=0)
||Iterable[Quote]||Iterable(such as list or an object having
• Need help with pandas.DataFrame?
||datetime, Optional||The anchor date used to start the VWAP accumulation. The earliest date in
||int, Optional||The anchor date used to start the VWAP accumulation. The earliest date in
Historical quotes requirements
You must have at least one historical quote to calculate; however, more is often needed to be useful. Historical quotes are typically provided for a single day using minute-based intraday periods. Since this is an accumulated weighted average price, different start dates will produce different results. The accumulation starts at the first period in the provided
quotes, unless it is specified in the optional
quotes is an
Iterable[Quote] collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
- This method returns a time series of all available indicator values for the
VWAPResultsis just a list of
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first period or the
startwill have a
vwap = closevalue since it is the initial starting point.
start, if specified, will be
||float, Optional||Volume Weighted Average Price|
See Utilities and Helpers for more information.
from stock_indicators import indicators # This method is NOT a part of the library. quotes = get_history_from_feed("SPY") # Calculate results = indicators.get_vwap(quotes);
About Volume Weighted Average Price (VWAP)
The Volume Weighted Average Price is a Volume weighted average of Close price, typically used on intraday data. [Discuss]