Skip to content
All library documents

Why Random Forest Models May Overfit Financial Price Levels

Article Quant Q&A · Author: F0l0w

Summary

The document asks whether a Random Forest can be applied directly to a non-stationary financial series or whether the data should first be differenced. The reply warns that fitting the model to price levels can lead it to learn those levels and overfit, and recommends using first-order log differences instead. The core lesson is to consider the representation of a financial series before training a predictive model, since raw levels can carry trends that obscure the target relationship.

The response is brief and offers no data, experiments, or comparison of alternative transformations. It does not establish that differencing is always appropriate, explain how to select features or prediction targets, or discuss validation and leakage controls. Its recommendation should therefore be treated as a caution about price-level inputs, not as a complete modeling recipe or a guarantee that a Random Forest on returns will generalize.

Key ideas

  • Applying a Random Forest directly to price levels may encourage the model to fit the levels themselves.
  • The reply recommends first-order log differences as an alternative input representation.
  • The response provides no empirical comparison or validation results.
  • Differencing is presented as a cautionary recommendation, not a universal solution to time-series modeling.

Tags

Full text
# Random Forest on financial time-serie?


# Random Forest on financial time-serie?












Is it okay to apply Random Forest to a non-stationary financial serie? Or would it be correct to first difference the serie and then apply Random Forest to the new serie?

## Answer by Jacques Joubert (score 1)

https://quant.stackexchange.com/a/50941

If you apply the RF to the financial time series rather than the first order log diff then your model will overfit by learning the price levels.

I would not do it that way.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

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