├── Double Exponential Smoothing (Holt's Method) - Monthly and Annual Forescast.ipynb ├── LICENSE ├── Moving Averages - Monthly Forescast.ipynb ├── README.md ├── Simple Exponential Smoothing - Monthly and Annual Forecast.ipynb └── Triple Exponential Smoothing (Holt-Winters Method) - Monthly and Annual Forescast.ipynb /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Renato Maynard Etchepare 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 📈 Time Series Forecasting Methods 2 | 3 | This repository contains Python implementations of essential **time series forecasting methods**, including: 4 | 5 | - ✅ **Simple Exponential Smoothing (SES)** 6 | - ✅ **Double Exponential Smoothing (Holt's Method)** 7 | - ✅ **Triple Exponential Smoothing (Holt-Winters Method)** 8 | - ✅ **Moving Averages** 9 | 10 | The goal of this repository is to **demonstrate and compare forecasting techniques** using synthetic demand data with trend and seasonality. 11 | 12 | --- 13 | 14 | ## 📊 Methods Covered 15 | 16 | ### 1. Simple Exponential Smoothing (SES) 17 | - Suitable for data without trend or seasonality. 18 | - Forecasts future values as a constant level, adjusted with a smoothing factor. 19 | 20 | ### 2. Double Exponential Smoothing (Holt's Method) 21 | - Handles data with a trend. 22 | - Forecast incorporates both level and trend components. 23 | 24 | ### 3. Triple Exponential Smoothing (Holt-Winters Method) 25 | - Handles data with both trend and seasonality. 26 | - Forecasts are adjusted for seasonal patterns (additive and multiplicative). 27 | 28 | ### 4. Moving Averages 29 | - Simple method using the mean of past observations. 30 | - Used for short-term forecasts and smoothing series. 31 | 32 | --- 33 | 34 | ## 🚀 Features 35 | 36 | - ✅ **Self-contained synthetic datasets** — no external files required. 37 | - ✅ **Clean, well-commented Python code** ready for educational and practical use. 38 | - ✅ Automatic **forecast extension** for future periods. 39 | - ✅ **Graphical visualizations** for each method. 40 | - ✅ **Error analysis**: MSE, MAPE, MAD. 41 | - ✅ Statistical tests (Ljung-Box) for autocorrelation checking. 42 | 43 | --- 44 | 45 | ## 🛠️ Technologies Used 46 | 47 | - **Python 3.x** 48 | - **pandas** — Data manipulation 49 | - **NumPy** — Numerical computations 50 | - **matplotlib** — Plotting and visualization 51 | - **scikit-learn** — Error metrics (MSE, MAPE, MAD) 52 | - **statsmodels** — Time series models and statistical tests 53 | 54 | --- 55 | 56 | ## ✅ How to Run 57 | 58 | 1. **Clone this repository:** 59 | ```bash 60 | git clone https://github.com/RenatoMaynard/time-series-forecasting-methods.git 61 | ``` 62 | 2. **Install required packages** 63 | ```bash 64 | pip install pandas matplotlib numpy scikit-learn statsmodels 65 | ``` 66 | 67 | --- 68 | 69 | ## Acknowledgments 70 | This project is designed for educational purposes to understand time series forecasting techniques in Python. 71 | 72 | --- 73 | 74 | ## ⚠️ Disclaimer 75 | This project is for educational purposes only. Errors may exist. Please report issues or contribute improvements via pull requests. 76 | 77 | --- 78 | 79 | ## License 80 | This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details. 81 | 82 | 83 | --------------------------------------------------------------------------------