# \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)
pr <- portfolio_returns(w_eq, sample_prices_weekly, cost_bps = 0)
head(pr)
# }
Run the code above in your browser using DataLab