Portfolio Optimization, Quantitative Finance, Python Programming, Convex Optimization, Data Science.
(cumprod_mat @ (w_agg * notional)) agg_cumprod = agg_cumprod.iloc[::-1].reset_index(drop=True) # for equally weighted w_equal = np.array([1 / len(r_annualized)] * len(r_annualized)) equal_cumprod = (cumprod_mat @ (w_equal * notional)) equal_cumprod = equal_cumprod.iloc[::-1].reset_index(drop=True)