In 06/markowitz-portfolio-reviisted.ipynb, the mathematical model says <=s, but Pyomo goes <=s^2. Obviously mistyped, moreover it does not run with Mosek.
Moreover in the AMPL version of the notebook we add the following comment in the Python code, after the hint how to derive Sigma:
# Moreover, in practive such a matrix A, called factor, can be low-rank,
# see https://docs.mosek.com/modeling-cookbook/qcqo.html#example-factor-model.
# This would provide better numerical properties for the proper conic formulation
# y=Ax, |y|^2 <= s,
# corresponding to the mathematical formulation above.
Thanks for catching the typo, it is now been corrected and is <=s consistently in the model and in the code. The comment about the matrix A has also been added.
In 06/markowitz-portfolio-reviisted.ipynb, the mathematical model says <=s, but Pyomo goes <=s^2. Obviously mistyped, moreover it does not run with Mosek.
Moreover in the AMPL version of the notebook we add the following comment in the Python code, after the hint how to derive Sigma: