I'm trying to estimate a statsmodel VARMAX with one endogenous variable (the one i'm intersted in, the 'ker_rf') and a serie of exogenous variables. The setting is roughly this:
from statsmodels.tsa.statespace.varmax import VARMAX
from statsmodels.tsa.stattools import adfuller
df = ff_data[['ker_rf' , 'Mkt-rf','SMB', 'HML', 'vsxw_normalized']]
ker = df[['ker_rf']]
exog_vars = df[['Mkt-rf', 'SMB', 'HML', 'vsxw_normalized']]
# Fit the model
model = VARMAX(ker.values.tolist(), exog=exog_vars.values.tolist(),
order=(1,1), integrate=1, enforce_stationarity=0,
enforce_invertibility=0)
model_fit = model.fit(transformed=0,disp=False)
# Print summary
print(model_fit.summary())
For this partidular case, i have:
ValueError: Only gave one variable to VAR
Then I tried to use different strategies, change some things here and there, but an error always pops out, mainly LinAlg errors. Maybe i should let you know that i have around 160 observations and the original serie i'm trying to estimate isn't stationary at all.
If you have any hints about how to solve this problem please let me know. Thank you.
I tried to change endogenous and exogenous variables, adding and removing parameters, including the lags whithin the exog_var parameter, ...