hSigma: Hierarchical filtering of the covariance matrix

View source: R/hSigma.R

hSigmaR Documentation

Hierarchical filtering of the covariance matrix

Description

Generates a hierarchically filtered covariance matrix than can be used for optimization.

Usage

hSigma(sigma, ...)

Arguments

sigma

a (N \times N) covariance matrix.

...

arguments passed to cluster::agnes method.

Details

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.

Value

A (N \times N) filtered covariance matrix.

Author(s)

Johann Pfitzinger

Examples

# Load returns of assets or portfolios
data("Industry_10")
rets <- Industry_10
sigma <- cov(rets)
hsig <- hSigma(sigma)
MV(hsig)


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