bashtage / arch

ARCH models in Python
Other
1.32k stars 245 forks source link

How to Combine This With ARMA model? #542

Open JonathanBechtel opened 2 years ago

JonathanBechtel commented 2 years ago

Hi there,

I'm trying to get this package to replicate the behavior found in rugarch. It allows you to specify an ARMA and GARCH model jointly. Do you have any pointers for how to do that with this library?

I'd assume you'd fit an ARMA model, feed the residuals into GARCH, and then add the conditional mean from the ARMA model (which would be the forecasted value less sigma), and then add in the variance from the GARCH model. Correct? Thank you for your help.

bashtage commented 2 years ago

In principle two-step estimation works. The challenge is that when the model is estimated by MLE you get nobs residuals eventhough many of these might not be reliable at the beginning of the sample. For example, if you fit an ARMA(P,Q), then the first P are not meaningful since they don't have p to condition on. Most joint packages fit the model using conditional MLE where the first P observations are conditioned on (and so lost) like the ARX model does here.

chenchuanqi2016 commented 2 years ago

Hello thanks for offering such great package, it helps my work a lot! But it seems like a pity that this package does not contain ARMA + GARCH model.

And I don't think two-step estimation can be used to estimate ARMA + GARCH parameters since the Maximum-Likelihood Function, the objective function, is tangled with ARMA params and GARCH params. In this case, estimating ARMA params first, then estimate GARCH params under the ARMA params estimation is not the same as estimate them simultaneous. This is because those two set of params are inter-affected with each other.

bashtage commented 2 years ago

I would welcome someone contributing an ARMA mean model. I would usually tell someone to use an AR to approximate an ARMA which usually works well unless the MA has roots very close to 1.

In this case, estimating ARMA params first, then estimate GARCH params under the ARMA params estimation is not the same as estimate them simultaneous. This is because those two set of params are inter-affected with each other.

This is correct. However in large samples it is a consistent approach, and so it generally justified as long as the model for the conditional mean is correctly specified.