Learn R Programming

PortfolioTesteR (version 0.1.4)

apply_weighting_method: Apply Weighting Method to Values

Description

Internal utility function that applies various weighting methods to a vector. Used by other weighting functions.

Usage

apply_weighting_method(values, method = "rank", preference_ascending = TRUE)

Value

Named numeric vector of weights that sum to 1

Arguments

values

Named numeric vector of values to weight

preference_ascending

TRUE = prefer lower values, FALSE = prefer higher