Conditional volatility estimate for a portfolio

조회 수: 3 (최근 30일)
Rol
Rol 2022년 1월 13일
답변: Akanksha 2025년 6월 22일
Hello,
On MATLAB, I did a PCA analysis on 4 stocks and used an univariate GARCH(1,1) for each PC to create the conditional variance covariance matrix. So now I have multiple 4x4 matrices with the variance/covariance of the stocks for each trading day. And I am now trying to use these matrices to estimate the conditional volatility of an equally weighted portoflio containing those 4 stocks. Do you have an idea on how I can proceed?
Thanks in advance,

답변 (1개)

Akanksha
Akanksha 2025년 6월 22일
Hey Rol ,
To calculate the daily conditional volatility of an equally weighted portfolio using your 4×4 conditional variance-covariance matrices, here’s how you can achieve it:
1.Set the Portfolio Weights - Since the portfolio has 4 stocks and is equally weighted, each stock will get 25%:
w = [0.25; 0.25; 0.25; 0.25];
2. Construct Daily Covariance Matrices - Construct a 3D matrix called Sigma, where each Sigma(:,:,t) is the 4×4 covariance matrix for day t.
3. Calculate Portfolio Volatility for Each Day - Now you can loop through each day and compute the portfolio’s conditional volatility like this:
T = size(Sigma, 3); % Number of trading days
w = ones(4,1) / 4; % Equal weights
portfolio_volatility = zeros(T,1); % Preallocate result
for t = 1:T
Sigma_t = Sigma(:,:,t); % Covariance matrix for day t
portfolio_volatility(t) = sqrt(w' * Sigma_t * w); % Volatility
end
This will give a vector of daily volatilities for your portfolio.
PFA the documentation links along with the subsection to refer for any further queries :
Hope this helps!

카테고리

Help CenterFile Exchange에서 Conditional Variance Models에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by