NCO | R Documentation |
Computes optimal NCO portfolio with full investment and weight constraints.
NCO(sigma, UB = NULL, LB = NULL, n_clusters = "auto", ...)
sigma |
a |
UB |
scalar or |
LB |
scalar or |
n_clusters |
trade-off between naive (0) or cluster-based (1) tree-splitting (see Details). |
... |
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 number of clusters can be passed using the n_clusters
argument,
calculated automatically with n_clusters='auto'
using the Silhouette criterion.
NCO calculates within cluster and between cluster minimum variance portfolios. Constraints are implemented using an iterative convergence algorithm.
A (N \times 1)
vector of optimal portfolio weights.
Johann Pfitzinger
Lopez de Prado, M. (2019). A Robust Estimator of the Efficient Frontier. SSRN Electronic Journal.
# Load returns of assets or portfolios
data("Industry_10")
rets <- Industry_10
sigma <- cov(rets)
NCO(sigma, UB = 0.15, n_clusters = 'auto')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.