Quantcast

RUGARCH ugarchfilter

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RUGARCH ugarchfilter

stoyan.stoyanov
Hi all,

A question for Alexios or someone else who has some experience with rugarch.
I am having a hard time understanding the functionality of the ugarchfilter class in the rugarch package. My understanding is that you should be able to use it to apply the estimated coefficients of an old fit to a dataset including new points (fixing the already estimated parameters and only adding the effect of the new data points to arrive at updated parameter estimates). I am not entirely sure that this is correct.

Either way, the new resulting object produces a list of coefficients (among other things) which are different from the fit coefficients. If i am correct, these are the coefficients I want to be using for forecasting when I have added a single data point to my series and I am looking for speed. However, the ugarchforecast and ugarchboot functions can only be applied to ugarchspec and ugarchfit classes.
Does that mean that in order to forecast, I need to transform my filter object into a spec object and then into a fit object (through using the fixed.pars method in ugarchspec)?
I get the feeling that this is a bit complicated to be true, so I am probably misunderstanding the functionality intended for the filter function.
Also, any additional clarification on the n.old method would be appreciated - I am having a hard time interpreting the explanation in the package documentation (which might be owed to my faulty interpretation of the object's functionality).

Thanks in advance.

Stoyan
Stoyan Stoyanov
The University of Chicago Booth School of Business
MBA Class of 2013
(312) 532-0120 | stoyanov@chicagobooth.edu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RUGARCH ugarchfilter

alexios
On 26/07/2012 16:34, stoyan.stoyanov wrote:
> Hi all,
>
> A question for Alexios or someone else who has some experience with rugarch.
> I am having a hard time understanding the functionality of the ugarchfilter
> class in the rugarch package. My understanding is that you should be able to
> use it to apply the estimated coefficients of an old fit to a dataset
> including new points (fixing the already estimated parameters and only
> adding the effect of the new data points to arrive at updated parameter
> estimates). I am not entirely sure that this is correct.

No. It does not "arrive at updated parameter estimates". The
ugarchfilter method simply "filters" the new dataset with the existing
estimated parameters to generate an "updated" conditional mean and
variance. It is exactly like performing a 1-step ahead rolling forecast
(since the filter generates t+1|t..)
>
> Either way, the new resulting object produces a list of coefficients (among
> other things) which are different from the fit coefficients.
That is NOT what happens. It does not estimate any new coefficients so
the list of coefficients is EXACTLY what you provided through the
uGARCHspec object (with fixed parameters).

> If i am
> correct, these are the coefficients I want to be using for forecasting when
> I have added a single data point to my series and I am looking for speed.
> However, the ugarchforecast and ugarchboot functions can only be applied to
> ugarchspec and ugarchfit classes.
You are not forecasting coefficients. You are forecasting the
conditional mean and variance.
> Does that mean that in order to forecast, I need to transform my filter
> object into a spec object and then into a fit object (through using the
> fixed.pars method in ugarchspec)?
> I get the feeling that this is a bit complicated to be true, so I am
> probably misunderstanding the functionality intended for the filter
> function.
Definitely misunderstanding it. I hope the previous comments clarify.
You forecast from either a uGARCHfit-class object or a uGARCHspec-class
object (with fixed parameters).
> Also, any additional clarification on the n.old method would be appreciated
> - I am having a hard time interpreting the explanation in the package
> documentation (which might be owed to my faulty interpretation of the
> object's functionality).
>
GARCH models require an estimate of the t_0 variance (usually the mean
of the squared residuals) to initialize the recursion. If you are
providing a dataset (length T) which is simply the old dataset (length
N) augmented by new data (length M), then you might want to use the
original t_0 value to filter the data (n.old=N) so that:
1. You do not have look ahead bias by using n.old=T (the bias is usually
very small, but it does not hurt to control for it).
2. Conditional variance values agree exactly (used internally in a
variety of cases where this is important to control for).


> Thanks in advance.
>
> Stoyan
>
>
>
> -----
> Stoyan Stoyanov
> The University of Chicago Booth School of Business
> MBA Class of 2013
> (312) 532-0120 | [hidden email]
> --
> View this message in context: http://r.789695.n4.nabble.com/RUGARCH-ugarchfilter-tp4637949.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
>
- Alexios

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RUGARCH ugarchfilter

Eric Zivot
Given the recent posts on the use of the very nice rugarch package, I
thought I would point out my lecture notes on GARCH from my Quantitative
Risk Management course at UW. I use the rugarch and rmgarch packages
extensively in the course and I have a number of R examples and powerpoint
slides that illustrate the use of rugarch and rmgarch. I am also writing the
univariate GARCH and multivariate GARCH chapters in my new book Modeling
Financial Time Series with R to use the rugarch and rmgarch packages (among
others).

http://faculty.washington.edu/ezivot/econ589/589syllabus.htm

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RUGARCH ugarchfilter

stoyan.stoyanov
In reply to this post by alexios
Thanks Alexios,

This clarifies things. Please note that by:

"these are the coefficients I want to be using for forecasting when I have added a single data point to my series and I am looking for speed"

I never meant that I will be forecasting coefficients. I simply thought that, in addition to updating the uncmean and uncvariance, the filter function would correct coefficient estimates, which could then be used in forecasting the series and its volatility. Now I know that this is not the case.

I guess manipulating the coefficient estimates in such a way is not trivial and would require a re-fitting of the model to include the new data points. In this case, when I am looking for speed, I could simply use a fixed set of previously estimated parameters, rather than refitting the model at each step.

Also, thanks for the clarification on the n.old method. It makes more sense now.

Stoyan
Stoyan Stoyanov
The University of Chicago Booth School of Business
MBA Class of 2013
(312) 532-0120 | stoyanov@chicagobooth.edu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RUGARCH ugarchfilter

stoyan.stoyanov
In reply to this post by Eric Zivot
Eric,

Thanks for the link. This is very valuable indeed. It would have saved me days of work if I had seen your slides earlier. Much appreciated.

Stoyan
Stoyan Stoyanov
The University of Chicago Booth School of Business
MBA Class of 2013
(312) 532-0120 | stoyanov@chicagobooth.edu
Loading...