MULTIVARIATE GARCH BASED ON PCA

Version 1.2.0.0 (3.09 KB) by Tal Shir
Generage Convariance mairix using PCA-GARCH model
854 Downloads
Updated 30 Jun 2014

View License

The code takes a multiple returns vector and generate covariance martix. It has 4 different GRACH models and it uses the AIC/BIC test to select best fitted model for each serie.
Input:
X: NxM M series of length N of returns
NumFac: the munber of factor to be used in the CPA process. If NumFac<1 the percentage of varince will be used to determin the number of factors
Lag: Lag for the covariance forecast

Samp: The umber of periods from the last period to use to calculate the matrix

OUTPUT:
Cov:Covariance matrix
Corr: correlation matrix
Cov: forecast Covariance
PCorr:forecast correlation
PRt: forecast return
PRterr: forecast return error
NumFac: number of factors used in the PCA
COEFF: is a P-by-P matrix, each column containing coefficients
for one principal component.
SCORE: correspond to observations, columns to components.
ev: eigenvalues of the covariance matrix of X, in
LATENT.

Example: P is a NxM matrix of prices with N periods and M assets.

Rt=tick2ret(P);
[Cov Corr PCov PCorr PRt Model PRterr NumFac COEFF,SCORE,ev]=uni_multi_garch(Rt,0.8,1,N-1)

comments and corrections are welcome. I'm using this to calculate the variance of my portfolios and I have more than 3 years experiance of managing the the volatility of my portfolios using this code.

The code is based in the following paper:

Multivariate GARCH with Only Univariate
Estimation

http://www.burns-stat.com/pages/Working/multgarchuni.pdf

Cite As

Tal Shir (2024). MULTIVARIATE GARCH BASED ON PCA (https://www.mathworks.com/matlabcentral/fileexchange/47071-multivariate-garch-based-on-pca), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.2.0.0

typo

1.1.0.0

Add coments

1.0.0.0