Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
personal:portfolio:portopt [2014/06/06 10:22] antonello [Usage] |
personal:portfolio:portopt [2015/02/10 13:26] antonello [Usage] |
||
---|---|---|---|
Line 97: | Line 97: | ||
== As a lib using Python: == | == As a lib using Python: == | ||
import portopt | import portopt | ||
- | results = portopt.solveport(var, | + | results = portopt.solveport(var, |
functioncost = results[0] | functioncost = results[0] | ||
shares | shares | ||
Line 120: | Line 120: | ||
* Set alpha to zero to retrieve the portfolio with the highest mean, independently from variance (solution not guaranteed to be unique); | * Set alpha to zero to retrieve the portfolio with the highest mean, independently from variance (solution not guaranteed to be unique); | ||
* Assets shares are returned in the x_h vector, eventual error code (0: all fine, 1: input data error, 2: no solutions, 3: didn't solve, 4: solver internal error) in the errorcode parameter. | * Assets shares are returned in the x_h vector, eventual error code (0: all fine, 1: input data error, 2: no solutions, 3: didn't solve, 4: solver internal error) in the errorcode parameter. | ||
- | * Use option " | + | * Use option " |
| | ||
| |