[R-SIG-Finance] News impact curve?
alexios
alexios at 4dscape.com
Mon Aug 30 16:23:14 CEST 2010
Thanks Matthieu...
Just a small correction, in the latest rgarch version, the spec object
goes first (before data) in the fitting and filtering routines, else
should be named, i.e.
garch_norm = ugarchfit(data = dmbp[,1], spec = spec_garch_norm)
fit_gjr = ugarchfit(data = dmbp[,1],spec = spec_garch_gjr)
Regards,
Alexios
On 8/30/2010 2:58 PM, Matthieu Stigler wrote:
> Excellent! Exactly what I was looking for... thanks!! Are you planing to
> put your excellent rgarch package on CRAN once? Hopefully!
>
> So a small example for people in the list in case interested in the answer:
>
> library(rgarch)
> data(dmbp)
> spec_garch_norm<-ugarchspec(variance.model = list(model = "sGARCH",
> garchOrder = c(1, 1)))
> garch_norm<-ugarchfit(dmbp[,1],
> spec_garch_norm,solver.control=list(trace=FALSE))
> spec_garch_gjr<-ugarchspec(variance.model = list(model = "gjrGARCH",
> garchOrder = c(1, 1)))
> fit_gjr = ugarchfit(dmbp[,1],spec_garch_gjr)
>
>
> ni=newsimpact(z = NULL, garch_norm)
> ni2=newsimpact(z = NULL, fit_gjr)
> plot(ni$zx, ni$zy, ylab=ni$yexpr, xlab=ni$xexpr, type="l", main = "News
> Impact Curve")
> lines(ni2$zx, ni2$zy, lty=2, col=2)
> legend("topleft", leg=c("GARCH", "gjr-GARCH"), lty=c(1,2), col=1:2,
> bg="white")
>
> Thanks!
> Le 30. 08. 10 15:09, alexios a écrit :
>> The function 'newsimpact' in the rgarch package will return the values
>> needed to plot the this, given a fitted object (alternatively use plot
>> on the fitted object and choose option 12).
>>
>> Regards,
>>
>> Alexios Ghalanos
>>
>> On 8/30/2010 1:51 PM, Matthieu Stigler wrote:
>>> Hi
>>>
>>> I searched for a function in R to compute the news impact curve of a
>>> GARCH (showing the effect on h_{t-1} of a positive/negative shock of
>>> e_t), but did not find...
>>>
>>> Before I do it manually... is anyone aware of such feature in R?
>>>
>>> Thanks!
>>>
>>> Matthieu
>>>
>>> _______________________________________________
>>> R-SIG-Finance at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions
>>> should go.
>>>
>>>
>>
>
>
>
More information about the R-SIG-Finance
mailing list