## For elliptical distributions under certain assumptionsalloc_ellip(total, loc, scale)## Nonparametricallyconditioning(x, level, risk.measure ="VaR_np",...)alloc_np(x, level, risk.measure ="VaR_np", include.conditional =FALSE,...)
Arguments
total: total to be allocated (typically the risk measure of the sum of the underlying loss random variables).
loc: location vector of the elliptical distribution of the loss random vector.
scale: scale (covariance) matrix of the elliptical distribution of the loss random vector.
x: (n,d)-matrix containing n iid d-dimensional losses.
level: either one or two confidence level(s) for risk.measure; in the former case the upper bound on the conditioning region is determined by confidence level 1.
risk.measure: character string or function specifying the risk measure to be computed on the row sums of x based on the given level(s) in order to determine the conditioning region.
include.conditional: logical indicating whether the computed sub-sample of x is to be returned, too.
...: additional arguments passed to risk.measure.
Returns
d-vector of allocated amounts (the allocation) according to the Euler principle under the assumption that the underlying loss random vector follows a d-dimensional elliptical distribution with location vector loc (mu in the reference) and scale matrix scale (Sigma in the reference, a covariance matrix) and that the risk measure is law-invariant, positive-homogeneous and translation invariant.
Details
The result of alloc_ellip() for loc = 0 can be found in McNeil et al. (2015, Corollary 8.43). Otherwise, McNeil et al. (2015, Theorem 8.28 (1)) can be used to derive the result.
Author(s)
Marius Hofert
References
McNeil, A. J., Frey, R. and Embrechts, P. (2015). Quantitative Risk Management: Concepts, Techniques, Tools. Princeton University Press.
Examples
### Ellipitical case ############################################################# Construct a covariance matrixsig <-1:3# standard deviationslibrary(copula)# for p2P() hereP <- p2P(c(-0.5,0.3,0.5))# (3, 3) correlation matrixSigma <- P * sig %*% t(sig)# corresponding covariance matrixstopifnot(all.equal(cov2cor(Sigma), P))# sanity check## Compute the allocation of 1.2 for a joint loss L ~ E_3(0, Sigma, psi)AC <- alloc_ellip(1.2, loc =0, scale = Sigma)# allocated amountsstopifnot(all.equal(sum(AC),1.2))# sanity check## Be careful to check whether the aforementioned assumptions hold.### Nonparametrically ############################################################ Generate dataset.seed(271)X <- qt(rCopula(1e5, copula = gumbelCopula(2, dim =5)), df =3.5)## Estimate an allocation via MC based on a sub-sample whose row sums have a## nonparametric VaR with confidence level in ...alloc_np(X, level =0.9)# ... (0.9, 1]CA <- alloc_np(X, level = c(0.9,0.95))# ... in (0.9, 0.95]CA. <- alloc_np(X, level = c(0.9,0.95), risk.measure = VaR_np)# providing a functionstopifnot(identical(CA, CA.))