title: how to use forecast function for simple moving average model in r?
body: <p>I want to predict the future values for my simple moving average model. I used the following procedure: </p>
  
  <pre><code>x &lt;- c(14,10,11,7,10,9,11,19,7,10,21,9,8,16,21,14,6,7)   
  df &lt;- data.frame(x)    
  dftimeseries &lt;- ts(df)  
  library(TTR)      
  smadf &lt;- SMA(dftimeseries, 4) # lag is 4    
  library(forecast)    
  forecasteddf &lt;- forecast(smadf, 4) # future 4 values     
  </code></pre>
  
  <p>When run the above code, my forecast values are the same for all the next 4 days. Am I coding it correctly? Or, am I conceptually wrong? </p>
  
  <p>The same is the case with exponential moving average, weighted moving average, and ARIMA also.</p>