Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

minCVaR

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. https://www.elsevier.com/books/numerical-methods-and-optimization-in-finance/gilli/978-0-12-815065-8

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

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

See Also

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
}

NMOF

Numerical Methods and Optimization in Finance

v2.4-1
GPL-3
Authors
Enrico Schumann [aut, cre] (<https://orcid.org/0000-0001-7601-6576>)
Initial release
2021-04-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.