In depth introduction to time series forecasting covering a broad range of models. This notebook provides an example of time series analysis on NASDAQ daily closing prices. It includes data loading, visualization, handling missing values, decomposition, hyperparameter tuning for different moving averages, ARIMA modeling, and various statistical diagnostic tests.
- Installation
- Data Loading
- Data Visualization
- Handling Missing Values
- Time Series Decomposition
- Moving Averages
- Autocorrelation and Partial Autocorrelation
- Stationarity Tests
- ARIMA Modeling
- Model Diagnostics
- Contributing
- Contact Information
!pip install openbb pandas numpy matplotlib statsmodels scikit-learn
from openbb_terminal.sdk import openbb
df_daily = openbb.stocks.load(symbol = 'ndaq')
Plots for NASDAQ daily closing prices, trend, seasonal, and residual components.
Code to identify and handle missing values in the dataset.
Decomposing the time series into observed, trend, seasonal, and residual components.
Implementation and evaluation of Simple Moving Average (SMA) and Exponential Weighted Moving Average (EWMA) with hyperparameter tuning.
Visualizing and interpreting the autocorrelation and partial autocorrelation functions.
Includes Dickey-Fuller tests and differencing to achieve stationarity.
ARIMA modeling includes the process of identifying the best-fitting ARIMA model for the time series and making predictions.
Residual analysis including ACF and PACF of residuals and squared residuals, Ljung-Box test, Kolmogorov-Smirnov test. Includes Goldfeld-Quandt test to identify any heteroskedasticity in the residuals.
We welcome contributions to this project. To contribute:
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
For any questions or inquiries, please contact [email protected] - Subject: Github Repo Q, Introduction-to-Time-Series-Forecasting.
For a full article walkthrough please visit > https://www.pyfi.com/blog/Introduction-to-Time-Series-Forecasting < and learn more about PyFi's award winning Python for Finance courses which have been trusted by the top financial institutions in the United States and Canada multiple years running here >> https://www.pyfi.com <<