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_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.

resample_candles(df, resample_freq[, shift, ...])

Downsample or upsample OHLCV candles or liquidity samples.

resample_dataframe(df, resample_freq[, shift])

Resample a DataFrame to a lower frequency.

resample_price_series(series, resample_freq)

Resample a price series to a lower frequency.

resample_rolling(df[, window])

Resample OHLCV feed using a rolling window technique.

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

Downsample or upsample liquidity series.