Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

#
obv module

Module with OBV.

## OBV class

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

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

- Analyzable
- AttrResolverMixin
- Cacheable
- Chainable
- Comparable
- Configured
- ExtPandasIndexer
- HasSettings
- IndexingBase
- IndicatorBase
- PandasIndexer
- Pickleable
- PlotsBuilderMixin
- Prettified
- StatsBuilderMixin
- Wrapping
- `vectorbtpro.indicators.custom.obv.ParamIndexer`

Inherited members

- AttrResolverMixin.deep_getattr()
- AttrResolverMixin.post_resolve_attr()
- AttrResolverMixin.pre_resolve_attr()
- AttrResolverMixin.resolve_attr()
- AttrResolverMixin.resolve_shortcut_attr()
- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- IndexingBase.indexing_setter_func()
- IndicatorBase.cls_dir
- IndicatorBase.column_only_select
- IndicatorBase.column_stack()
- IndicatorBase.config
- IndicatorBase.dropna()
- IndicatorBase.group_select
- IndicatorBase.iloc
- IndicatorBase.in_output_names
- IndicatorBase.indexing_func()
- IndicatorBase.indexing_kwargs
- IndicatorBase.input_names
- IndicatorBase.lazy_output_names
- IndicatorBase.level_names
- IndicatorBase.loc
- IndicatorBase.output_flags
- IndicatorBase.output_names
- IndicatorBase.param_names
- IndicatorBase.plots_defaults
- IndicatorBase.range_only_select
- IndicatorBase.rec_state
- IndicatorBase.row_stack()
- IndicatorBase.run_combs()
- IndicatorBase.run_pipeline()
- IndicatorBase.self_aliases
- IndicatorBase.short_name
- IndicatorBase.stats_defaults
- IndicatorBase.to_dict()
- IndicatorBase.to_frame()
- IndicatorBase.unpack()
- IndicatorBase.wrapper
- IndicatorBase.xloc
- PandasIndexer.xs()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()
- PlotsBuilderMixin.build_subplots_doc()
- PlotsBuilderMixin.override_subplots_doc()
- PlotsBuilderMixin.plots()
- StatsBuilderMixin.build_metrics_doc()
- StatsBuilderMixin.override_metrics_doc()
- StatsBuilderMixin.stats()
- Wrapping.regroup()
- Wrapping.resample()
- Wrapping.resolve_column_stack_kwargs()
- Wrapping.resolve_row_stack_kwargs()
- Wrapping.resolve_self()
- Wrapping.resolve_stack_kwargs()
- Wrapping.select_col()
- Wrapping.select_col_from_obj()
- Wrapping.split()

Subclasses

- `vectorbtpro.indicators.custom.obv._OBV`

### close 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
    )

2-dim version of `obv_1d_nb`.

### obv 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 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.

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings