| weight_by_signal | R Documentation |
Weights selected securities proportionally to their signal strength. Stronger signals receive higher allocations.
weight_by_signal(selected_df, signal_df)
selected_df |
Binary selection matrix |
signal_df |
Signal values for weighting |
Data.table with signal-proportional weights
data("sample_prices_weekly")
momentum <- calc_momentum(sample_prices_weekly, lookback = 12)
selected <- filter_top_n(momentum, 10)
# Weight by momentum strength
weights <- weight_by_signal(selected, momentum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.