Conditional volatility estimate for a portfolio

5 visualizaciones (últimos 30 días)
Rol
Rol el 13 de En. de 2022
Respondida: Akanksha el 22 de Jun. de 2025
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,

Respuestas (1)

Akanksha
Akanksha el 22 de Jun. de 2025
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!

Categorías

Más información sobre Conditional Variance Models en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by