# GARCH before and after a shock. How to test if volatilities are different?

I have an intraday dataset with minute returns for a bond. At a specific point in time, say 10:30, there is an external shock (in my case an auction where that bond is traded). I want to know whether the volatility before the shock is the same as after the shock. If I understand it correctly, using standard deviation of returns before and after the shock is not a good idea, since these returns are not independent.

1. Then, would it be a good approach to estimate a GARCH model right before (e.g. between 8:30 and 10:30) and right after the shock (between 10:30 and 12:30 or even the end of the same day)?

2. If yes, then could you please help me with R implementation. I use the following code (package rugarch):

MyModSpecify=ugarchspec(mean.model = list(armaOrder=c(0,0)),
variance.model = list(model="sGARCH",garchOrder=c(1,1)),
distribution.model = "norm")

MyModFitting=ugarchfit(data=MyData\$Return, spec=MyModSpecify, out.sample = 0)


Then running MyModFitting can print the results on the screen such that mu, omega, alpha1 and beta1 are estimated. But is there a way to save these in 4 different variables? For instance, to save the value of mu (which is simply printed on the screen) to variable MyMu.

1. Finally, suppose I run this for the period before the shock and then after the shock for different days. Then for each day I will have estimates of mu, omega, alpha1 and beta1 before the shock and after the shock. Then how can I test if volatility is different before the shock and after the shock?

Thank you!

Logarithmic returns may be dependent (as in GARCH), but they may still be uncorrelated. If that is the case, $$\text{Var}(r_1+\dots+r_n)=\text{Var}(r_1)+\dots+\text{Var}(r_n)$$. And if empirically that is not too far from reality, you could just estimate the variances as usual in the two periods and test whether they are equal; there are a few classical tests for that.
If you want to do GARCH, consider estimating the model for the entire time period (without splitting into two) with the following conditional variance equation: $$\sigma_t^2 = \omega +\tilde\omega D + \alpha_1\varepsilon_{t-1}^2 + \tilde\alpha_1 D\varepsilon_{t-1}^2 + \beta_1\sigma_{t-1}^2 + \tilde\beta_1 D\sigma_{t-1}^2$$ where $$D$$ is a dummy variable indicating the period during and after the event. Under $$H_0$$ of the event having no influence on the variance, $$\tilde\omega=\tilde\alpha_1=\tilde\beta_1=0$$. (You could simplify and skip some terms in the model; the simplest version would include only $$\tilde\omega D$$ but not the other two. Then it is just about the statistical significance of the estimate of $$\tilde\omega D$$.)
Implementation wise, look for external regressors in the variance equation. Including $$\tilde\omega D$$ is straightforward. Including $$\tilde\alpha_1 D$$ is probably easy if your conditional mean equation is just a constant. Including $$\tilde\beta_1 D$$ may be more challenging. For simplicity, some people use ARCHX instead of GARCH where they replace $$\sigma_{t-1}^2$$ from GARCH with estimated variance from a rolling window.