data(edhec)
data(weights)
# calculate an equal weighted portfolio return
round(Return.portfolio(edhec),4)
# now return the contribution too
round(Return.portfolio(edhec,contribution=TRUE),4)
# calculate a portfolio return with rebalancing
round(Return.rebalancing(edhec,weights),4)
Run the code above in your browser using DataLab