title: Get RMSE of GARCH in R using rugarch
body: <p>I have written a piece of code in R to calculate and display standard plots for a time series which looks like this. The contents of the <code>DWDMData.csv</code> is as follows</p>
  
  <pre><code>Time,IndexValue,Volatility
  1,101.22,0.00526633297276868
  2,102.18,0.00409956537347567
  3,102.44,0.00110367145014756
  </code></pre>
  
  <p>The code for this is </p>
  
  <pre><code>library(rugarch)
  dataset &lt;- read.csv("DWDMData.csv",TRUE)
  memdata = dataset[,c("Volatility")] 
  memtrain = head(memdata, 450) 
  memtest = dataset[451:500,c("Volatility")]
  
  diff.memtrain = diff(memtrain)
  
  
  arch.spec.std = ugarchspec(variance.model=list(garchOrder=c(0,1)),mean.model= list(armaOrder=c(0,2)),distribution.model = "std")
  arch.fit.std = ugarchfit(spec=arch.spec.std, data=diff.memtrain,solver.control=list(trace = 1))
  plot(arch.fit.std)
  </code></pre>
  
  <p>However, I wanted the next 50 prediction to compare RMSE error and alsothe residuals from the dataset used to train. How do I do it?</p>