<div dir="ltr">Hello,<div><br></div><div>I am sorry to post a naive question, but I am struggling to sort this out on my own. I am fitting the following garch model using the rugarch package:</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;word-wrap:normal;color:rgb(34,36,38);background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit">fit.spec1a[[1]]=ugarchspec(variance.model = list(model = "sGARCH",
                                               garchOrder = c(2,0)),
                         mean.model= list(armaOrder = c(1,0),
                                          include.mean = T), 
                         distribution.model = "sstd")</code></pre></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)">garch[[1]]<- ugarchfit(data=train.set[[2]][,c(1)],spec = fit.spec1a[[1]],solver="hybrid")</span><br></div><div><br></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)"><br></span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)">When I examine the fitted values using fitted(garch[[1]]) the values appear to lag behind the observed values by 1 even though the length of the fitted series is equal to that of the observed data (See plot below), so I am not sure if I am using the fitted function incorrectly, or if the fitted values are truly lagged. Should be using the fitted values from t=2 until t=T rather than t=1 until t=T for calculations such as RMSE in-sample. </span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)"><br></span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)"><img src="cid:ii_15301ff615a585c3" alt="Inline image 2" width="454" height="289"><br></span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)"><br></span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)">Thank-you very much for any help,</span></div><div><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;line-height:18.7778px;white-space:pre-wrap;background-color:rgb(238,238,238)">Hannah</span></div></div>