Skip to content

Instantly share code, notes, and snippets.

@fnneves
Created October 11, 2018 00:04
Show Gist options
  • Save fnneves/731e5f6d3b6a332cd94924a61d89d8ea to your computer and use it in GitHub Desktop.
Save fnneves/731e5f6d3b6a332cd94924a61d89d8ea to your computer and use it in GitHub Desktop.
frontier_x = []
for possible_return in frontier_y:
cons = ({'type':'eq', 'fun':check_sum},
{'type':'eq', 'fun': lambda w: get_ret_vol_sr(w)[0] - possible_return})
result = minimize(minimize_volatility,init_guess,method='SLSQP', bounds=bounds, constraints=cons)
frontier_x.append(result['fun'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment