<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p class="MsoNormal">Hi all,</p>
<p class="MsoNormal">I use rugarch package 1.2-9 to measure rice
price volatility volatility with GARCH model including external
regressor in the variance model. This package works well, however,
it seems like the result doesn’t response to change in value of
external regressors. </p>
<p class="MsoNormal">I test 2 external regressors: </p>
<p class="MsoListParagraphCxSpFirst"
style="margin-left:18.0pt;mso-add-space:
auto;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span
style="mso-fareast-font-family:Arial;mso-bidi-font-family:Arial"><span
style="mso-list:Ignore">1.<span style="font:7.0pt "Times
New Roman""> </span></span></span>A matrix of dummy
variable containing only 0 and 1</p>
<p class="MsoListParagraphCxSpLast"
style="margin-left:18.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span
style="mso-fareast-font-family:Arial;mso-bidi-font-family:Arial"><span
style="mso-list:Ignore">2.<span style="font:7.0pt "Times
New Roman""> </span></span></span>Cross-sectional
stock level to price return data (attached)</p>
<p class="MsoNormal" style="text-indent:0cm">Here is the code that I
use. Can anybody advise me what’s wrong?<br>
Thanks a lot in advance.<br>
Best Regards,<br>
Dessy<br>
</p>
<p class="MsoNormal" style="text-indent:0cm"><br>
</p>
<p class="MsoListParagraph"
style="margin-left:18.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l1 level1 lfo2"><b
style="mso-bidi-font-weight:normal"><span
style="mso-fareast-font-family:Arial;
mso-bidi-font-family:Arial"><span style="mso-list:Ignore">1.<span
style="font:7.0pt "Times New Roman""> </span></span></span></b><b
style="mso-bidi-font-weight:normal">With dummy variable (0 and
1) as external regressor<o:p></o:p></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:Arial"># where the dummy variable
is define as:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial">mat <- matrix(, nrow =
n.row, ncol = 1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial">for(i in 1:652){<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial"><span
style="mso-spacerun:yes"> </span>mat[i,] <- 0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial">for(i in 501:n.row){<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial"><span
style="mso-spacerun:yes"> </span>mat[i,] <- 1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: Arial">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:"Arial Unicode MS""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:"Arial Unicode MS"">spec2
<- ugarchspec(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">variance.model
= <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">list(model
= "fGARCH", garchOrder = c(1,1), submodel = “GARCH”,
external.regressors = mat, variance.targeting = FALSE), <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">mean.model
= <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">list(armaOrder
= c(12,0), external.regressors = NULL), distribution.model =
"norm")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:"Arial Unicode MS"">fit
= ugarchfit(spec = spec2, data=xz)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS""><o:p> </o:p></span></p>
<p class="MsoListParagraph"
style="margin-left:18.0pt;mso-add-space:auto;
text-indent:-18.0pt;mso-list:l1 level1 lfo2"><o:p></o:p><b
style="mso-bidi-font-weight:normal"><span
style="mso-fareast-font-family:Arial;
mso-bidi-font-family:Arial"><span style="mso-list:Ignore">2.<span
style="font:7.0pt "Times New Roman""> </span></span></span></b><b
style="mso-bidi-font-weight:normal">With cross<span
style="mso-spacerun:yes"> </span>sectional stock level
estimation as external regressor<o:p></o:p></b></p>
<p class="MsoNormal"
style="margin:0cm;margin-bottom:.0001pt;text-indent:0cm;
line-height:normal"><span
style="font-size:9.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin:0cm;margin-bottom:.0001pt;text-indent:0cm;
line-height:normal"><span
style="font-size:9.0pt;font-family:"Lucida Console"">#
matrix m is cross sectional stock level data<o:p></o:p></span></p>
<p class="MsoNormal"
style="margin:0cm;margin-bottom:.0001pt;text-indent:0cm;
line-height:normal"><span
style="font-size:9.0pt;font-family:"Lucida Console"">m
<- matrix(cross)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;mso-fareast-font-family: "Arial
Unicode MS";mso-bidi-font-family:Arial"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:"Arial Unicode MS"">spec2
<- ugarchspec(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">variance.model
= <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">list(model
= "fGARCH", garchOrder = c(1,1), submodel = “GARCH”,
external.regressors = m, variance.targeting = FALSE), <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">mean.model
= <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS"">list(armaOrder
= c(12,0), external.regressors = NULL), distribution.model =
"norm")<o:p></o:p></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;
text-align:left;text-indent:0cm;line-height:normal" align="left"><span
style="font-size: 9.0pt;font-family:"Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS"; mso-bidi-font-family:"Arial Unicode MS"">fit
= ugarchfit(spec = spec2, data=xz)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;
margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:0cm;line-height:normal" align="left"><span
style="font-size:9.0pt;font-family: "Lucida
Console";mso-fareast-font-family:"Arial Unicode
MS";mso-bidi-font-family: "Arial Unicode MS""><o:p> </o:p></span></p>
</body>
</html>