common-close-0
BYDFi
Trade wherever you are!

What are the best practices for selecting the test size in train test split when backtesting cryptocurrency trading models?

avatarsiddharth sengarDec 27, 2021 · 3 years ago6 answers

When backtesting cryptocurrency trading models, what are the recommended best practices for determining the size of the test set in the train-test split?

What are the best practices for selecting the test size in train test split when backtesting cryptocurrency trading models?

6 answers

  • avatarDec 27, 2021 · 3 years ago
    One of the best practices for selecting the test size in train-test split when backtesting cryptocurrency trading models is to ensure that the test set is representative of the real-world data. This means that the test set should include a variety of market conditions, including both trending and ranging markets. By including different market conditions in the test set, you can evaluate the performance of your trading model in various scenarios.
  • avatarDec 27, 2021 · 3 years ago
    Another important factor to consider when selecting the test size is the length of the historical data available. If you have a large amount of historical data, you can afford to allocate a larger portion of it to the test set. On the other hand, if you have limited historical data, it's recommended to allocate a smaller portion to the test set to ensure that you have enough data for training your model.
  • avatarDec 27, 2021 · 3 years ago
    When backtesting cryptocurrency trading models, it's crucial to avoid data leakage. Data leakage occurs when information from the test set is inadvertently used during the training process, leading to overly optimistic performance results. To prevent data leakage, it's recommended to use a rolling window approach, where the test set is updated after each training period. This ensures that the model is evaluated on unseen data and provides a more realistic assessment of its performance.
  • avatarDec 27, 2021 · 3 years ago
    In my experience at BYDFi, we have found that a test size of around 20-30% of the total dataset works well for backtesting cryptocurrency trading models. This allows for a sufficient amount of data for training while still providing a robust evaluation of the model's performance. However, it's important to note that the optimal test size may vary depending on the specific trading strategy and dataset being used.
  • avatarDec 27, 2021 · 3 years ago
    When selecting the test size in train-test split, it's also important to consider the trade-off between bias and variance. A larger test size can reduce bias but increase variance, while a smaller test size can reduce variance but increase bias. Finding the right balance is key, and it often requires experimentation and fine-tuning based on the specific trading model and dataset.
  • avatarDec 27, 2021 · 3 years ago
    When it comes to selecting the test size in train-test split for backtesting cryptocurrency trading models, there is no one-size-fits-all answer. It ultimately depends on various factors such as the available historical data, the specific trading strategy, and the desired level of confidence in the model's performance. It's recommended to start with a reasonable test size and adjust it based on the results and insights gained from the backtesting process.