Skip to content
GetProfitable
Search
Dictionary

Random forest

An ensemble of decision trees, each fitted on a resampled subset of rows and features, averaged together. A reasonable first non-linear model for market data.

Averaging many decorrelated trees cuts variance sharply compared with a single tree, which makes forests relatively hard to overfit and forgiving of unscaled features. They also capture interactions between features without you specifying them.

The trading-specific problem is that the standard bagging step assumes rows are independent. Financial rows are not, because of overlapping labels and autocorrelation, so the out-of-bag error estimate is optimistic and cannot be used as a validation score.

They also cannot extrapolate. A forest trained on a volatility range of 8% to 35% will predict as if capped when volatility reaches 70%, which is precisely the moment its output matters most.

Related: gradient-boosting, bias-variance-tradeoff, purged-cross-validation, feature-importance

Educational only, not advice. Spotted an error? Post in Site Feedback.