hSigma | R Documentation |
Generates a hierarchically filtered covariance matrix than can be used for optimization.
hSigma(sigma, ...)
sigma |
a |
... |
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.
A (N \times N)
filtered covariance matrix.
Johann Pfitzinger
# Load returns of assets or portfolios
data("Industry_10")
rets <- Industry_10
sigma <- cov(rets)
hsig <- hSigma(sigma)
MV(hsig)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.