Skip to content

VolumeWeightedAveragePrice


class backtide.indicators.VolumeWeightedAveragePrice()

Volume-Weighted Average Price (VWAP).

The cumulative average price weighted by volume. Institutional traders use VWAP as a benchmark: buying below VWAP is considered favorable, selling above it likewise. Useful as an intraday trading benchmark, for assessing execution quality, and as dynamic support/resistance.

Formula:

\[VWAP_t = \frac{\sum_{i=1}^{t} TP_i \cdot V_i}{\sum_{i=1}^{t} V_i}\]

where \(TP_i = \frac{H_i + L_i + C_i}{3}\). Read more on Wikipedia.

Attributes

acronym : str

Short ticker-style acronym.

name : str
Human-readable indicator name.


See Also

OnBalanceVolume

On-Balance Volume (OBV).

SimpleMovingAverage

Simple Moving Average (SMA).

WeightedMovingAverage

Weighted Moving Average (WMA).


Methods

compute Compute the indicator on a dataset.
description Short explanation of what the indicator measures.


method backtide.indicatorscompute(data)

Compute the indicator on a dataset.

Parameters

data : np.ndarray | pd.DataFrame | pl.DataFrame

Historical OHLCV data.

Returns

np.ndarray | pd.Series | pl.Series | pd.DataFrame | pl.DataFrame

The computed values. For multi-output indicators (e.g., upper and lower bounds), return a 2d structure.



method backtide.indicatorsdescription()

Short explanation of what the indicator measures.

Returns

str

The description.