Description Usage Arguments Value Author(s) References See Also Examples
Compute conditional VaR of a portfolio where yields follow a MGARCH(1,1) DCC model, for spherical distribution of the residuals
1 | VaR.Spherical(n, Omega, A, B, alpha, beta, S, eps, type, level, weights)
|
With usual notations
n |
Number of observations used to compute the quantile of the distribution |
Omega |
Estimated parameter for Omega |
A |
Estimated parameter for A |
B |
Estimated parameter for B |
alpha |
Estimated parameter for alpha |
beta |
Estimated parameter for beta |
S |
Estimated parameter for S |
eps |
Data |
type |
type="Engle" for a Engle-DCC
|
level |
Level of the CVaR |
weights |
Matrix of the weights of the asset (time dependant) |
CVaR : vector with the estimated CVaR
D. Taouss & C. Francq
C. Francq & J.M. Zakoian, Joint inference on market and estimation risks in dynamic portfolios
EbEEMGARCH
Homepage of the documentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #####
#Simulation of the yield of 2 assets
#####
m<-2
n <- 800
Omega <- c(0.001, 0.001);
A <- matrix(c(0.03, 0.01, 0.01, 0.03), nrow = 2)
B <- c(0.1, 0.1);
S <- matrix(c(1, 0.4, 0.4, 1), nrow = 2)
alpha <- 0.05;
beta <- 0.97 - alpha
nu <- 14
yield <- GarchDCC.sim(n, Omega, A, B, alpha, beta, S, nu = nu, noise = "student", model = "Aielli")
#####
#Creation of a static equiponderate portfolio
#####
weights <- matrix(0.5,ncol=m,nrow=n)
yield_p <- c()
for (t in 1:n) {
yield_p<-c(yield_p,weights[t,1]*yield$sim[t,1]+weights[t,2]*yield$sim[t,2])
}
#####
#Estimation of the parameters (3-steps method) & the residuals
#####
EbEE<-estimDCC.EbEE(Omega,A,B,S,alpha,beta,yield$sim,type="Aielli")
VaR <- VaR.Spherical(700, EbEE$Omega, EbEE$A, EbEE$B, EbEE$alpha, EbEE$beta, EbEE$S, yield$sim, type="Aielli", level=0.01, weights=weights)
#Plot
#plot(yield_p,xlim=c(700,800),type="l")
#lines(VaR,col='red')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.