filter_for_pairs#
- filter_for_pairs(samples, pairs)[source]#
Filter dataset so that it only contains data for the trading pairs from a certain exchange.
Useful as a preprocess step for creating
tradingstrategy.candle.GroupedCandleUniverse
ortradingstrategy.liquidity.GroupedLiquidityUniverse
.- Parameters:
samples (DataFrame) – Candles or liquidity dataframe
pairs (DataFrame) – Pandas dataframe with
tradingstrategy.pair.DEXPair
content.
- Return type: