powered by
Creates equal-weighted portfolio from selection matrix. The simplest and often most robust weighting scheme.
weight_equally(selected_df)
Data.table with equal weights for selected securities
Binary selection matrix (1 = selected, 0 = not)
data("sample_prices_weekly") momentum <- calc_momentum(sample_prices_weekly, lookback = 12) selected <- filter_top_n(momentum, 10) weights <- weight_equally(selected)
Run the code above in your browser using DataLab