title: garch function in package tseries, how to predict values with the results from this function?
body: <p>I have a series of stock log returns, say, 100 values. I want to use GARCH to predict the volatility at time 101. If I use the garch function from tseries package, I would call it like this:</p>
  
  <pre><code>garch(myData, order=c(1, 1)) 
  </code></pre>
  
  <p>So considering p = q = 1. This function returns an object which contain 100 fitted values (the first being NA), coefficients (a0, a1 and a2) and 100 residuals (again the first being NA). How do I use this information to predict volatility at time 101?</p>
  
  <p>My first guess was calculating:</p>
  
  <pre><code>Vol_101 = a0  +  a1 * fitted.values[100] + a2 * residuals[100]
  </code></pre>
  
  <p>But judging by the results I get this is definitely not right. How could I use GARCH information to predict volatility from a time period that was not part of the original data?</p>
  
  <p>Many thanks,</p>
  
  <p>Chicoscience</p>