Last data update: 2014.03.03

R: Computing lower and upper bounds for the (smallest or...
VaRboundR Documentation

Computing lower and upper bounds for the (smallest or largest) VaR

Description

VaRbound() computes lower and upper bounds for the lower or upper Value-at-Risk bound.

Usage

VaRbound(alpha, N, qmargins, bound = c("upper", "lower"), verbose = FALSE)

Arguments

alpha

confidence level in (0,1).

N

tail discretization parameter; see Embrechts et al. (2013).

qmargins

list containing the marginal quantile functions.

bound

character string indicating the VaR bound to be approximated (largest (default) or smallest).

verbose

logical indicating whether progress information is displayed.

Details

Due to the nature of the rearrangement algorithm, note that this purely R based implementation can be slow.

Value

numeric vector of length two, containing the lower and upper bound for the (chosen) Value-at-Risk estimate.

Author(s)

Marius Hofert.

References

Embrechts, P., Puccetti, G., and R<c3><83><c2><bc>schendorf, L. (2013), Model uncertainty and VaR aggregation, Journal of Banking and Finance 37(8), 2750–2764.

Examples

qPar <- function(p, theta) (1-p)^(-1/theta)-1
qmar <- lapply(1:3, function(j) function(p) qPar(p, theta=2.5))
## bounds for the largest VaR
VaRbound(0.99, N=50, qmargins=qmar)
## bounds for the smallest VaR
VaRbound(0.99, N=50, qmargins=qmar, bound="lower")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(QRM)
Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/QRM/VaRbound.Rd_%03d_medium.png", width=480, height=480)
> ### Name: VaRbound
> ### Title: Computing lower and upper bounds for the (smallest or largest)
> ###   VaR
> ### Aliases: VaRbound
> ### Keywords: VaR multivariate
> 
> ### ** Examples
> 
> qPar <- function(p, theta) (1-p)^(-1/theta)-1
> qmar <- lapply(1:3, function(j) function(p) qPar(p, theta=2.5))
> ## bounds for the largest VaR
> VaRbound(0.99, N=50, qmargins=qmar)
   lower    upper 
24.50992 25.07809 
> ## bounds for the smallest VaR
> VaRbound(0.99, N=50, qmargins=qmar, bound="lower")
   lower    upper 
3.084776 5.333898 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>