# Any way to identify optimal lag length for garch model using Python

Is there any python library that automatically calculate p and q for the GARCH model? (for example: auto_arima in pmdarima)

since that for both statsmodels and arch library in python needs to manually apply p and q values based on the graph plot (e.g. acf and pacf plots) that we observe.

And also does python has module to calculate optimal lag selection and information criteria selection like Eviews has, for example: https://youtu.be/jtb_4fqxBZE ?

• It is not really needed. Usually you can evaluate AIC and/or BIC for optimal lag selection of a GARCH model. A rule of thumb is never to let $p>2$ or $q>2$ since it will most often lead to overfitting and produce bad out-of-sample forecasts.
– Pleb
Aug 7 at 22:25