Rank covariance: private API
PortfolioOptimisers.RankCovarianceEstimator — Type
abstract type RankCovarianceEstimator <: AbstractCovarianceEstimatorAbstract supertype for all rank-based covariance estimators.
A subtype computes its correlation matrix from the ranks of the returns. KendallCovariance and SpearmanCovariance are its two subtypes. The method of show_fields on this type renders the field ve of each subtype and leaves out its cache.
Related
PortfolioOptimisers.show_fields — Method
show_fields(obj) -> Tuple{Symbol}
Name the fields of obj that @define_pretty_show can print, in declaration order.
The default method returns every declared field. A type that hides one of its fields overloads this method for itself and returns the other fields. The overload gets the instance, so it can hide a field always or only for some values. A partial-fit cache holds the state of an incremental fit and not configuration, so its type always hides it. The moment estimators hide an optional cvg only when it is nothing. The caller did not select that option, so it is not part of the configuration. A field added in this way changes no rendered docstring.
This method selects fields by type, and SHOW_NOTHING_FIELDS selects them by configuration. pretty_show_fields combines the two, and a per-name entry of the configuration overrides this method in both directions.
Arguments
obj: The value to print.
Returns
fields: The field names that the method can print, as a tuple or a vector ofSymbol.
Related
show_fields(_::RankCovarianceEstimator) -> Tuple{Symbol}
Renders every field of a RankCovarianceEstimator, such as a KendallCovariance or a SpearmanCovariance, except cache.
A cache holds the state of an incremental fit. That state is not part of the configuration, and it prints under the estimator at each site that renders the estimator. Set set_show_nothing_fields!(:KendallCovariance, true) or set_show_nothing_fields!(:SpearmanCovariance, true) to render it for that type.
Arguments
::RankCovarianceEstimator: The rank covariance estimator. The method reads only its type.
Returns
fields::Tuple: The names of the fields to render,(:ve,).
Related