Closed borderite closed 2 years ago
The arch_lm_test method in the class arch.univariate.base.ARCHModelResult fails if the mean model uses the AR model (p>0). It seems to me that the problem comes from "nan" at the top of resid2, but I am not too sure.
import scipy as sp from arch import arch_model Y = sp.stats.distributions.norm.rvs(size=1000) model = arch_model(Y, mean="AR", lags=1, vol="GARCH", rescale=True) fit = model.fit() print(fit.arch_lm_test())
import scipy as sp
from arch import arch_model
Y = sp.stats.distributions.norm.rvs(size=1000)
model = arch_model(Y,
mean="AR", lags=1,
vol="GARCH",
rescale=True)
fit = model.fit()
print(fit.arch_lm_test())
Thanks.
The arch_lm_test method in the class arch.univariate.base.ARCHModelResult fails if the mean model uses the AR model (p>0). It seems to me that the problem comes from "nan" at the top of resid2, but I am not too sure.
import scipy as sp
from arch import arch_model
Y = sp.stats.distributions.norm.rvs(size=1000)
model = arch_model(Y,
mean="AR", lags=1,
vol="GARCH",
rescale=True)
fit = model.fit()
print(fit.arch_lm_test())
Thanks.