Skip to contents

ledgr_weights() creates a named numeric portfolio-weight vector for strategy helper pipelines. Weights are intermediate objects; strategies must not return them directly.

Usage

ledgr_weights(x, universe = NULL, origin = NULL)

Arguments

x

Named numeric vector of weights.

universe

Optional universe used to reject extra instrument names.

origin

Optional helper/source label for printing.

Value

A ledgr_weights object.

Articles

Strategy helper pipelines: vignette("strategy-development", package = "ledgr") system.file("doc", "strategy-development.html", package = "ledgr")

Examples

ledgr_weights(c(AAA = 0.5, BBB = 0.5), universe = c("AAA", "BBB"))
#> <ledgr_weights> [2 assets]
#> non-NA: 2/2
#> AAA BBB 
#> 0.5 0.5