Skip to contents

weight_equal() assigns equal positive weights to selected instruments. Empty selections produce empty weights.

Usage

weight_equal(selection)

Arguments

selection

A ledgr_selection object.

Value

A ledgr_weights object.

Articles

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

Examples

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