Page: Portfolio_optimization.ipynb Please change this line: mr.set_value(date,s,ret) To this: mr.at[date, s] = ret