Download the source code from here:
https://onepagecode.substack.com/
This video offers a step-by-step tutorial on time series forecasting using Python, focusing on financial data like Bitcoin prices. Starting with the installation of essential libraries like pmdarima, it covers the entire workflow of time series analysis, including data preprocessing, visualization, model selection, and evaluation. Key topics such as resampling, train/test splitting, log returns calculation, Dickey-Fuller test, ARMA and ARIMA model fitting, and forecasting are thoroughly explained. The tutorial is designed for those interested in applying statistical methods to predict financial markets, providing practical insights into selecting the best model based on criteria like the Akaike Information Criterion (AIC) and evaluating its performance through error metrics.
00:00:00 Install pmdarima Python library
00:00:19 Imports libraries and sets up plotting
00:02:29 Reads and plots Bitcoin price data
00:03:27 Drop columns, take log, plot, display
00:04:55 Resamples daily data within specified date range
00:05:45 Split DataFrame and plot train/valid data
00:07:01 Calculate and plot log returns
00:08:36 Performs Dickey-Fuller test on time series
00:10:21 Calculates rolling mean and standard deviation
00:11:41 Plots ACF and PACF of data
00:13:01 Select ARMA order based on AIC
00:14:13 Fits ARMA model to data
00:15:49 Fits ARIMA model, plots original vs fitted
00:18:02 Plotting predicted vs original stock prices
00:19:25 Generate time series stock price forecast
00:21:33 Calculates error metrics for forecasting model
00:23:03 Fits auto ARIMA model and plots diagnostics