-
-
Save fnneves/731e5f6d3b6a332cd94924a61d89d8ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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