weight_by_signal: Signal-Based Portfolio Weighting

View source: R/weighting.R

weight_by_signalR Documentation

Signal-Based Portfolio Weighting

Description

Weights selected securities proportionally to their signal strength. Stronger signals receive higher allocations.

Usage

weight_by_signal(selected_df, signal_df)

Arguments

selected_df

Binary selection matrix

signal_df

Signal values for weighting

Value

Data.table with signal-proportional weights

Examples

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)

PortfolioTesteR documentation built on Nov. 5, 2025, 5:23 p.m.