# Return.portfolio error from PerformanceAnalytics package

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

• please provide reproducible data to help you. We just need the portion that will result in the error, You can dput() in r & paste it here – Rime Aug 14 '15 at 21:54

# returns is a timeSeries object