Skip to content

Commit 1db0896

Browse files
committed
fix typos
1 parent 287e50b commit 1db0896

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/FAQ.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Constraining the number of assets
1010
Unfortunately, cardinality constraints are not convex, making them difficult to implement.
1111

1212
However, we can treat it as a mixed-integer program and solve (provided you have access to a solver).
13-
or small problems with less than 1000 variables and constraints, you can use the community version of CPLEX:
13+
for small problems with less than 1000 variables and constraints, you can use the community version of CPLEX:
1414
``pip install cplex``. In the below example, we limit the portfolio to at most 10 assets::
1515

1616
ef = EfficientFrontier(mu, S, solver=cp.CPLEX)

docs/UserGuide.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ To combat this, I have introduced an objective function which borrows the idea o
217217
regularisation from machine learning. Essentially, by adding an additional cost
218218
function to the objective, you can 'encourage' the optimizer to choose different
219219
weights (mathematical details are provided in the :ref:`L2-Regularisation` section).
220-
To use this feature, change the ``gamma`` parameter::
220+
To use this feature, change the ``gamma`` parameter::
221221

222+
from pypfopt import objective_functions
223+
222224
ef = EfficientFrontier(mu, S)
223225
ef.add_objective(objective_functions.L2_reg, gamma=0.1)
224226
w = ef.max_sharpe()

0 commit comments

Comments
 (0)