On Sat, 20 Feb 2010, Clive Hudson wrote:
At present im still not 100% sure how to produce 100% true forcasts
using gretl. Ive been testing using stock data from the sp500 and nasdaq stock
index's
the code im using is close_spx is sp500 data close_ndx is nasdaq stock data
loop i=31..2231
smpl $i-30 $i-1
ols close_spx const time close_ndx
fcast $i $i
genr pclose_spx[$i] = $fcast
endloop
Try:
<script>
smpl 1 30
loop i=31..2231 --quiet
ols close_spx const time close_ndx --quiet
fcast i i --quiet
pclose_spx[i] = $fcast
smpl +1 +1
endloop
smpl --full
print close_spx pclose_spx -o
</script>
Allin Cottrell