Rolling Revenue Forecasting - Training
This workflow generates revenue forecasts using a static model training approach, where the model is trained once on historical data, and then reused in deployment to generate forecasts as time moves forward. In the deployment workflow, as time progresses, the forecast window moves forward (rolls), producing updated predictions based on the latest available inputs, but the model parameters remain unchanged.
After reading historical sales and financial data, the workflow standardizes dates for consistency, and engineers features by lagging revenue values to capture trends over time. The data is then split into a training set (2020–2022) and a test set (2023) to ensure realistic model evaluation. A Random Forest regression model is trained on the historical data, and then used to predict revenue for the testing period. The model’s performance is scored using standard metrics, and the trained model is saved for future use.