George Milunovich
2018-09-28 06:00:20 UTC
Hi all,
I have a data sample y which is split into y_train and y_test. I would like
to fit ARMA on y_train, and then generate a series of 1-step forecasts for
y_test. Lets say the model is a simple AR(1). This doesn't seem to be that
straightforward in statsmodels. I've tried using predict but the training
set is not set there. Note that I do not want to do rolling or recursive
estimation. i want to fit the model only once on y_train and then forecast
all y_test with 1-step ahead forecasts, taking into account realized y(t-1)
contained in y_test.
Can anyone help with this? So far I have the following code
model = sm.tsa.ARMA(y_train, order = (1,0))
results = model.fit(trend='c')
Any help much appreciated!
George
I have a data sample y which is split into y_train and y_test. I would like
to fit ARMA on y_train, and then generate a series of 1-step forecasts for
y_test. Lets say the model is a simple AR(1). This doesn't seem to be that
straightforward in statsmodels. I've tried using predict but the training
set is not set there. Note that I do not want to do rolling or recursive
estimation. i want to fit the model only once on y_train and then forecast
all y_test with 1-step ahead forecasts, taking into account realized y(t-1)
contained in y_test.
Can anyone help with this? So far I have the following code
model = sm.tsa.ARMA(y_train, order = (1,0))
results = model.fit(trend='c')
Any help much appreciated!
George