I am trying to get the same results as shown in the video 3:17, with the code:
model_ret_ar_6_ma_8 = ARMA(df.returns[1:], order = (6,8))
results_ret_ar_6_ma_8 = model_ret_ar_6_ma_8.fit()
But i always get this error:
ValueError: The computed initial AR coefficients are not stationary You should induce stationarity, choose a different model order, or you can pass your own start_params.
I have tried with lower params like ARMA(2,2) and worked
I checked ARMA(8,6) but it shows the same error.
Do you know what is failing?
Hello again, Miguel!
Whenever we have a lot of MA arguments, we need to provide enough data for the program to compute the initial error terms, which it later uses to find the coefficients. In other words, we should give some starting values to allow for these to be computed.
The simplest solution is to set the starting parameters to be some sufficient value, greater than the number of MA elements in the model. We do this when we run the “fit” method, so an example of this looks like the following: