Skip to content

rugarch

2 messages · pantea hafezian, Alexios Ghalanos

#
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:

            
package (rugarch). Actually
(VaR) by using this package
problem is related? to the back
test, the value of K (LRUC)? is
equal to 1 for all models. I
various data but the results
example. It would be appreciate
like this or the problem
from you about that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130213/99e5d647/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Gold-Data.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 42538 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130213/99e5d647/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Out Put.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 14077 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130213/99e5d647/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Program.text
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130213/99e5d647/attachment.pl>
#
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: