I have a problem with my SARIMA. I want to create a model that forecast a value a day-ahead based on multiple features. I used the following code, but I do not know how to incorporate all the other features ('data' in the code):
data = allmerged[['lagged_actual_total_load_MW', 'DA_total_load_MW', 'DA_onshore_wind_MW', 'DA_offshore_wind_MW', 'DA_solar_MW', 'lagged_actual_wind_offshore_MW', 'lagged_actual_wind_onshore_MW', 'lagged_actual_solar_MW', 'DA_price']]
y = allmerged['imbalance_MW']
size = int(len(allmerged) - 96)
train, test = allmerged['imbalance_MW'][0:size], allmerged['imbalance_MW'][size:len(allmerged)]
print('\t SARIMA MODEL : In - Sample Forecasting \n')
history = [x for x in train]
predictions = []
for t in range(len(test)):
model = sm.tsa.statespace.SARIMAX(history,order = (1,0,1),seasonal_order = (1,1,1,4))
model_fit = model.fit(disp = 0)
output = model_fit.forecast()
yhat = output[0]
predictions.append(float(yhat))
obs = test[t]
history.append(obs)
print('predicted = %f, expected = %f' % (np.exp(yhat), np.exp(obs)))
predictions_series = pd.Series(predictions, index = test.index)
fig,ax = plt.subplots(nrows = 1,ncols = 1,figsize = (15,5))
plt.subplot(1,1,1)
plt.plot(allmerged['imbalance_MW'],label = 'Expected Values')
plt.plot(np.exp(predictions_series),label = 'Predicted Values');
plt.legend(loc="upper left")
plt.show()