varfhs: Compute CvaR using FHS method

Description Usage Arguments Value Author(s) References See Also Examples

Description

Compute conditional VaR of a portfolio where yields follow a MGARCH(1,1) DCC model using FHS method

Usage

1
VaR.FHS(n, Omega, A, B, alpha, beta, S, eps, type, level, weights)

Arguments

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
type="Aielli" for an Aielli-DCC

level

Level of the CVaR

weights

Matrix of the weights of the asset (time dependant)

Value

CVaR : vector with the estimated CVaR

Author(s)

D. Taouss & C. Francq

References

C. Francq & J.M. Zakoian, Joint inference on market and estimation risks in dynamic portfolios

See Also

EbEEMGARCH Homepage of the documentation

Examples

 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.FHS(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')

TaoussD/EbEEMGARCH documentation built on May 9, 2019, 4:18 p.m.