How can I estimate a GARCH(1,1) model with control variables like this: $$Y_t=a_0+a_1X_t+e_t$$ where$$ e_t\sim N(0,h_t)$$ $$h_t=b_0+b_1e_{t-1}^2+b_3h_{t-1}+b_3Z_t$$ I've checked some packages but can't fix it. Hope you guys can shed some lights!
$\begingroup$
$\endgroup$
2
-
1$\begingroup$ I'm voting to close this question as off-topic because it seems better suited for Cross Validated SE. $\endgroup$– LocalVolatilityCommented Nov 23, 2017 at 11:00
-
$\begingroup$ @LocalVolatility, this is clearly off topic on Cross Validated because Cross Validated does not deal with software implementation of this kind. $\endgroup$– Richard HardyCommented Nov 24, 2017 at 19:19
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
Here is how you do that in R with library "rugarch":
library(rugarch)
#n=1e3; set.seed(1); x=rnorm(n); set.seed(2); y=rnorm(n); set.seed(3); z=rnorm(n)
spec = ugarchspec(variance.model = list(external.regressors = cbind(z)), mean.model = list(armaOrder = c(0, 0), external.regressors = cbind(x)))
fit = ugarchfit(spec = spec, data = y)
The object fit
contains the fitted model. If you uncomment the second line, you can try it out with randomly generated data.
(I suppose you meant $b_2$ -- not $b_3$ -- before $h_{t-1}$.)