예제 #1
0
 def loss(weights):
     return -portfolio(returns, weights)[0]
예제 #2
0
 def loss(weights):
     return portfolio(returns, weights)[1] ** 2