Forecasting GARCH

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Forecasting GARCH

Cristian Gonzalez
Dear All,

I have a question regarding the implementation in R of the paper
"Prediction in dynamic models with time-dependent conditional variance"
by Baillie and Bollerslev, Journal of Econometrics 52 (1992) 91-113.

 

The idea is to run GARCH in one time series and after that to use
estimators in a new (several) more time series for prediction.

 

Using R, available packages (fGarch, rGarch, etc.) do not have this
routine. The predict function allows the forecast only of the previous
time series; garchpred(estimation,n.ahead=5)

 

MATLAB has this routine for a new time series using the garchpred
function; garchpred(coef,newtimeseries,5)

 

I am working only with R and I would like to continue working without
using other programs. Do you know how I can to do it in R?

 

Thanks in advance,

Cristian Gonzalez

 

 

 

   

 

**********************************************************************************************
IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the
named recipient(s) only.
If you have received this email in error, please notify the system manager or the sender immediately and do
not disclose the contents to anyone or make copies thereof.
*** SGFC scanned this email for viruses, vandals, and malicious content. ***
**********************************************************************************************
        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: Forecasting GARCH

alexios
A valid point...will aim to add this functionality to rgarch over the
weekend (at the earliest) by extending the forecast method to accept a
specification and data object instead of only a fitted object.

-Alexios Ghalanos

Cristian Gonzalez wrote:

> Dear All,
>
> I have a question regarding the implementation in R of the paper
> "Prediction in dynamic models with time-dependent conditional variance"
> by Baillie and Bollerslev, Journal of Econometrics 52 (1992) 91-113.
>
>  
>
> The idea is to run GARCH in one time series and after that to use
> estimators in a new (several) more time series for prediction.
>
>  
>
> Using R, available packages (fGarch, rGarch, etc.) do not have this
> routine. The predict function allows the forecast only of the previous
> time series; garchpred(estimation,n.ahead=5)
>
>  
>
> MATLAB has this routine for a new time series using the garchpred
> function; garchpred(coef,newtimeseries,5)
>
>  
>
> I am working only with R and I would like to continue working without
> using other programs. Do you know how I can to do it in R?
>
>  
>
> Thanks in advance,
>
> Cristian Gonzalez
>
>  
>
>  
>
>  
>
>    
>
>  
>
> **********************************************************************************************
> IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the
> named recipient(s) only.
> If you have received this email in error, please notify the system manager or the sender immediately and do
> not disclose the contents to anyone or make copies thereof.
> *** SGFC scanned this email for viruses, vandals, and malicious content. ***
> **********************************************************************************************
> [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: Forecasting GARCH

Arun.stat
In reply to this post by Cristian Gonzalez
In my best knowledge prediction for garch process was already discussed in this forum. Why dont you have some search here?

Best,

Cristian Gonzalez wrote
Dear All,

I have a question regarding the implementation in R of the paper
"Prediction in dynamic models with time-dependent conditional variance"
by Baillie and Bollerslev, Journal of Econometrics 52 (1992) 91-113.

 

The idea is to run GARCH in one time series and after that to use
estimators in a new (several) more time series for prediction.

 

Using R, available packages (fGarch, rGarch, etc.) do not have this
routine. The predict function allows the forecast only of the previous
time series; garchpred(estimation,n.ahead=5)

 

MATLAB has this routine for a new time series using the garchpred
function; garchpred(coef,newtimeseries,5)

 

I am working only with R and I would like to continue working without
using other programs. Do you know how I can to do it in R?

 

Thanks in advance,

Cristian Gonzalez

 

 

 

   

 

**********************************************************************************************
IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the
named recipient(s) only.
If you have received this email in error, please notify the system manager or the sender immediately and do
not disclose the contents to anyone or make copies thereof.
*** SGFC scanned this email for viruses, vandals, and malicious content. ***
**********************************************************************************************
        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@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.
Reply | Threaded
Open this post in threaded view
|

Re: Forecasting GARCH

Arun.stat
Well, please ignore my previous mail. I have misread that. I assumed you are talking on the garch prediction. However I think that, what you pointed there should be valid and learned there should this kind of functionality in R as well.

Best,

Arun.stat wrote
In my best knowledge prediction for garch process was already discussed in this forum. Why dont you have some search here?

Best,

Cristian Gonzalez wrote
Dear All,

I have a question regarding the implementation in R of the paper
"Prediction in dynamic models with time-dependent conditional variance"
by Baillie and Bollerslev, Journal of Econometrics 52 (1992) 91-113.

 

The idea is to run GARCH in one time series and after that to use
estimators in a new (several) more time series for prediction.

 

Using R, available packages (fGarch, rGarch, etc.) do not have this
routine. The predict function allows the forecast only of the previous
time series; garchpred(estimation,n.ahead=5)

 

MATLAB has this routine for a new time series using the garchpred
function; garchpred(coef,newtimeseries,5)

 

I am working only with R and I would like to continue working without
using other programs. Do you know how I can to do it in R?

 

Thanks in advance,

Cristian Gonzalez

 

 

 

   

 

**********************************************************************************************
IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the
named recipient(s) only.
If you have received this email in error, please notify the system manager or the sender immediately and do
not disclose the contents to anyone or make copies thereof.
*** SGFC scanned this email for viruses, vandals, and malicious content. ***
**********************************************************************************************
        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@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.
Reply | Threaded
Open this post in threaded view
|

Re: Forecasting GARCH

braverock
In reply to this post by Cristian Gonzalez
Cristian Gonzalez wrote:

> I have a question regarding the implementation in R of the paper
> "Prediction in dynamic models with time-dependent conditional variance"
> by Baillie and Bollerslev, Journal of Econometrics 52 (1992) 91-113.
>
> The idea is to run GARCH in one time series and after that to use
> estimators in a new (several) more time series for prediction.
>
> Using R, available packages (fGarch, rGarch, etc.) do not have this
> routine. The predict function allows the forecast only of the previous
> time series; garchpred(estimation,n.ahead=5)
>
> MATLAB has this routine for a new time series using the garchpred
> function; garchpred(coef,newtimeseries,5)
>
> I am working only with R and I would like to continue working without
> using other programs. Do you know how I can to do it in R?
>  
Arun was correct, this has been covered before. I asked the question
regarding fGarch, and Yohan answered. Unfortunately, I have not had time
to complete working this out for fGarch following his excellent
suggestion. The contents of our interchange are copied below:

   BGP> I've been continuing to examine the fGarch code, and I think
   BGP> that I can probably do most of what I want by fitting a model,
   BGP> overriding.series, and then calling .garchLLH although I've
   BGP> not yet confirmed that this is the case.


Yohan Chalabi wrote:

Hi Brian,

overriding .series is probably your best option. Note that .series and
other variables stored in the .fGArchEnv environment used to be global
variables. Moving those global variables to an environment was our best
solution to avoid problems with global variables without modifying to
much code.

library(fGarch)
fit <- garchFit(~garch(1,1), dem2gbp)
ls(all.names = TRUE, envir = fGarch:::.fGarchEnv)

you can use .getfGarchEnv and .getfGarchEnv to retrieve and
set new values in this environment.

Note that .series is scaled by default in .garchFit(). If you override
.series$x, do not forget to change .series$scale because it will be used
in .garchLLH.

Calling .garchLLH with fGarchEnv = TRUE will update the variables
in .fGarchEnv.


As a side note, there is a handy update method for fGARCH object. You
can re-fit the model with new parameters, for example

update(fit, ~aparch(1,1))

HTH
Yohan

   BGP>
   BGP> I understand completely that I can predict by using something
   BGP> like rollapply or apply.fromstart to repeat garchFit and then
   BGP> predict.
   BGP>
   BGP> However, I think that much of the information in a garch
   BGP> model can be extracted without refitting if we simply want
   BGP> to calculate the conditional variance without refitting the
   BGP> model.  predict() would likely also be able to be applied
   BGP> in this way.
   BGP> Any confirmation on where to look in the code would be
   BGP> appreciated.  
   BGP> As always, any modified code I work up will be contributed back.


Regards,

- Brian

--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.