Walk-Forward XGBoost for Adaptive Stock Price Forecasting
Summary
This guide describes a walk-forward workflow for forecasting stock prices with XGBoost. It motivates repeated model updates as a response to concept drift and changing data distributions. Historical price data are cleaned, adjusted prices are used, and features include RSI and lagged observations. At each prediction date, training data are drawn only from the past; an optional sliding window emphasizes recent history, and a configured retraining interval controls when the model is fit again. Predictions are compared with actual prices and assessed using measures such as R-squared.
The article explains the process conceptually but the supplied document is incomplete, so it does not provide enough detail to assess the full implementation or its reported results. It presents forecasting accuracy as the evaluation focus, without establishing that price prediction translates into profitable trades. Choices such as the lookback, window length, retraining schedule, feature scaling, and chronological split can materially affect results, and the discussion does not establish transaction-cost-aware performance or live robustness.
Key ideas
- Walk-forward optimization updates a model using only information available up to each forecast date.
- Lagged prices and RSI are used as predictive features for a future price target.
- A sliding training window can place greater emphasis on recent observations.
- Retraining frequency is a design choice that governs how quickly the model adapts.
- Forecast metrics alone do not demonstrate that the model produces profitable trading decisions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.