CHI | R Documentation |
Computes the optimal CHI-MVO portfolio with full investment, weight and group constraints.
CHI(
sigma,
mu = NULL,
meta_loss = c("MaxDiv", "ERC"),
UB = NULL,
LB = NULL,
groups = NULL,
group.UB = NULL,
group.LB = NULL,
gamma = 0,
max_tilt = 1,
groups_mat = NULL,
verbose = F,
...
)
sigma |
a |
mu |
a |
meta_loss |
a loss function of the most diversified hierarchical allocation graph. |
UB |
scalar or |
LB |
scalar or |
groups |
vector of group IDs. The names of the vector must be identical to the asset names. |
group.UB |
scalar or |
group.LB |
scalar or |
gamma |
risk aversion parameter. Default: |
max_tilt |
maximum percentage reduction in the effective number of assets. Default: |
groups_mat |
Group constraints passed to MV. |
verbose |
Set to FALSE by default. If True, it returns the weights vector and the covariance matrix. |
... |
arguments passed to |
The argument sigma
is a covariance matrix.
Hierarchical clustering is performed using the cluster
-package. If
cluster_method == 'DIANA'
, the function cluster::diana
is used
to compute a cluster dendrogram, otherwise the function cluster::agnes(., method = cluster_method)
is used. Default is single-linkage agglomerative nesting.
The argument meta_loss
represents the loss function used to optimize the most diversified hierarchical allocation graph.
The optimized hierarchy is used to filter sigma
and mu
. If the filtered covariance matrix is used in a
mean variance portfolio optimizer, a CHI portfolio is constructed.
A (N \times 1)
vector of optimal portfolio weights.
Johann Pfitzinger
# Load returns of assets or portfolios
data("Industry_10")
rets <- Industry_10
sigma <- cov(rets)
CHI(sigma, UB = 0.15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.