Пример #1
0
 def loss(weights):
     return -portfolio(returns, weights)[0]
Пример #2
0
 def loss(weights):
     return portfolio(returns, weights)[1] ** 2