When using the PerformanceAnalytics package of R, I am getting an error from the Return.portfolio function whenever I ask it to rebalance_on any frequency. If the rebalance parameter is removed, the function works fine.
Return.portfolio(portfolio.returns.daily, weights=risk.weights, rebalance_on="months")
Error in [<-
(*tmp*
, k, , value = c(0.734291071622665, 0.629392347105141, :
subscript out of bounds