Exemplo n.º 1
0
 def loss(weights):
     return -portfolio(returns, weights)[0]
Exemplo n.º 2
0
 def loss(weights):
     return portfolio(returns, weights)[1] ** 2