# \donttest{
data(sample_prices_weekly)
mom12 <- PortfolioTesteR::calc_momentum(sample_prices_weekly, 12)
sel10 <- PortfolioTesteR::filter_top_n(mom12, 10)
w_eq <- PortfolioTesteR::weight_equally(sel10)
w_vt <- vol_target(w_eq, sample_prices_weekly, lookback = 26,
target_annual = 0.12, periods_per_year = 52, cap = TRUE)
head(w_vt)
# }
Run the code above in your browser using DataLab