I have the errors when learning GARCH: lags must be unique, positive integers?

1 view (last 30 days)
I am not sure why I have this error when using name-value to define lags. Any ideas?

Answers (1)

Asvin Kumar
Asvin Kumar on 8 Feb 2021
'GARCHLags' and 'ARCHLags' properties can only be positive vectors. See function syntax. This is because the 'GARCHLags' input corresponds to the lag of the 'GARCH' coefficients as is the case for 'ARCHLags'. Refer to this example:
g = garch('GARCHLags',[1 2 3],'GARCH', [0.06 0.07 0.08], 'ARCHLags',[1 2], 'ARCH', [0.09 0.10])
g =
garch with properties:
Description: "GARCH(3,2) Conditional Variance Model (Gaussian Distribution)"
Distribution: Name = "Gaussian"
P: 3
Q: 2
Constant: NaN
GARCH: {0.06 0.07 0.08} at lags [1 2 3]
ARCH: {0.09 0.1} at lags [1 2]
Offset: 0
You can read more about GARCH models at this link https://www.mathworks.com/help/econ/what-is-a-conditional-variance-model.html#btbsicl This gives a good explanation about the lags and the coefficients.
So why is garch(0,0) valid then?
It's valid because it creates a default GARCH model without any GARCH or ARCH coefficients. Refer example here.

Categories

Find more on Conditional Variance Models in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!