portfolio.optimize {ghyp}R Documentation

Portfolio optimization given a multivariate generalized hyperbolic distribution

Description

This function performs a optimization of a portfolio with respect to one of the risk measures “variance”, “quantile” or “expected-shortfall”, a level of risk and the requested portfolio return, given a multivariate generalized hyperbolic distribution.

Usage

portfolio.optimize(object, ptf.mean = 0.01, 
           risk.measure = c("variance", "quantile", "expected-shortfall"), 
           level = 0.95,...)

Arguments

object A multivariate ghyp object.
ptf.mean The required expected return of the portfolio.
risk.measure The risk measure to which the portfolio should be optimized. Must be one of “variance”, “quantile” or “expected-shortfall”.
level The level of the risk.measure. Not used when risk.measure is “variance”.
... Arguments passed to optim.

Value

A list with components:

portfolio An univariate generalized hyperbolic object of class ghyp which represents the generalized hyperbolic distribution of the optimal portfolio.
risk.measure The optimization criterion.
value The value of the risk measure.
opt.weights The optimal weights.
convergence Convergence returned from optim.
message A possible error message returned from optim.
n.iter The number of iterations returned from optim.

Note

The ghyp-object must define a return (not a loss) distribution. That is, the left tail of the distribution is optimized.

Setting of constraints like avoid short-selling is not supported yet.

If the ghyp-object defines a symmetric distribution the risk.measure does not matter since the distribution is then elliptical.

If the risk measure is “variance” the returned portfolio is simply an efficient frontier.

Author(s)

David Lüthi

See Also

transform, fit.ghypmv

Examples

  data(smi.stocks)
  
  mv.fit <- fit.ghypmv(data = smi.stocks[, 2:6], opt.pars = c(lambda = FALSE), 
                       lambda = 2, control = list(rel.tol = 1e-5, abs.tol = 1e-5))

  optimal.portfolio <- portfolio.optimize(mv.fit, ptf.mean = 1e-3, 
                                          risk.measure = "expected-shortfall",
                                          level = 0.99)

  plot(optimal.portfolio$portfolio, type = "l" , col = "red")
## Not run: 
  lines(density(smi.stocks[, 2:6] 
## End(Not run)


[Package ghyp version 1.2.0 Index]