Learn R Programming

PortfolioTesteR (version 0.1.4)

weight_by_signal: 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)

Value

Data.table with signal-proportional weights

Arguments

selected_df

Binary selection matrix

signal_df

Signal values for weighting

Examples

Run this code
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)

Run the code above in your browser using DataLab