Conditional volatility estimate for a portfolio
조회 수: 3 (최근 30일)
이전 댓글 표시
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,
댓글 수: 0
답변 (1개)
Akanksha
2025년 6월 22일
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 :
https://www.mathworks.com/help/finance/portfolioriskcontribution.html : Compute Individual Asset Risk Contribution
https://www.mathworks.com/help/finance/portfolio-analysis.html : portvar and portstats
https://www.mathworks.com/help/risk/estimate-var-using-parametric-methods.html : Normal VaR Calculation
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Conditional Variance Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!