One important issue of using volume pairlist on dry/live trading

One important issue of using volume pairlist on dry/live is your backtest might be inaccurate if you are using small pairlist for backtest. It’s acceptable to use a small pairlist if you’re using the same list for dry/live trading. However, you aren’t doing an effective backtest if you are using a volume pairlist on dry/live and a small pairlist on backtest. You could question, “Why is that?”. When you use volume pairlist, you are using the top x pairs according to trading volume at that time. The list will be updated frequently at a certain time to ensure that you always get the most recent top x volume pairs. Some coins, like BTC and ETH, will always be among the top x volume pairs. But as time goes on, some, particularly those with small market caps, are moving in and out of your volume pairlist.

You neglect this trading volume effect when you backtest utilizing the same small pairlist over a long period of time. It’s acceptable if you utilize the same list for live trading, as was previously stated. However, if you are utilizing a volume pairlist, your backtest doesn’t accurately reflect the state of the market at that time. Other pairs that might have been among the top x at that point are not tested for your strategy. Your strategy won’t be properly evaluated on that market if you do this.

As an illustration of why this is bad practice, consider how frequently a pump-and-dump coins enters and exits the top x volume due to volume changes. Your strategy isn’t tested against that p&d scenario because that coin isn’t in your pairlist. How would you determine whether your strategy performed well versus p&d coins then?

You would get a better grasp of how your strategy performed in the past by backtesting it with a solid pairlist. Although it won’t be exact, the outcome should be more similar to actual trading if you are using an effective pairlist. Ultimately, we can only verify the effectiveness of our strategy through historical data, thus a solid pairlist is essential. So how do you create a solid pairlist? There are, in my opinion, two ways to do it:

  1. Make pairlists that closely resemble the top x volume pairs at a certain timeframe. This github repository tries to accomplish it, for instance. Perform backtests using the relevant pairlist and timerange combinations after you have the pairlists.
  2. Use all possible pairs on that market. Since you won’t actually trade all of those pairs and you can’t use volume pairlist or other pairlist plugins in backtests, you’ll need to use in-strat filter(s) to ensure that your pairlist at a given point in the backtest is close enough to the equivalent top volume pairlist.

Let’s use age filter as an example to demonstrate why pairlist plugins won’t perform well on backtest. At the start of backtest, the bot will remove coins that haven’t reached the age limit at the present, not at the backtest timerange. The backtest’s possibility of trading newly listed coins is the problem. In contrast, your strategy would never trade newly listed coins in live trading if you are using the age filter. This may have a good or negative effect on your backtest result, but your backtest result is almost certainly not an accurate representation of what the live results of your strategy would be. I thus include this line in my strategy for the age filter to ensure that it only trades pairs that are at least 30 days old.

@informative('1d')
def populate_indicators_1d(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    dataframe['age_filter_ok'] = (dataframe['volume'].rolling(window=30, min_periods=30).min() > 0)
    return dataframe

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *