コード例 #1
0
 def loss(weights):
     return -portfolio(returns, weights)[0]
コード例 #2
0
 def loss(weights):
     return portfolio(returns, weights)[1] ** 2