0
$\begingroup$

I am struggling to obtain the Value at Risk from my DCC GARCH analysis. I have done the following code:

SMF.frame <- data.frame(df_fuldperiode$spot_log_returns [2:2217], df_fuldperiode$monthly_log_returns [2:2217])
sspec <- ugarchspec ( mean.model = list( armaOrder = c ( 5 , 4 )))
mspec <- ugarchspec ( mean.model = list( armaOrder = c ( 0 , 1 )))
smspec <- multispec ( c (sspec , mspec) )
smfit <- multifit (smspec, data = SMF.frame)

dccsmspec <- dccspec(uspec=smspec, dccOrder = c (1,1), VAR = TRUE, distribution ="mvt")
dccsmfit <- dccfit(dccsmspec, data = SMF.frame, 
                   fit.control = list(eval.se=TRUE, fit = smfit))

dccsmfit

plot(dccsmfit)



dcc_rfore <- dccroll(dccsmspec, 
                     data= SMF.frame, 
                     n.ahead = 1, 
                     forecast.length = forecast_len, 
                     refit.every = 5, )

I wonder how I can extract the 95% VaR and 99% VaR. Can anyone help with this issue?

enter image description here

$\endgroup$
10
  • 1
    $\begingroup$ Hi. Please format the script and other materials correctly to make them legible. $\endgroup$ Commented Nov 20, 2022 at 10:22
  • $\begingroup$ VaR of what? Each asset individually? In such a case, you do not need DCC; the univariate GARCH models will do the job. Check out the calculate.VaR method described on p. 87 of the rugarch help files. $\endgroup$ Commented Nov 20, 2022 at 11:49
  • $\begingroup$ Also "Fitting and Predicting VaR based on an ARMA-GARCH Process" by Marius Hofert seems to be quite relevant. $\endgroup$ Commented Nov 20, 2022 at 11:58
  • $\begingroup$ @RichardHardy , I'm evaluating hedging strategies at the Nordic power market. I have model the DCC GARCH fro wich I think i can recireve the VaR for the protfolio $\endgroup$ Commented Nov 20, 2022 at 13:47
  • $\begingroup$ So you have some portfolio weights and then want a VaR for the portfolio? $\endgroup$ Commented Nov 20, 2022 at 14:03

1 Answer 1

1
$\begingroup$

I do not know how to retrieve the values from the plot nor how they were calculated in the first place. However, this is not a problem.

Here is a general method for estimating portfolio VaR from a DCC-GARCH model for the components of the portfolio. It will work regardless of the specifications of the individual GARCH models and the DCC part.

  • Simulate a $k$-variate 1-step-ahead realization from the multivariate DCC-GARCH process. (You can use dccsim or fScenario methods from the rmgarch package for this.)
  • Add the $p$ components up using appropriate weights to obtain the realization of the portfolio of interest.
  • Carry the former two steps out a large number of times (e.g. $n=1000$ or $n=10000$ times).
  • Obtain the empirical $\alpha$-level quantile of the $n$ portfolio realizations. (You can use the quantile function for this.) This is your estimate of the portfolio's $\alpha$-level Value at Risk.

In the special case of normality assumptions for both the individual GARCH models and the DCC part (which is not the case in your example), you could calculate the VaR analytically. Note that a linear combination of scalar components of a multivariate normal random vector is a normal random variable. The expected value mu and the variance sigma^2 can be obtained from the usual formulas for a weighted sum of random variables. Then you would take the quantile of a normal distribution with that mean and variance via qnorm(p=alpha, mean=mu, sd=sigma).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.