filter_for_pairs#

API documentation for tradingstrategy.utils.groupeduniverse.filter_for_pairs Python function.

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 or tradingstrategy.liquidity.GroupedLiquidityUniverse.

Parameters:
Return type:

DataFrame