

def getFrontier(na_data):
    'Function gets a 100 sample point frontier for given returns'
    (na_avgrets, na_std, b_error) = tsu.OptPort(na_data, None)
    na_lower = np.zeros(na_data.shape[1])
    na_upper = np.ones(na_data.shape[1])
    (f_min, f_max) = tsu.getRetRange(na_data, na_lower, na_upper, na_avgrets, s_type='long')
    f_step = ((f_max - f_min) / 100.0)
    lf_returns = [(f_min + (x * f_step)) for x in range(101)]
    lf_std = []
    lna_portfolios = []
    for f_target in lf_returns:
        (na_weights, f_std, b_error) = tsu.OptPort(na_data, f_target, na_lower, na_upper, s_type='long')
        lf_std.append(f_std)
        lna_portfolios.append(na_weights)
    return (lf_returns, lf_std, f_step, na_avgrets, na_std)

dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/Examples/Basic/tutorial8.py getFrontier/VarMisuse@176/300 `lna_portfolios`->`f_step`