| weight_equally | R Documentation |
Creates equal-weighted portfolio from selection matrix. The simplest and often most robust weighting scheme.
weight_equally(selected_df)
selected_df |
Binary selection matrix (1 = selected, 0 = not) |
Data.table with equal weights for selected securities
data("sample_prices_weekly")
momentum <- calc_momentum(sample_prices_weekly, lookback = 12)
selected <- filter_top_n(momentum, 10)
weights <- weight_equally(selected)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.