Conditional volatility estimate for a portfolio

5 ビュー (過去 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 Center および File ExchangeConditional Variance Models についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by