When I looked at the rollingRegression function it seems to allow you to compare the performance of the fit over a rolling window.  That seems to be different from what I was looking for which is to perform a fit for a period from t1 to t2 and then see how it performs at predicting the return at t2+1 as the window (t1,t2) rolls through the my data set.  Am I misunderstanding what these functions do?  At the end of the day I'm looking for a vector of forecasted values that I can compare to the actual (out-of-sample) values.  

Thanks again, John.



----- Original Message ----
From: Brian G. Peterson <brian@braverock.com>
To: John Putz <johnputz3655@yahoo.com>
Cc: r-sig-finance@stat.math.ethz.ch
Sent: Thursday, August 16, 2007 10:44:51 AM
Subject: Re: [R-SIG-Finance] best method for rolling forecast based on linear fit


John Putz wrote:
> Hello,
> 
> A basic question.  Can anybody point me towards the best method to use to perform a rolling 1 step ahead forecast of a price series based on a rolling N day linear fit?  I believe I used the dse package in the past, but my recollection is it was somewhat cumbersome.

If you're using a linear model as your predictor, it's not strictly 
speaking a "one step ahead" prediction, but rather an ex post rolling 
window analysis.

"best" is highly subjective depending on how fancy you want to be.

zoo has the rollapply function with a configurable window to roll over.

The rollingRegression function in PerformanceAnalytics might make things 
a little easier to use.

There are also many robust regressors that you might wish to consider, 
especially if you're using a relatively short window.

Regards,

    - Brian
	[[alternative HTML version deleted]]

