Hallo,
I am estimating a VAR(1) - Quatro-variate BEKK MGARCH Model with restrictions to the VAR parameters.
Now i am trying to estimate a VAR(2) Quatro-variate BEKK and i get the following message:
## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
My data have no missing values. What could be going wrong?
open data arg_W1C.xls
data(format=xls,org=columns) 1 1025 lmr fxr fxr2 mmrus mmrjp nar twr
*
*
* Estimation using MAXIMIZE
* The initial few lines of this set the estimation range, which needs to be done
* explicitly, and the number of variables. Then, vectors for the dependent
* variables, residuals and residuals formulas are set up. The SET instructions
* copy the dependent variables over into the slots in the vector of series.
*
compute gstart=2,gend=1025
compute n=4
dec vect[series] y(n) u(n)
dec vect[frml] resid(n)
set y(1) = lmr
set y(2) = fxr2
set y(3) = mmrus
set y(4) = twr
*
* This is specific to a mean-only model. It sets up the formulas (the &i are
* needed in the formula definitions when the FRML is defined in a loop), and
* estimates them using NLSYSTEM. This both initializes the mean parameters, and
* computes the unconditional covariance matrix. If you want more general mean
* equations, the simplest way to do that would be to define each FRML separately.
*
dec vect b(n) o(n) q(n) w(n) d(n) m(n) k(n) g(n) z(n)
nonlin(parmset=meanparms) b o(1) o(2) q(1) q(2) w(1) w(2) d(1) d(2) m(1) m(2) k g(1) g(2) z(1) z(2)
frml lmreq lmr = b(1) + o(1)*lmr{1} + q(1)*lmr{2} + w(1)*fxr2{1} + d(1)*fxr2{2} + k(1)*mmrus{1} + m(1)*mmrus{2} + g(1)*twr{1} + z(1)*twr{2} + u(1)
frml fxr2eq fxr2 = b(2) + o(2)*lmr{1} + q(2)*lmr{2} + w(2)*fxr2{1} + d(2)*fxr2{2} + k(2)*mmrus{1} + m(2)*mmrus{2} + g(2)*twr{1} + z(2)*twr{2} + u(2)
frml mmruseq mmrus= b(3) + k(3)*mmrus{1} + u(3)
frml twreq twr= b(4) + k(4)*twr{1} + u(4)
frml resid(1) = (lmr-b(1)-o(1)*lmr{1}-q(1)*lmr{2} -w(1)*fxr2{1}-d(1)*fxr2{2}-k(1)*mmrus{1}-m(1)*mmrus{2}-g(1)*twr{1}-z(1)*twr{2})
frml resid(2) = (fxr2-b(2)-o(2)*lmr{1}-q(2)*lmr{2}-w(2)*fxr2{1}-d(2)*fxr2{2}-k(2)*mmrus{1}-m(2)*mmrus{2}-g(2)*twr{1}-z(2)*twr{2})
frml resid(3) = (mmrus-b(3)-k(3)*mmrus{1})
frml resid(4) = (twr-b(4)-k(4)*twr{1})
nlsystem(parmset=meanparms,resids=u) gstart gend resid
compute rr=%sigma
*
* The paths of the covariance matrices and uu' are saved in the SERIES[SYMM] names
* H and UU. UX and HX are used to pull in residuals and H matrices.
*
declare series[symm] h uu
*
* ux is used when extracting a u vector
*
declare symm hx(n,n)
declare vect ux(n)
*
* These are used to initialize pre-sample variances.
*
gset h * gend = rr
gset uu * gend = rr
*
* This is a standard (normal) log likelihood formula for any multivariate GARCH
* model. The difference among these will be in the definitions of HF and RESID.
* The function %XT pulls information out of a matrix of SERIES.
*
declare frml[symm] hf
*
frml logl = $
hx = hf(t) , $
%do(i,1,n,u(i)=resid(i)) , $
ux = %xt(u,t), $
h(t)=hx, uu(t)=%outerxx(ux), $
%logdensity(hx,ux)
*****************************************************
*
* Positive definite parameterization (BEKK,EK)
* This enforces a positive definite covariance matrix by writing the covariance
* matrix evolution as
*
* V(t) = C'C + A'u(t)u(t)'A + B'V(t-1)B
*
* Note that the parameters are not globally identified: changing the signs of all
* members of C, A or B will have no effect on the function value. Using
* PMETHOD=SIMPLEX to begin is quite important with this setup, to pull the
* estimates away from zero before starting the derivative-based methods.
*
dec rect var(n,n) vbr(n,n)
dec packed vcr(n,n)
dec rect
nonlin(parmset=garchparms) vcr var vbr
nonlin(parmset=restrictions) var(3,2)=var(4,2)=var(3,1)=var(4,1)=var(4,3)=var(3,4)=0.0 vbr(3,2)=vbr(4,2)=vbr(3,1)=vbr(4,1)=vbr(4,3)=vbr(3,4)=0.0
frml hf = $
hx=h{1},uux=uu{1},$
%ltouterxx(vcr)+%mqform(uux,var)+%mqform(hx,vbr)
*
* Initialize c's from the decomp of the covariance matrix
*
compute vcr = %decomp(rr)
compute var = %mscalar(.05) , vbr = %mscalar(.05)
*
maximize(parmset=meanparms+garchparms+restrictions,pmethod=simplex,piters=50,method=bfgs,robust,iters=500) logl gstart gend
Thank you in advance
Maria
Quatro-variate BEKK MGARCH with VAR(2) for the mean equation
Re: Quatro-variate BEKK MGARCH with VAR(2) for the mean equa
You may have no missing data originally, but you are using up to 2 lags of the observable data, so you can't start earlier than entry 3.
Re: Quatro-variate BEKK MGARCH with VAR(2) for the mean equa
Many thanks!
Now it runs just fine.
Maria
Now it runs just fine.
Maria