chiPlot: Plot the dendrogram of a CHI portfolio

View source: R/chiPlot.R

chiPlotR Documentation

Plot the dendrogram of a CHI portfolio

Description

Plots the dendrogram of a CHI portfolio.

Usage

chiPlot(
  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,
  max_leaf_size = 3,
  ymax = NULL,
  horiz = FALSE,
  ...
)

Arguments

sigma

a (N \times N) covariance matrix.

mu

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

meta_loss

a loss function of the most diversified hierarchical allocation graph.

UB

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

LB

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

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 returns the minimum variance portfolio.

max_tilt

maximum percentage reduction in the effective number of assets. Default: max_tilt = 1 (no restriction).

max_leaf_size

maximum size of the leaf nodes. Default is max_leaf_size=3.

ymax

upper limit for y axis

horiz

rotate the dendrogram

...

arguments passed to cluster::agnes method.

Details

The dendrogram is generated using hierarchical clustering and modified so that the height differential between any two splits is the shrinkage weight of the lower split (ranging between 0 and 1). With no shrinkage, all shrinkage weights are equal to 1 and the dendrogram has a height of p. With shrinkage the dendrogram has a height of (\kappa \times p).

The leaf nodes are colored to indicate the coefficient sign, with the size indicating the absolute magnitude of the coefficients.

A color bar on the right indicates the relative contribution of each level to the coefficient of determination, with darker hues representing a larger contribution.

Value

A plotted dendrogram.

Author(s)

Johann Pfitzinger

See Also

CHI and chiSigma methods

Examples

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


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