[R-SIG-Finance] rugarch

alexios ghalanos alexios at 4dscape.com
Thu Feb 14 11:25:57 CET 2013


Check that your code is sensible and reproducible (it is not).
1. You have provided an excel file (bad form - use csv/txt/native R 
format) of prices but have not shown in your file how you go from that 
to "Gold$Rr.1000" in your code.
2. Your code on the VaR report is on another object, "X.bktest"
"report(X.bktest, type="VaR", VaR.alpha = 0.01, conf.level = 0.95)"
rather than on the object you are estimating "mod".
In fact, running the code you provided on the log returns of your 
dataset yields very reasonable results.
3. You provide your error report in an ms word file (bad form) when you 
could have easily provided us with text output.

In future, please put some more thought and consideration into your 
submitted code/questions if you expect any further help.

Regards,
Alexios

On 14/02/2013 05:41, pantea hafezian wrote:
> Dear all
>
> I have modified my program according to your recommendation but
> unfortunately I still face same problem. I attached the program, data
> and out put for your consideration.
>
> Thank you very much and waiting to hera from you.
>
> With many kind,
>
>
>
> --- On *Fri, 2/8/13, alexios ghalanos /<alexios at 4dscape.com>/* wrote:
>
>
> From: alexios ghalanos <alexios at 4dscape.com>
> Subject: Re: [R-SIG-Finance] Question
> To: "pantea hafezian" <pantea_hafezian at yahoo.com>
> Cc: r-sig-finance at r-project.org
> Date: Friday, February 8, 2013, 1:19 AM
>
> Please follow the guidelines and post a reproducible example next time.
> 1. What is data(Gold), where can we find it?
> 2. There is no model called "egarch" in the specification. It is "eGARCH"
>
> You are starting the model with 100 data points using the eGARCH model
> and the normal distribution. It is quite likely, that the solution
> converges to one which is on the boundary of covariance stationarity. I
> have replicated this :
> ########################################
> set.seed(10)
> X = rnorm(1000)
> spec =ugarchspec(variance.model=list(model="eGARCH"),distribution.model
> = "norm")
> roll = ugarchroll(spec, data = X, n.start = 100,  refit.every = 500,
> refit.window = "moving", solver = "solnp", fit.control = list(),
> calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05), keep.coef = TRUE)
> as.data.frame(roll)
> ########################################
> See the NaNs in the sigma.
>
> Solutions:
> 1. Use more more data for the estimation start (e.g. 200).
> 2. Use a different model (e.g. sGARCH, gjrGARCH etc).
>
> Also, read some of the older posts in this forum on the amount of data
> to use and why it is a bad idea to use so little data.
>
> -Alexios
>
> On 08/02/2013 01:34, pantea hafezian wrote:
>> Dear Sir/Ms
>> Thank you for your valuable and very helpful  package (rugarch). Actually
>> I am going to compare different GARCH models  (VaR) by using this package
>> but unfortunately  I face a problem. The  problem is related  to the back
>> testing method. For instance, in Qupiectest, the value of K (LRUC)  is
>> amounting to 0 and consequently p-value is  equal to 1 for all models. I
>> performed this procedure several times with  various data but the results
>> is same as I mentioned even for your own  example. It would be appreciate
>> if let me know the result is supposed to be  like this or the problem
>> rises from my programming.
>> My program is enclosed to this email.
>> Thank you again and I look forward hearing  from you about that.
>> Sincerely Yours,
>> Pantea Hafezian
>> PhD candidate in Finance,
>> University Technology Malaysia (UTM)
>>
>
>
>
> _______________________________________________
> R-SIG-Finance at r-project.org 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