minCVaR: Minimum Conditional-Value-at-Risk (CVaR) Portfolios

View source: R/portfolio.R

minCVaRR Documentation

Minimum Conditional-Value-at-Risk (CVaR) Portfolios

Description

Compute minimum-CVaR portfolios, subject to lower and upper bounds on weights.

Usage

minCVaR(R, q = 0.1, wmin = 0, wmax = 1,
        min.return = NULL, m = NULL,
        method = "Rglpk",
        groups = NULL, groups.wmin = NULL, groups.wmax = NULL,
        Rglpk.control = list())

Arguments

R

the scenario matrix: a numeric (real) matrix

q

the Value-at-Risk level: a number between 0 and 0.5

wmin

numeric: a lower bound on weights. May also be a vector that holds specific bounds for each asset.

wmax

numeric: an upper bound on weights. May also be a vector that holds specific bounds for each asset.

m

vector of expected returns. Only used if min.return is specified.

min.return

minimal required return. If m is not specified, the column means of R are used.

method

character. Currently, only "Rglpk" is supported.

groups

a list of group definitions

groups.wmin

a numeric vector

groups.wmax

a numeric vector

Rglpk.control

a list: settings passed to Rglpk_solve_LP

Details

Compute the minimum CVaR portfolio for a given scenario set. The default method uses the formulation as a Linear Programme, as described in Rockafellar/Uryasev (2000).

The function uses Rglpk_solve_LP from package Rglpk.

Value

a numeric vector (the portfolio weights); attached is an attribute whose name matches the method name

Author(s)

Enrico Schumann

References

Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/C2017-0-01621-X")}

Rockafellar, R. T. and Uryasev, S. (2000). Optimization of Conditional Value-at-Risk. Journal of Risk. 2 (3), 21–41.

Schumann, E. (2023) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual

Schumann, E. (2020) Minimising Conditional Value-at-Risk (CVaR). http://enricoschumann.net/notes/minimising-conditional-var.html

See Also

minvar

Examples

if (requireNamespace("Rglpk")) {

  ns <- 5000  ## number of scenarios
  na <- 20    ## nunber of assets
  R <- randomReturns(na, ns, sd = 0.01, rho = 0.5)

  res <- minCVaR(R, 0.25)
  c(res)  ## portfolio weights
}

enricoschumann/NMOF documentation built on April 13, 2024, 12:16 p.m.