function [parameters, loglikelihood, Ht, likelihoods, stdresid, stderrors, A, B, scores] = full_bekk_mvgarch(data,p,q, BEKKoptions)
% PURPOSE:
% To Estimate a full BEKK multivariate GARCH model. ****SEE WARNING AT END OF HELP FILE****
%
%
% USAGE:
% [parameters, loglikelihood, Ht, likelihoods, stdresid, stderrors, A, B, scores] = full_bekk_mvgarch(data,p,q,options);
%
%
% INPUTS:
% data - A t by k matrix of zero mean residuals
% p - The lag length of the innovation process
% q - The lag length of the AR process
% options - (optional) Options for the optimization(fminunc)
%
% OUTPUTS:
% parameters - A (k*(k+1))/2+p*k^2+q*k^2 vector of estimated parameteters. F
% or any k^2 set of Innovation or AR parameters X,
% reshape(X,k,k) will give the correct matrix
% To recover C, use ivech(parmaeters(1:(k*(k+1))/2)
% loglikelihood - The loglikelihood of the function at the optimum
% Ht - A k x k x t 3 dimension matrix of conditional covariances
% likelihoods - A t by 1 vector of individual likelihoods
% stdresid - A t by k matrix of multivariate standardized residuals
% stderrors - A numParams^2 square matrix of robust Standad Errors(A^(-1)*B*A^(-1)*t^(-1))
% A - The estimated inverse of the non-robust Standard errors
% B - The estimated covariance of teh scores
% scores - A t by numParams matrix of individual scores
%
%
% COMMENTS:
% You should multiply the data by a constant so that the min std(data) is at least 10. This will help estimation
%
% ***************************************************************************************
% * THIS FUNCTION INVOLVES ESTIMATING MANY PARAMETERS. THE EXACT NUMBER OF PARAMETERS
% * NEEDING TO BE ESTIMATED IS (k*(k+1))/2+pk^2+qk^2. FOR A 5 VARIATE (1,1) MODEL THIS
% * 65 PARAMETERS. ESTIMATION CAN TAKE A VERY LONG TIME. A 10 ASSET MODEL TOOK 12
% * HOURS ON A PIII-700.
% ***************************************************************************************
%
%
% Author: Kevin Sheppard
%
kevin.sheppard@economics.ox.ac.uk
% Revision: 2 Date: 12/31/2001
load('hp_ibm.txt');
data=100*hp_ibm;
[parameters, loglikelihood, Ht, likelihoods, stdresid, stderrors, A, B, scores] = full_bekk_mvgarch(data,1,1);
parameters
% need to try and get some smart startgin values
??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.
Error in ==> full_bekk_mvgarch at 49
[parameters, loglikelihood, Ht, likelihoods, stdresid, stderrors, A, B, scores] = full_bekk_mvgarch(data,1,1);
>>
如果加在程序中,会提示以上错误。