MV: Mean Variance

View source: R/MV.R

MVR Documentation

Mean Variance

Description

Computes a Mean Variance portfolio with full investment and weight constraints.

Usage

MV(
  sigma,
  mu = NULL,
  UB = NULL,
  LB = NULL,
  groups = NULL,
  group.UB = NULL,
  group.LB = NULL,
  groups_mat = NULL,
  gamma = 0
)

Arguments

sigma

a (N \times N) covariance matrix.

mu

a (N \times 1) vector of estimated returns.

UB

scalar or (N\times 1) vector of upper bound weight constraint.

LB

scalar or (N\times 1) vector of lower bound weight constraint.

groups

vector of group IDs. The names of the vector must be identical to the asset names.

group.UB

scalar or (N_groups\times 1) vector of upper bound group constraints.

group.LB

scalar or (N_groups\times 1) vector of lower bound group constraints.

gamma

risk aversion parameter. Default: gamma = 0.

Details

The argument sigma is a covariance matrix.

The MV solution is calculated using quadprog. When gamma is left at the default setting, the minimum variance portfolio is computed.

Value

A (N \times 1) vector of optimal portfolio weights.

Author(s)

Johann Pfitzinger

Examples

# Load returns of assets or portfolios
data("Industry_10")
rets <- Industry_10
sigma <- cov(rets)
MV(sigma, UB = 0.15)


jpfitzinger/ClusterPortfolios documentation built on Sept. 27, 2024, 11:18 p.m.