Skip to main content

obv

On Balance Volume (OBV).

Is a cumulative total of the up and down volume. When the close is higher than the previous close, the volume is added to the running total, and when the close is lower than the previous close, the volume is subtracted from the running total.

To interpret the OBV, look for the OBV to move with the price or precede price moves. If the price moves before the OBV, then it is a non-confirmed move. A series of rising peaks, or falling troughs, in the OBV indicates a strong trend. If the OBV is flat, then the market is not trending.

Example:​

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

Parameters​

NameTypeDescriptionDefaultOptional
dataList[Data]List of data to apply the indicator to.NoneFalse
indexstrIndex column name, by default "date"dateTrue
offsetintHow many periods to offset the result, by default 0.0True

Returns​

List of data with the indicator applied.