@Eric Remole -- I do this.
The way I've sorted out for doing this is I keep a list of rolling portfolios context.rolling_portfolios = [] and use context.rolling_portfolios.pop(0) once the list exceeds my desired holding period, which gets rid of the oldest portfolio. . I use todays_weights = opt.calculate_optimal_portfolio(... and append the result to the list of rolling portfolios context.rolling_portfolios.append(todays_weights). Then I average them all together and feed the combined weights into calculate_optimal_portfolio().
In addition, I once posted a couple kind of hacky ways to adjust the weights of the previous rolling portfolios by the amount each stock had gained since. That way if on Monday you wanted a weight of 1% for SHOP, but by Friday SHOP had increased 20%, you wouldn't be rebalancing that slice back to 1%, you'd be rebalancing it to 1.2% (no change), thereby reducing needless churn and staying true to the intended holding period. I couldn't figure out an ideal way to do this on Quantopian (one method fails if the stock has splits or dividends and the other fails if there are any half-days between the current date and the slice).
If anybody has better methods for doing this, I'd love to see it.