alloc function

Computing allocations

Computing allocations

Computing (capital) allocations.

## For elliptical distributions under certain assumptions alloc_ellip(total, loc, scale) ## Nonparametrically conditioning(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)(n, d)-matrix containing nn iid dd-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

dd-vector of allocated amounts (the allocation) according to the Euler principle under the assumption that the underlying loss random vector follows a dd-dimensional elliptical distribution with location vector loc (mumu in the reference) and scale matrix scale (SigmaSigma 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 matrix sig <- 1:3 # standard deviations library(copula) # for p2P() here P <- p2P(c(-0.5, 0.3, 0.5)) # (3, 3) correlation matrix Sigma <- P * sig %*% t(sig) # corresponding covariance matrix stopifnot(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 amounts stopifnot(all.equal(sum(AC), 1.2)) # sanity check ## Be careful to check whether the aforementioned assumptions hold. ### Nonparametrically ########################################################## ## Generate data set.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 function stopifnot(identical(CA, CA.))
  • Maintainer: Marius Hofert
  • License: GPL (>= 3) | file LICENCE
  • Last published: 2024-03-04

Useful links