Correct fmincon() constraints for GARCH?

6 次查看(过去 30 天)
Hello, all. So, I am trying to manually to MLE estimate a GARCH(1,1) model using the optimization toolbox's fmincon(). I know that Matlab's built-in garch() has constraints in its optimization, such as briefly mentioned in this mathworks doc, but I do not know how to manually by myself express these by myself as fmincon arguments.
My code so far is this, which works for unconstrained optimization using fminunc/ fminsearch:
lh = @(x,data) -sum(log(fun(x,data))); %Transformation of my input function for optimization.
options = optimset('Display', 'off', 'MaxIter', 1000000, 'TolX', 10^-20, 'TolFun', 10^-20);
[theta, max1] = fmincon(@(x) lh(x,data), guesses, options, constraints???);
The guide for fmincon() is not clearing things up, how I code these constraints myself?

回答(1 个)

Hang Qian
Hang Qian 2018-2-16
Hi Michael,
Typically we add some inequality constraints to ensure a positive conditional variance in the GARCH(1,1) model, like constant > 0, arch > 0, garch > 0 and arch + garch < 1.
The numeric optimization function fmincon supports inequality constraints. Since the constraints are linear, we can put them in a matrix form like A * x < b. If the parameters are stacked like [constant, garch, arch], then the constraints can be formulated as
A = [0 1 1]
b = 1
lb = [0 0 0]
Then we can run the constrained optimization using the syntax
fmincon(fun,x0,A,b,[],[],lb,[],[],options)
where the empty matrix [] indicates non-existing constraints of other types.
By the way, we may replace lb by an augmented A and b with more rows, but it is not as efficient as the explicit lower bounds.
Best,
Hang Qian

类别

Help CenterFile Exchange 中查找有关 Conditional Variance Models 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by