6
$\begingroup$

I know that if I use this code:

tsm = TimeSeriesModelFit[ret, {"GARCH", {1, 1}}];

I can get the parameters using this:

tsm["ParameterTable"]

But I don't know how to plot the volatility, using those parameters, into something like this:

enter image description here

*Consider that an ARMA(1,1) fit the time series the most.

I know that in R one can use this code to do the same thing:

ret is the time series

tsm=garchFit(~arma(1,1)+garch(1,1),data=ret,trace=F)
v4=volatility(tsm)
vol=ts(v4,frequency=252,start=c(2003,1))
plot(vol,xlab='Tiempo',ylab='volatilidad',type='l')
$\endgroup$