[R-SIG-Finance] Scale parameter in fit.control option from "ugarchfit" rugarch function
alexios ghalanos
alexios at 4dscape.com
Fri Jun 20 18:39:55 CEST 2014
Scaling of the data is just an optimization "trick" used in order to
make some of the variables (mainly the conditional mean and GARCH
intercepts) comparable in "scale" to the other variables during
optimization, WITHOUT having to tinker with solver control parameters.
After the optimization is completed, the parameters which are impacted
(mean, xreg and GARCH intercept) are transformed back to their original
scale.
I really don't consider the results you provide as making "much"
difference, but if you insist, you can always adjust the solver.control
parameters with varying degrees of success:
model0=ugarchfit(spec,as.xts(sp500ret),solver = "hybrid", fit.control =
list(scale = 0), solver.control=list(tol=1e-12,delta=1e-11))
Estimate Std. Error t value Pr(>|t|)
omega 0.000001 0.000000 5.1105 0
alpha1 0.087436 0.007733 11.3066 0
beta1 0.905252 0.008547 105.9204 0
model1=ugarchfit(spec,as.xts(sp500ret),solver = "hybrid", fit.control =
list(scale = 1))
Estimate Std. Error t value Pr(>|t|)
omega 0.000001 0.000000 5.1084 0
alpha1 0.087479 0.007742 11.2994 0
beta1 0.905254 0.008547 105.9109 0
cf1 = coef(model1)
cf0 = coef(model0)
se1 = sqrt(diag(vcov(model1)))
se0 = sqrt(diag(vcov(model0)))
(Log Relative Error : number of digits of accuracy)
LRE.vars = -log(abs(cf1-cf0)/abs(cf0), base = 10)
LRE.se = -log(abs(se1-se0)/abs(se1), base = 10)
(likelihood(model0)/likelihood(model1))-1
Note that scaling is not always available e.g. when using the eGARCH
model or when using external variables in the conditional variance equation.
Regards,
Alexios
On 20/06/2014 17:06, Jaimie Villanueva wrote:
> Hi R users
>
> I'm interested in to know a bit more on what the scale parameter of
> the "ugarchfit" fit.control option is about. I took a look inside the code
> and i found out that the data is divided by the standard deviation when the
> scale option is turned on (scale=1).
>
> Parameters estimated are slightly different when this option is on,
> compared with when it is off. I would like to get some reference in which i
> can read about, just to make myself sure that i'm not missing anything when
> using this option. Scaling the data provides successful estimates that
> couldn't be achieved without it.
> Is it recommended to leave this option on (scale=1) or just to use it
> whenever is strictly necessary?
>
> Here is the comparison i got, switching scaling option on/off.
> The model is a standard Garch(1,1) with normal innovations
>
> *The code:*
>
> library(rugarch)
> library(xts)
>
> data(sp500ret)
>
> spec=ugarchspec(variance.model = list(model = "sGARCH", garchOrder =
> c(1,1)),
> mean.model = list(armaOrder = c(0,0), include.mean =
> FALSE),
> distribution.model = "norm")
>
> modelo=ugarchfit(spec,as.xts(sp500ret),solver = "hybrid", fit.control =
> list(scale = 1))
> modelo
>
> *Results:*
>
> Scale Off
>
> Estimate Std. Error t value Pr(>|t|)
> omega 0.000001 0.000001 1.4048 0.16007
> alpha1 0.087257 0.013596 6.4179 0.00000
> beta1 0.905045 0.013744 65.8483 0.00000
>
>
> Scale On
>
> Estimate Std. Error t value Pr(>|t|)
> omega 0.000001 0.000001 1.3055 0.19173
> alpha1 0.087479 0.014530 6.0206 0.00000
> beta1 0.905254 0.014614 61.9434 0.00000
>
>
> Thanks a lot and have a great weekend.
>
> Jaimie
>
More information about the R-SIG-Finance
mailing list