Most applications deal with portfolios where it is necessary to forecast the entire covariance matrix of asset returns.

Consider the univariate volatility model:

where are returns; is conditional volatility, and are random shocks.

### EWMA

The multivariate form of EWMA is

with an individual element given by

where as per RiskMetrics.

A sample R code for EWMA is

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
library("tseries") # the two prices are downloaded separately library("zoo") p1 = get.hist.quote(instrument = "msft",start = "2000-01-01", end = "2009-12-31",quote="AdjClose") p2 = get.hist.quote(instrument = "ibm", start = "2000-01-01", end = "2009-12-31",quote="AdjClose") p = cbind(p1,p2) # prices combined in one vector y = diff(log(p))*100 # convert prices to returns y[,1] = y[,1]-mean(y[,1]) # subtract mean y[,2] = y[,2]-mean(y[,2]) T = length(y[,1]) EWMA = matrix(nrow=T,ncol=3) # create a matrix to hold the covariance matrix for each t lambda = 0.94 S = cov(y) # initial (t=1) covariance matrix EWMA[1,] = c(S)[c(1,4,2)] # extract the variances and covariance for (i in 2:T){ # loop though the sample S = lambda * S + (1-lambda) * crossprod(t(y[i,])) EWMA[i,] = c(S)[c(1,4,2)] # convert matrix to vector } EWMArho = EWMA[,3]/sqrt(EWMA[,1]*EWMA[,2]) # calculate correlations |

### Orthogonal GARCH (OGARCH)

It is usually very hard to estimate multivariate GARCH models. In practice, alternative methodologies for obtaining the covariance matrix are needed.

The orthogonal approach transforms linearly the observed returns matrix into a set of portfolios with the key property that they are uncorrelated, implying we can forecast their volatilities separately. This makes use of principal components analysis (PCA).

##### Orthogonalising covariance

The first step is to transform the return matrix into uncorrelated portfolio . Denote as the sample correlation of . We then calculate orthogonal matrix of eigenvectors of , denoted by . Then is defined by:

The rows of are uncorrelated with each other so we can run a univariate GARCH or a similar model on each row in separately to obtain its conditional variance forecast, denoted by . We then obtain the forecast of the conditional covariance matrix of the returns by:

This implies that the covariance terms can be ignored when modeling the covariance matrix of , and the problem has been reduced to a series of univariate estimations.

1 2 3 |
library(gogarch) res = gogarch(y,formula = ~garch(1,1),garchlist = c(include.mean=FALSE)) OOrho = ccor(res) # gets a vector of correlations |

##### Large-scale implementations

In the above example, all the principal components (PCs) were used to construct the conditional covariance matrix. However, it is possible to use just a few of the columns. The highest eigenvalue corresponds to the most important principle component—the one that explains most of the variation in the data.

Such approaches are in widespread use because it is possible to construct the conditional covariance matrix for a very large number of assets. In a highly correlated environment, just a few principal components are required to represent system variation to a very high degree of accuracy. This is much easier than forecasting all volatilities directly in one go.

PCA also facilitates building a covariance matrix for an entire ﬁnancial institution by iteratively combining the covariance matrices of the various trading desks, simply by using one or perhaps two principal components. For example, one can create the covariance matrices of small caps and large caps separately and use the ﬁrst principal component to combine them into the covariance matrix of all equities. This can then be combined with the covariance matrix for ﬁxed income assets, etc.

### Correlation Models

##### Constant conditional correlations (CCC)

Bollerslev (1990) proposes the constant conditional correlations (CCC) model where time-varying covariances are proportional to the conditional standard deviation. The conditional covariance matrix consists of two components that are estimated separately: sample correlations and the diagonal matrix of time-varying volatilities .

where

The volatility of each asset follows a GARCH process or any of the univariate models discussed here.

This model guarantees the positive deﬁniteness of if is positive deﬁnite.

##### Dynamic conditional correlations (DCC)

In particular, the assumption of correlations being constant over time is at odds with the vast amount of empirical evidence supporting nonlinear dependence. To correct this defect, Engle (2002) and Tse and Tsui (2002) propose the dynamic conditional correlations (DCC) model as an extension to the CCC model.

Different with CCC model, the correlation matrix is time dependent within the DCC framework as

where is a symmetric positive deﬁnite autoregressive matrix and is given by

where is the unconditional covariance matrix of ; and to ensure positive deﬁniteness and stationarity, respectively.

**Pros**: it can be estimated in two steps: one for parameters determining univariate volatilities and another for parameters determining the correlations.**Cons**: parameters and are constants implying that the conditional correlations of all assets are driven by the same underlying dynamics — often an unrealistic assumption.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# estimate univariate GARCH models to get starting values library(fGarch) f1 = garchFit(~ garch(1,1), data=y[,1],include.mean=FALSE) f1 = f1@fit$coef f2 = garchFit(~ garch(1,1), data=y[,2],include.mean=FALSE) f2 = f2@fit$coef # create vectors and matrices of starting values a = c(f1[1], f2[1]) A = diag(c(f1[2],f2[2])) B = diag(c(f1[3], f2[3])) dccpara = c(0.2,0.6) # estimate the model library(ccgarch) dccresults = dcc.estimation(inia=a, iniA=A, iniB=B, ini.dcc=dccpara,dvar=y, model="diagonal") # Parameter estimates and their robust standard errors dcc.results$out DCCrho = dccresults$DCC[,2] |

When we compare the correlations estimated by the above three models: EWMA, OGARCH and DCC, we will find the correlation forecasts for EWMA seem to be most volatile. Both DCC and OGARCH models have more stable correlations with the OGARCH having the lowest ﬂuctuations but the highest average correlations. The large swings in EWMA correlations might be an overreaction.

### Multiariate Extensions of GARCH

It is conceptually straightforward to develop multivariate extensions of the univariate GARCH-type models — such as multivariate GARCH (MVGARCH). Unfortunately, it is more diﬃcult in practice because the most obvious model extensions result in the number of parameters exploding as the number of assets increases.

##### The BEKK model

There are a number of alternative MVGARCH models available, but the BEKK model, proposed by Engle and Kroner (1995), is probably the most widely used. The matrix of conditional covariances

The general model is given by

The number of parameters in the BEKK(1,1,2) model is , i.e. 11 in 2-asset case.

where , and are coefficients. We can find the simple idea behind the BEKK and DCC models are similar that the volatilities/correlations are dependent on their past realisations and the shocks from squared financial asset returns.

**Cons**: too many parameters. This implies those parameters may be hard to interpret. Furthermore, many parameters are often found to be statistically insigniﬁcant, which suggests the model may be overparameterized.