groupeduniverse#

tradingstrategy.utils.groupeduniverse Python module in Trading Strategy framework.

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.

resample_candles(df, new_timedelta)

Downsample OHLCV candles or liquidity samples to less granular time bucket.