* * Martin, Hurn and Harris, "Econometric Modelling with Time Series" * Example 20.9, from pp 790-2 * BEKK-GARCH models * open data yields_us.mat data(format=matlab,nolabels,sheet="rdata") 1 3307 r3m r1y r3y r5y r7y r10y * * The GARCH model is estimated in differences * set dr3m = 100.0*(r3m-r3m{1}) set dr1y = 100.0*(r1y-r1y{1}) * * Estimate standard BEKK model * garch(p=1,q=1,mv=bekk,hmatrices=hh) / dr3m dr1y compute loglbekk=%logl spgraph(vfields=2,hfields=2,\$ footer="Figure 20.7 BEKK on yields on 3-month and 1-year U.S. zero coupon bonds") set h3m = hh(t)(1,1) set h1y = hh(t)(2,2) set h31 = hh(t)(1,2) set corr = %cvtocorr(hh(t))(1,2) graph(header="(a) Variance of 3-month rate",row=1,col=1) # h3m graph(header="(b) Variance of 1-year rate",row=1,col=2) # h1y graph(header="(c) Conditional covariance",row=2,col=1) # h31 graph(header="(d) Conditional correlation",row=2,col=2) # corr spgraph(done) * * Estimate diagonal BEKK model and do LR test of restriction * (MV=DBEKK was added with RATS 8.2). * garch(p=1,q=1,mv=dbekk) / dr3m dr1y cdf(title="Test of DBEKK restrictions") chisqr 2.0*(loglbekk-%logl) 4