Portfolio Value at risk (VaR) with DCC Garch model in R

Hello respected members, I need your help to forecast portfolio VaR for 3 assets(returns) with the help of DCC Garch model in R. I have done the following steps as you can see from my codes also,

  1. fitting the DCC Garch model with the normal distribution.

  2. generated a series of correlation and covariance matrix named by cor1 and cov1 respectively.

  3. I also generated a forecast series of Correlation and Covariance matrix named by Rf and Hf respectively.

now my question is how can I forecast portfolio VaR?

kindly guide me about the next steps, I shall be very thankful for your precious answers as I am tired after searching different webpages.

my codes in R studio are given below,
library("rugarch")
library("rmgarch")
library("quantmod")
library("PerformanceAnalytics")
library("FinTS")
startDate=as.Date("2007-01-03")
endDate=as.Date("2019-05-07")
getSymbols("IBM", from = startDate,to=endDate)
getSymbols("GOOG", from =startDate, to=endDate)
getSymbols("BP", from =startDate, to=endDate)
rIBM<-dailyReturn(IBM)
rBP<-dailyReturn(BP)
rGOOG<-dailyReturn(GOOG)
rx<-data.frame(rIBM,rBP,rGOOG)
uspec.n=multispec(replicate(3,ugarchspec(mean.model = list(armaOrder=c(1,0)))))
multf=multifit(uspec.n, rx)
spec1=dccspec(uspec = uspec.n, dccOrder = c(1,1),distribution = 'mvnorm')
fit1=dccfit(spec1,data = rx, fit.control = list(eval.se=TRUE),fit = multf)
cov1 = rcov(fit1)
cor1 = rcor(fit1)
dccf1 <- dccforecast(fit1, n.ahead = 10)
Rf <- dccf1@mforecast$R
Hf<-dccf1@mforecast$H

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.