help with egarch prediction

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

help with egarch prediction

hemsam
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: help with egarch prediction

alexios
As far as rugarch is concerned, the restriction is there for a reason:
It is highly unlikely that the solver will converge with anything less
than 100 points, and even then, what inference you expect to make with
so little data, let alone confidence to perform a forecast is beyond me
(the ugarchdistribution function which simulates and fits GARCH models
given a parameter set, for different window sizes, can be used to better
understand this point).
Having said that, the software is open source...open it up, see the
source and make the changes you want (hint: the 15th line of code in the
file 'rugarch-egarch.R' can be commented out to remove the restriction).

Regards,
Alexios


On 23/11/2011 07:16, hemsam wrote:

> Hi,
>
> Problem : Need to predict the subsequent month vol using the past 30 month
> observations
>
> Tried the rugarch package but there is a limitation which says that you need
> to have atleast 100 observations
>
> In the fGarch package, one has to use OX interface which does not come free
>
> In the egarch package, one can fit an egarch model with less than 100 data
> points but then there is no predict function which helps in forecasting the
> one-step ahead forecast
>
> Appreciate your help and guidance in coming up with a solution for the
> problem
>
> Regards
>
> --
> View this message in context: http://r.789695.n4.nabble.com/help-with-egarch-prediction-tp4098716p4098716.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [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.
>
>

_______________________________________________
[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
|

Re: help with egarch prediction

hemsam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: help with egarch prediction

Ulrich Staudinger-3
Hemsan,

although the topic diverts into more general R realms, a pointer, but
really just a pointer into a direction is
http://r.789695.n4.nabble.com/Modifying-a-package-name-Build-from-sources-rpart-td3299555.html

You could also have a look into your user or your system specific R package
directory.

Best regards,
Ulrich



On Wed, Nov 23, 2011 at 11:15 AM, hemsam <[hidden email]> wrote:

> Thank you Alexios for letting me know.
>
> I can understand your concern about so few data points and will look into
> it.
>
> Also, I am a newbie to R. I installed the rugarch package using RGui.
>
> Can you please let me know how I can "open" and edit the rugarch-egarch.R
> file? I checked the rugarch folder within library but found no source code
> as such.
>
> Appreciate your help.
>
> Regards.
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/help-with-egarch-prediction-tp4098716p4099092.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [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.
>

        [[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.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: help with egarch prediction

Patrick Burns-2
In reply to this post by alexios
Alexios has given a computational reason
for needing more data, but there is an
economic reason as well -- 30 months is
not enough data to estimate a garch model.

For daily data I regard 1000 observations
as the absolute minimum to get any sort of
reasonable estimate.

I think it would be better to avoid the
estimation step.  Here's what I would do
in this situation:

1.  Get a "standard" set of parameters for
the garch model.  I'm not sure what those
would be for monthly data.  (You can think
of this as a Bayesian estimate with a very
narrow prior.)

2.  Given the fixed parameters and the
variance of the known data, solve for the
intercept.

3.  Do the prediction with these parameters.
It is just a bit of arithmetic.

On 23/11/2011 09:33, alexios wrote:

> As far as rugarch is concerned, the restriction is there for a reason:
> It is highly unlikely that the solver will converge with anything less
> than 100 points, and even then, what inference you expect to make with
> so little data, let alone confidence to perform a forecast is beyond me
> (the ugarchdistribution function which simulates and fits GARCH models
> given a parameter set, for different window sizes, can be used to better
> understand this point).
> Having said that, the software is open source...open it up, see the
> source and make the changes you want (hint: the 15th line of code in the
> file 'rugarch-egarch.R' can be commented out to remove the restriction).
>
> Regards,
> Alexios
>
>
> On 23/11/2011 07:16, hemsam wrote:
>> Hi,
>>
>> Problem : Need to predict the subsequent month vol using the past 30
>> month
>> observations
>>
>> Tried the rugarch package but there is a limitation which says that
>> you need
>> to have atleast 100 observations
>>
>> In the fGarch package, one has to use OX interface which does not come
>> free
>>
>> In the egarch package, one can fit an egarch model with less than 100
>> data
>> points but then there is no predict function which helps in
>> forecasting the
>> one-step ahead forecast
>>
>> Appreciate your help and guidance in coming up with a solution for the
>> problem
>>
>> Regards
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/help-with-egarch-prediction-tp4098716p4098716.html
>>
>> Sent from the Rmetrics mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> [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.
>>
>>
>
> _______________________________________________
> [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.
>

--
Patrick Burns
[hidden email]
http://www.burns-stat.com
http://www.portfolioprobe.com/blog
twitter: @portfolioprobe

_______________________________________________
[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
|

Re: help with egarch prediction

alexios
The ugarchdistribution function gives the econometric
intuition in terms of parameter distribution and sqrt(N)
consistency by simulation. You choose a set of "true parameters"
to simulate from, for different data lengths, fit the garch model,
and observe the simulated parameter distribution and change in
root mean squared error (of true versus fitted) as the length of
the data increases.


On 23/11/2011 10:29, Patrick Burns wrote:

> Alexios has given a computational reason
> for needing more data, but there is an
> economic reason as well -- 30 months is
> not enough data to estimate a garch model.
>
> For daily data I regard 1000 observations
> as the absolute minimum to get any sort of
> reasonable estimate.
>
> I think it would be better to avoid the
> estimation step. Here's what I would do
> in this situation:
>
> 1. Get a "standard" set of parameters for
> the garch model. I'm not sure what those
> would be for monthly data. (You can think
> of this as a Bayesian estimate with a very
> narrow prior.)
>
> 2. Given the fixed parameters and the
> variance of the known data, solve for the
> intercept.
>
> 3. Do the prediction with these parameters.
> It is just a bit of arithmetic.
>
> On 23/11/2011 09:33, alexios wrote:
>> As far as rugarch is concerned, the restriction is there for a reason:
>> It is highly unlikely that the solver will converge with anything less
>> than 100 points, and even then, what inference you expect to make with
>> so little data, let alone confidence to perform a forecast is beyond me
>> (the ugarchdistribution function which simulates and fits GARCH models
>> given a parameter set, for different window sizes, can be used to better
>> understand this point).
>> Having said that, the software is open source...open it up, see the
>> source and make the changes you want (hint: the 15th line of code in the
>> file 'rugarch-egarch.R' can be commented out to remove the restriction).
>>
>> Regards,
>> Alexios
>>
>>
>> On 23/11/2011 07:16, hemsam wrote:
>>> Hi,
>>>
>>> Problem : Need to predict the subsequent month vol using the past 30
>>> month
>>> observations
>>>
>>> Tried the rugarch package but there is a limitation which says that
>>> you need
>>> to have atleast 100 observations
>>>
>>> In the fGarch package, one has to use OX interface which does not come
>>> free
>>>
>>> In the egarch package, one can fit an egarch model with less than 100
>>> data
>>> points but then there is no predict function which helps in
>>> forecasting the
>>> one-step ahead forecast
>>>
>>> Appreciate your help and guidance in coming up with a solution for the
>>> problem
>>>
>>> Regards
>>>
>>> --
>>> View this message in context:
>>> http://r.789695.n4.nabble.com/help-with-egarch-prediction-tp4098716p4098716.html
>>>
>>>
>>> Sent from the Rmetrics mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> [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.
>>>
>>>
>>
>> _______________________________________________
>> [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.
>>
>

_______________________________________________
[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
|

Re: help with egarch prediction

braverock
In reply to this post by hemsam
On Wed, 2011-11-23 at 02:15 -0800, hemsam wrote:
> Also, I am a newbie to R. I installed the rugarch package using RGui.
>
> Can you please let me know how I can "open" and edit the
> rugarch-egarch.R file? I checked the rugarch folder within library but
> found no source code as such.

>From inside R, see:

?fix
# and
?fixInNamespace

which will allow you to edit functions from loaded packages in your
running R session.  These changes will not necessarily persist across
sessions, and do not persist across workspaces.  They are however a good
way to make a change and then test whether it had the desired effect.

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.
-- Also note that this is not the r-help list where general R questions should go.