improves risk_free_rate usability #238

This commit is contained in:
robertmartin8
2021-01-22 14:38:57 +08:00
parent bd60134fa7
commit db9dd375b5
3 changed files with 17 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ class BaseOptimizer:
self.tickers = list(range(n_assets))
else:
self.tickers = tickers
self._risk_free_rate = None
# Outputs
self.weights = None
@@ -358,8 +359,8 @@ class BaseConvexOptimizer(BaseOptimizer):
):
"""
Optimise some objective function using the scipy backend. This can
support nonconvex objectives and nonlinear constraints, but often gets stuck
at local minima. This method is not recommended caveat emptor. Example::
support nonconvex objectives and nonlinear constraints, but may get stuck
at local minima. Example::
# Market-neutral efficient risk
constraints = [