def generate_efficient_frontier(targets, xs_avg, covariance_matrix):
    portfolios = []
    for target in targets:
        p_weights = solve_for_target_return(xs_avg, covariance_matrix, target)
        portfolios.append(portfolio_metrics(p_weights['x'], xs_avg, covariance_matrix))
    return portfolios
def generate_efficient_frontier(targets, xs_avg, covariance_matrix):
    portfolios = []
    for target in targets:
        p_weights = solve_for_target_return(xs_avg, covariance_matrix, target)
        portfolios.append(portfolio_metrics(p_weights['x'], xs_avg, covariance_matrix))
    return portfolios