upload presentation slides slide link: https://docs.google.com/presentation/d/1Kt_2Gl56Jo87mZmZWoMJRLoHvzGIbVSMc4lp8nnDthQ/edit?usp=sharing
Apply GARCH model to be able to understand if there is volatility clustering and how to predict future volatility.
Volatility - degree of variation in an asset's price over time. High Volatility = large price swings,
Volatility Clustering - Tendencies of High Volatility followed by Low Volatility
Variance of Returns =
Use Logaritmic Returns =
(1,1) just means we are comparing one lag of both variance and errors
- Collect Minute by Minute Data of the last 30 days from the election (Oct 5 - Nov 5) of Price using Binance API or get historical data
- Compute the returns too
- Store values in form of a struct in a data file vector
struct dataPoint{ int month, day, hour, minute; double bitcoinPrice; double returns; };
- Store values in form of a struct in a data file vector
- Plot the Returns on a line graph to visualize high and low volatilites
- Autocorrelation Analysis
-
$ACF(k)=\frac{\sum_{t=k+1}^T(y_t-\bar y)(y_{t-k}-\bar y)}{\sum_{t=1}^T{(y_t - \bar y)}^2}$ -
$y_t$ value of the series at time t -
$\bar y$ mean of the series - k lag
-
- Do this for lag of
$0,1,2,3...60$ . If the$|ACF(k)| \ge \pm 1.96 \sqrt(T)$ it suggests a signficiant correlation at lag k - If possible lets graph this with also the right side of inequality as one line to see the correlation. Axis: (lag k, ACF(k))
-
- Fit a GARCH(1,1) model to estimate and predict volatility
- Mathematical
$\sigma_t^2=\omega+\alpha*\epsilon_{t-1}^2+\beta*\omega_{t-1}^2$ - Assign
$\omega=0.01$ ,$\alpha=0.1$ ,$\beta = 0.85$ $\sigma_0^2 = Var(r_t)$ $e_t \textasciitilde N(0, \sigma _t^2) = y_t-\mu$ - Store all the variances based on model
- Assign
- One step ahead Forecasting -
$\sigma_{t+1}^2 = \omega+\alpha*\epsilon_t^2+\beta*\sigma_t^2$ - Start with
$\sigma_0^2=Var(r_t)$
Relevant Paper: https://arxiv.org/html/2405.12988v1 granularity of data: 1 minute frequency of data: daily crypto target: Bitcoin duration/length: 30 days real-time data version will use this API: https://github.com/niXman/binapi Collect Minute by Minute Data of the last 14 or 30 days from the election of Returns Plot the return
https://www.kaggle.com/datasets/mczielinski/bitcoin-historical-data