groupeduniverse#

API documentation for tradingstrategy.utils.groupeduniverse Python module in Trading Strategy.

Module description#

Creation of per-trading pair Pandas dataframes.

  • Base classes for handling OHLCV data for price and liquidity

  • Group raw multipair pandas.DataFrame to grouped format, so that reading and indexing individual trading pair data is easy in multipair trading universe

See also

Classes#

PairGroupedUniverse

A base class for manipulating columnar price/liquidity data by a pair.

Functions#

filter_bad_wicks(df[, threshold])

Mark the bad wicks.

filter_for_pairs(samples, pairs)

Filter dataset so that it only contains data for the trading pairs from a certain exchange.

filter_for_single_pair(samples, pair)

Filter dataset so that it only contains data for a single trading pair.

fix_bad_wicks(df[, threshold, ...])

Correct out bad high/low values in OHLC data.

remove_zero_candles(df)

Remove any candle that has a zero value for OHLC

resample_candles(df, resample_freq)

Downsample or upsample OHLCV candles or liquidity samples.

resample_series(series, new_timedelta[, ...])

Downsample or upsample liquidity series.