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

#
gbm_ohlc module

Module with GBMOHLCData.

## GBMOHLCData class

    GBMOHLCData(
        wrapper,
        data,
        single_key=True,
        classes=None,
        level_name=None,
        fetch_kwargs=None,
        returned_kwargs=None,
        last_index=None,
        delisted=None,
        tz_localize=None,
        tz_convert=None,
        missing_index=None,
        missing_columns=None,
        **kwargs
    )

`SyntheticData` for data generated using generate_gbm_data_1d_nb() and then resampled using ohlc_every_1d_nb().

Superclasses

- Analyzable
- AttrResolverMixin
- BaseDataMixin
- Cacheable
- Chainable
- Comparable
- Configured
- CustomData
- Data
- DataWithFeatures
- ExtPandasIndexer
- HasSettings
- IndexingBase
- OHLCDataMixin
- PandasIndexer
- Pickleable
- PlotsBuilderMixin
- Prettified
- StatsBuilderMixin
- SyntheticData
- Wrapping

Inherited members

- AttrResolverMixin.deep_getattr()
- AttrResolverMixin.post_resolve_attr()
- AttrResolverMixin.pre_resolve_attr()
- AttrResolverMixin.resolve_attr()
- AttrResolverMixin.resolve_shortcut_attr()
- BaseDataMixin.assert_has_feature()
- BaseDataMixin.assert_has_symbol()
- BaseDataMixin.get_feature()
- BaseDataMixin.get_feature_idx()
- BaseDataMixin.get_symbol()
- BaseDataMixin.get_symbol_idx()
- BaseDataMixin.has_feature()
- BaseDataMixin.has_multiple_keys()
- BaseDataMixin.has_symbol()
- BaseDataMixin.prepare_key()
- BaseDataMixin.select_features()
- BaseDataMixin.select_symbols()
- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- CustomData.get_custom_setting()
- CustomData.get_custom_settings()
- CustomData.has_custom_setting()
- CustomData.has_custom_settings()
- CustomData.key_match()
- CustomData.resolve_custom_setting()
- CustomData.set_custom_settings()
- Data.add()
- Data.add_column()
- Data.add_feature()
- Data.add_key()
- Data.add_symbol()
- Data.align_columns()
- Data.align_data()
- Data.align_index()
- Data.build_feature_config_doc()
- Data.check_dict_type()
- Data.column_stack()
- Data.concat()
- Data.dropna()
- Data.fetch()
- Data.fix_data_dict_type()
- Data.fix_dict_types_in_kwargs()
- Data.from_csv()
- Data.from_data()
- Data.from_data_str()
- Data.from_duckdb()
- Data.from_feather()
- Data.from_hdf()
- Data.from_parquet()
- Data.from_sql()
- Data.get()
- Data.get_base_setting()
- Data.get_base_settings()
- Data.get_feature_wrapper()
- Data.get_key_wrapper()
- Data.get_keys()
- Data.get_symbol_wrapper()
- Data.has_base_setting()
- Data.has_base_settings()
- Data.has_key_dict()
- Data.indexing_func()
- Data.invert()
- Data.invert_data()
- Data.merge()
- Data.modify_state()
- Data.override_feature_config_doc()
- Data.plot()
- Data.prepare_dt()
- Data.prepare_dt_column()
- Data.prepare_dt_index()
- Data.prepare_tzaware_index()
- Data.pull()
- Data.realign()
- Data.remove()
- Data.remove_columns()
- Data.remove_features()
- Data.remove_keys()
- Data.remove_symbols()
- Data.rename()
- Data.rename_columns()
- Data.rename_features()
- Data.rename_in_dict()
- Data.rename_keys()
- Data.rename_symbols()
- Data.replace()
- Data.resample()
- Data.resolve_base_setting()
- Data.resolve_columns()
- Data.resolve_features()
- Data.resolve_key_arg()
- Data.resolve_keys()
- Data.resolve_keys_meta()
- Data.resolve_symbols()
- Data.row_stack()
- Data.run()
- Data.select()
- Data.select_classes()
- Data.select_columns()
- Data.select_delisted()
- Data.select_feature_from_dict()
- Data.select_feature_idxs()
- Data.select_feature_kwargs()
- Data.select_fetch_kwargs()
- Data.select_from_dict()
- Data.select_key_from_dict()
- Data.select_key_kwargs()
- Data.select_keys()
- Data.select_last_index()
- Data.select_returned_kwargs()
- Data.select_run_func_args()
- Data.select_run_func_kwargs()
- Data.select_symbol_from_dict()
- Data.select_symbol_idxs()
- Data.select_symbol_kwargs()
- Data.set_base_settings()
- Data.sql()
- Data.switch_class()
- Data.to_csv()
- Data.to_duckdb()
- Data.to_feather()
- Data.to_feature_oriented()
- Data.to_hdf()
- Data.to_parquet()
- Data.to_sql()
- Data.to_symbol_oriented()
- Data.transform()
- Data.try_fetch_feature()
- Data.try_fetch_symbol()
- Data.try_run()
- Data.try_update_feature()
- Data.try_update_symbol()
- Data.update()
- Data.update_classes()
- Data.update_fetch_kwargs()
- Data.update_returned_kwargs()
- Data.use_feature_config_of()
- 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()
- OHLCDataMixin.get_daily_log_returns()
- OHLCDataMixin.get_daily_returns()
- OHLCDataMixin.get_drawdowns()
- OHLCDataMixin.get_log_returns()
- OHLCDataMixin.get_returns()
- OHLCDataMixin.get_returns_acc()
- 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.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()
- SyntheticData.classes
- SyntheticData.close
- SyntheticData.cls_dir
- SyntheticData.column_only_select
- SyntheticData.column_type
- SyntheticData.columns
- SyntheticData.config
- SyntheticData.daily_log_returns
- SyntheticData.daily_returns
- SyntheticData.data
- SyntheticData.delisted
- SyntheticData.dict_type
- SyntheticData.drawdowns
- SyntheticData.feature_classes
- SyntheticData.feature_config
- SyntheticData.feature_oriented
- SyntheticData.feature_wrapper
- SyntheticData.features
- SyntheticData.fetch_feature()
- SyntheticData.fetch_key()
- SyntheticData.fetch_kwargs
- SyntheticData.fetch_symbol()
- SyntheticData.freq
- SyntheticData.generate_feature()
- SyntheticData.generate_key()
- SyntheticData.group_select
- SyntheticData.has_ohlc
- SyntheticData.has_ohlcv
- SyntheticData.high
- SyntheticData.hlc3
- SyntheticData.iloc
- SyntheticData.index
- SyntheticData.indexing_kwargs
- SyntheticData.key_wrapper
- SyntheticData.keys
- SyntheticData.last_index
- SyntheticData.level_name
- SyntheticData.loc
- SyntheticData.log_returns
- SyntheticData.low
- SyntheticData.missing_columns
- SyntheticData.missing_index
- SyntheticData.ndim
- SyntheticData.ohlc
- SyntheticData.ohlc4
- SyntheticData.ohlcv
- SyntheticData.open
- SyntheticData.plots_defaults
- SyntheticData.range_only_select
- SyntheticData.rec_state
- SyntheticData.returned_kwargs
- SyntheticData.returns
- SyntheticData.returns_acc
- SyntheticData.self_aliases
- SyntheticData.shape
- SyntheticData.shape_2d
- SyntheticData.single_feature
- SyntheticData.single_key
- SyntheticData.single_symbol
- SyntheticData.stats_defaults
- SyntheticData.symbol_classes
- SyntheticData.symbol_oriented
- SyntheticData.symbol_wrapper
- SyntheticData.symbols
- SyntheticData.trade_count
- SyntheticData.tz_convert
- SyntheticData.tz_localize
- SyntheticData.update_feature()
- SyntheticData.update_key()
- SyntheticData.update_symbol()
- SyntheticData.volume
- SyntheticData.vwap
- SyntheticData.wrapper
- SyntheticData.xloc
- Wrapping.regroup()
- 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()

### generate_symbol class method

    GBMOHLCData.generate_symbol(
        symbol,
        index,
        n_ticks=None,
        start_value=None,
        mean=None,
        std=None,
        dt=None,
        seed=None,
        jitted=None,
        template_context=None,
        **kwargs
    )

Generate a symbol.

Args

`symbol` :`hashable`
  Symbol.
`index` :`pd.Index`
  Pandas index.
`n_ticks` :`int` or `array_like`

  Number of ticks per bar.

  Flexible argument. Can be a template with a context containing `symbol` and `index`.

`start_value` :`float`

  Value at time 0.

  Does not appear as the first value in the output data.

`mean` :`float`
  Drift, or mean of the percentage change.
`std` :`float`
  Standard deviation of the percentage change.
`dt` :`float`
  Time change (one period of time).
`seed` :`int`
  Seed to make output deterministic.
`jitted` :`any`
  See resolve_jitted_option().
`template_context` :`dict`
  Template context.

For defaults, see `custom.gbm` in data.

Note

When setting a seed, remember to pass a seed per symbol using symbol_dict.

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