history = [x for x in train]
predictions = list()
for t in range(len(test)):
model = ARIMA(history, order=(1,2,0))
model_fit = model.fit(disp=0)
output = model_fit.forecast()
yhat = output[0]
predictions.append(yhat)
obs = test[t]
history.append(obs)
# plot
pyplot.plot(test.index, test.values)
pyplot.plot(test.index, predictions, color='red')
pyplot.show()