Skip to content

obv module

Module with OBV.


OBV class

OBV(
    wrapper,
    input_list,
    input_mapper,
    in_output_list,
    output_list,
    param_list,
    mapper_list,
    short_name,
    **kwargs
)

On-balance volume (OBV).

It relates price and volume in the stock market. OBV is based on a cumulative total volume.

See On-Balance Volume (OBV).

Superclasses

Inherited members

Subclasses

  • vectorbtpro.indicators.custom.obv._OBV

close class property

Input array.


close_above method

OBV.close_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where close is above other.

See combine_objs.


close_below method

OBV.close_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where close is below other.

See combine_objs.


close_crossed_above method

OBV.close_crossed_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where close is crossed_above other.

See combine_objs.


close_crossed_below method

OBV.close_crossed_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where close is crossed_below other.

See combine_objs.


close_equal method

OBV.close_equal(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where close is equal other.

See combine_objs.


close_stats method

OBV.close_stats(
    *args,
    **kwargs
)

Stats of close as generic.


custom_func method

OBV.custom_func(
    close,
    volume
)

Custom function.


obv class property

Output array.


obv_above method

OBV.obv_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where obv is above other.

See combine_objs.


obv_below method

OBV.obv_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where obv is below other.

See combine_objs.


obv_crossed_above method

OBV.obv_crossed_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where obv is crossed_above other.

See combine_objs.


obv_crossed_below method

OBV.obv_crossed_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where obv is crossed_below other.

See combine_objs.


obv_equal method

OBV.obv_equal(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where obv is equal other.

See combine_objs.


obv_stats method

OBV.obv_stats(
    *args,
    **kwargs
)

Stats of obv as generic.


plot method

_OBV.plot(
    column=None,
    obv_trace_kwargs=None,
    add_trace_kwargs=None,
    fig=None,
    **layout_kwargs
)

Plot OBV.obv.

Args

column : str
Name of the column to plot.
obv_trace_kwargs : dict
Keyword arguments passed to plotly.graph_objects.Scatter for OBV.obv.
add_trace_kwargs : dict
Keyword arguments passed to fig.add_trace when adding each trace.
fig : Figure or FigureWidget
Figure to add traces to.
**layout_kwargs
Keyword arguments passed to fig.update_layout.

Usage

>>> vbt.OBV.run(ohlcv['Close'], ohlcv['Volume']).plot().show()


run class method

OBV.run(
    close,
    volume,
    short_name='obv',
    hide_params=None,
    hide_default=True,
    **kwargs
)

Run OBV indicator.

  • Inputs: close, volume
  • Outputs: obv

Pass a list of parameter names as hide_params to hide their column levels, or True to hide all. Set hide_default to False to show the column levels of the parameters with a default value.

Other keyword arguments are passed to IndicatorBase.run_pipeline.


volume class property

Input array.


volume_above method

OBV.volume_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where volume is above other.

See combine_objs.


volume_below method

OBV.volume_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where volume is below other.

See combine_objs.


volume_crossed_above method

OBV.volume_crossed_above(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where volume is crossed_above other.

See combine_objs.


volume_crossed_below method

OBV.volume_crossed_below(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where volume is crossed_below other.

See combine_objs.


volume_equal method

OBV.volume_equal(
    other,
    level_name=None,
    allow_multiple=True,
    **kwargs
)

Return True for each element where volume is equal other.

See combine_objs.


volume_stats method

OBV.volume_stats(
    *args,
    **kwargs
)

Stats of volume as generic.