def simulate_portfolios(iters, xs_stats, covariance_matrix):
    ' What we want here is to randomly generate portfolios that will sit \n        inside the efficiency frontier for illustrative purposes '
    simulations = []
    while (iters > 1):
        weights = np.random.random(len(xs_stats.columns))
        weights /= np.sum(weights)
        simulations.append(portfolio_metrics(weights, xs_stats.loc['Avg'], covariance_matrix))
        iters -= 1
    return simulations
What we want here is to randomly generate portfolios that will sit 
inside the efficiency frontier for illustrative purposes
def simulate_portfolios(iters, xs_stats, covariance_matrix):
    ' What we want here is to randomly generate portfolios that will sit \n        inside the efficiency frontier for illustrative purposes '
    simulations = []
    while (iters > 1):
        weights = np.random.random(len(xs_stats.columns))
        weights /= np.sum(weights)
        simulations.append(portfolio_metrics(weights, xs_stats.loc['Avg'], covariance_matrix))
        iters -= 1
    return simulations