This project demonstrates how to build a time series forecasting model using the Holt-Winters Exponential Smoothing technique on a synthetic monthly sales dataset. The goal is to model and predict future values using trend and seasonality.
- Generates 5 years (60 months) of synthetic monthly sales data with trend, seasonality, and noise
- Trains a Holt-Winters (Triple Exponential Smoothing) model using
statsmodels - Forecasts the next 12 months of sales
- Evaluates forecast accuracy using Mean Absolute Error (MAE)
- Visualizes training data, actual values, and forecasted values on one plot
- Mean Absolute Error (MAE): 8.13
The Holt-Winters model successfully captured both the upward trend and the seasonal monthly pattern in the data, producing a forecast that closely tracks actual sales — visible in the plot where the forecasted line (red) stays close to the actual test values (green).
Python, Pandas, NumPy, Matplotlib, Statsmodels, Scikit-learn
pip install -r requirements.txt
python Time_Series_forecasting.pyTime-Series-Forecasting/ │ ├── Time_Series_forecasting.py # Generates data, trains model, forecasts, plots results ├── requirements.txt └── README.md
- Test on a real-world sales dataset instead of synthetic data
- Compare against other forecasting methods (ARIMA, SARIMA, Prophet)
- Add cross-validation across multiple forecast windows
- Deploy as an interactive Streamlit demo
