def bl(w_prior, sigma_prior, p, q, omega=None, delta=2.5, tau=0.02):
    '\n# Computes the posterior expected returns based on \n# the original black litterman reference model\n#\n# W.prior must be an N x 1 vector of weights, a Series\n# Sigma.prior is an N x N covariance matrix, a DataFrame\n# P must be a K x N matrix linking Q and the Assets, a DataFrame\n# Q must be an K x 1 vector of views, a Series\n# Omega must be a K x K matrix a DataFrame, or None\n# if Omega is None, we assume it is\n#    proportional to variance of the prior\n# delta and tau are scalars\n    '
    if (omega is None):
        omega = proportional_prior(sigma_prior, tau, p)
    N = w_prior.shape[0]
    K = q.shape[0]
    pi = implied_returns(delta, sigma_prior, w_prior)
    sigma_prior_scaled = (tau * sigma_prior)
    mu_bl = (pi + sigma_prior_scaled.dot(p.T).dot(inv((p.dot(sigma_prior_scaled).dot(p.T) + omega)).dot((q - p.dot(pi).values))))
    sigma_bl = ((sigma_prior + sigma_prior_scaled) - sigma_prior_scaled.dot(p.T).dot(inv((p.dot(sigma_prior_scaled).dot(p.T) + omega))).dot(p).dot(sigma_prior_scaled))
    return (mu_bl, sigma_bl)
# Computes the posterior expected returns based on 
# the original black litterman reference model
#
# W.prior must be an N x 1 vector of weights, a Series
# Sigma.prior is an N x N covariance matrix, a DataFrame
# P must be a K x N matrix linking Q and the Assets, a DataFrame
# Q must be an K x 1 vector of views, a Series
# Omega must be a K x K matrix a DataFrame, or None
# if Omega is None, we assume it is
#    proportional to variance of the prior
# delta and tau are scalars
def bl(w_prior, sigma_prior, p, q, omega=None, delta=2.5, tau=0.02):
    '\n# Computes the posterior expected returns based on \n# the original black litterman reference model\n#\n# W.prior must be an N x 1 vector of weights, a Series\n# Sigma.prior is an N x N covariance matrix, a DataFrame\n# P must be a K x N matrix linking Q and the Assets, a DataFrame\n# Q must be an K x 1 vector of views, a Series\n# Omega must be a K x K matrix a DataFrame, or None\n# if Omega is None, we assume it is\n#    proportional to variance of the prior\n# delta and tau are scalars\n    '
    if (omega is None):
        omega = proportional_prior(sigma_prior, tau, p)
    N = w_prior.shape[0]
    K = q.shape[0]
    pi = implied_returns(delta, sigma_prior, w_prior)
    sigma_prior_scaled = (tau * sigma_prior)
    mu_bl = (pi + sigma_prior_scaled.dot(p.T).dot(inv((p.dot(sigma_prior_scaled).dot(p.T) + omega)).dot((q - p.dot(pi).values))))
    sigma_bl = ((sigma_prior + sigma_prior_scaled) - sigma_prior_scaled.dot(p.T).dot(inv((p.dot(sigma_prior_scaled).dot(p.T) + omega))).dot(p).dot(sigma_prior_scaled))
    return (mu_bl, sigma_bl)