s-news
[Top] [All Lists]

need help on GARCH function

To: s-news@lists.biostat.wustl.edu
Subject: need help on GARCH function
From: Richard <hujian@gmail.com>
Date: Sat, 29 Dec 2007 23:20:23 -0600
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=L79S7/z2SwtFL1AqCrmhM55KvXM3/3lGqBIOBAMjtY0=; b=d/WiB8NGC1Hem77sdK43GamAxJGR5pcmsczg4dBf1l8R9WPj7PgK8L7BDM2C6TVxlm9j5oEbdHsXSqC6E0FljTwWMxEQrV82RIONTm64/jQt1Fq4Z33VIMOTjRPmFgcM8LHYPf7zjLU2vjjTQkl4mgjnBeuoEwpTOoXJWE7gvgo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=T/AwM6JW3SYiMAFoHc2pqI4JXNUSF2KcZNugWllFkZL00ksWwePUHilTwW8db5t+0rBErNFfTzoKXYYlamuzshgBuT2Wtj2lWSlGwsV4YbX0aVe1yHiiajSzU6bKpGCTu/ZGvX/P76kgZc+/JTeTVprTq9etqUFGqDj6VhGMuvQ=
Hi Guys,
 
I am using S+6.1 (with Finmetrics) to model financial return series, the code is like:
 
>CHN.margin=garch(DS.ret[,1:7]~arma(1, 0),~garch(1, 1))
 
where DS.ret [,1:7] is seven series (col 1 through 7), arma(1,0) means AR(1) in mean equation, garch(1,1) means p=1 and q=1 in variance equation.
 
I got the following result:
 
Iteration   0  Step Size =  1.00000  Likelihood = -1.60285
Iteration   0  Step Size =  2.00000  Likelihood = -1.00000e+010
Iteration   1  Step Size =  1.00000  Likelihood = -1.59993
Iteration   1  Step Size =  2.00000  Likelihood = -1.59727
Iteration   1  Step Size =  4.00000  Likelihood = -1.59471
Iteration   1  Step Size =  8.00000  Likelihood = -1.00000e+010
Iteration   2  Step Size =  1.00000  Likelihood = -1.59350
Iteration   2  Step Size =  2.00000  Likelihood = -1.59290
Iteration   2  Step Size =  4.00000  Likelihood = -1.59349
Iteration   3  Step Size =  1.00000  Likelihood = -1.59231
Iteration   3  Step Size =  2.00000  Likelihood = -1.59196
Iteration   3  Step Size =  4.00000  Likelihood = -1.59200
Iteration   4  Step Size =  1.00000  Likelihood = -1.59160
Iteration   4  Step Size =  2.00000  Likelihood = -1.59139
Iteration   4  Step Size =  4.00000  Likelihood = -1.59142
Iteration   5  Step Size =  1.00000  Likelihood = -1.59117
Iteration   5  Step Size =  2.00000  Likelihood = -1.59104
Iteration   5  Step Size =  4.00000   Likelihood = -1.59109
Iteration   6  Step Size =  1.00000  Likelihood = -1.59089
Iteration   6  Step Size =  2.00000  Likelihood = -1.59081
Iteration   6  Step Size =  4.00000  Likelihood = -1.59087
Iteration   7  Step Size =  1.00000  Likelihood = -1.59072
Iteration   7  Step Size =  2.00000  Likelihood = -1.59067
Iteration   7  Step Size =  4.00000  Likelihood = -1.59073
Convergence R-Square = 0.00008684686 is less than tolerance = 0.0001
Convergence reached.
Problem in x[i,  , drop = F]: Array subscript (30968) out of bounds, should be at most 4424
Use traceback() to see the call stack
When I used traceback, I got the following message:
 
> traceback()
23: eval(action, sys.parent())
22: doErrorAction("Problem in x[i,  , drop = F]: Array subscrip
t (30968) out of bounds, should be at most 4424",
21: x[i,  , drop = F]
20: sub( x@data, i,  )
19: is(x, "character") || is(x, "numeric")
18: is(x, "character") || is(x, "numeric") || is(x, "complex")
17: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
16: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
15: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
14: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
13: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
12: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
11: is(x, "character") || is(x, "numeric") || is(x, "complex")
||
10: is.rectangular(x)
9: as.rectangular(x)
8: asSeriesData(sub(x@data, i,  ))
7: seriesOrig[series.start:Ty]
6: garch(DS.ret[, 1:7] ~ arma(1, 0),  ~ garch(1, 1))
5: eval(i, local)
4: source(auto.print = auto.print, exprs = substitute(
3: script.run(exprs.literal = {
2: eval(_expression_(script.run(exprs.literal = {
1:
Message: Problem in x[i,  , drop = F]: Array subscript (30968)
out of bounds, should be at most 4424
>
 
I don't know what is wrong here. Any thoughts? Thanks in advance!!
 
Richard
<Prev in Thread] Current Thread [Next in Thread>
  • need help on GARCH function, Richard <=