Skip to content
All library documents

Decision Tree Trading: Complexity, Overfitting, and Test Windows

Article QuantInsti blog

Summary

This article describes a directional trading experiment using a decision tree classifier and custom price-derived features rather than standard technical indicators. The features include changes in the close relative to the prior day’s range, a second-order change measure, the change in daily range, and prior returns. The author scales selected features, defines a forward-looking return target, and compares trees of increasing depth using both in-sample and out-of-sample performance.

The reported comparison is qualitative: more complex trees fit the training data well, while results on a 20-day test window are similarly poor across models. Reducing the forecast window to five days produces a more varied picture, with better test consistency for some models and poor results for others. The article attributes the mismatch partly to training once on historical data and assuming its patterns persist across the entire test period. It recommends a rolling time-series approach that trains on prior observations before each next-day prediction, while suggesting recurrent models as a possible direction. No numerical accuracy or return figures are included, and the proposed improvement is not demonstrated.

Key ideas

  • The experiment creates custom features from price changes, prior ranges, and lagged returns.
  • Forward returns are used as the target for a decision tree classifier.
  • Increasing tree complexity improves the described training fit but does not reliably improve the longer test window.
  • The article argues that a single fixed training set may not reflect changing market conditions during a test period.
  • It proposes rolling next-day prediction as a more appropriate time-series evaluation method, but does not test that approach.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.