Abstract
In this paper, a vectorised quadratic convex optimisation algorithm based on Matlab’s quadprog built-in function is proposed. We target specifically a classic problem confronted by portfolio analysts, that of optimising asset allocation when choosing among several asset classes, in the context of Markowitz’s modern portfolio theory. Simulating return trajectories for several asset classes, we formulate the optimisation routine in such a way that is able to handle multiple scenarios at the same time, instead of on a one-by-one basis, reducing computational times significantly, without introducing observable estimation errors. A sensitivity analysis is offered with respect to the optimal batch size.





Similar content being viewed by others
Notes
Among others, frequently reported are the large estimation errors in the variance-covariance matrix that might lead to counter-intuitive portfolios, as a result of its backward-looking approach and the questionable suitability of variance as the most appropriate portfolio risk measure
Equivalent to Eq. 5 is the return maximisation problem of \({\max \limits } \mathbf {r}^{T} \mathbf {w}, \text {s.t.} \frac {1}{2}\mathbf {w}^{T} {\Sigma } \mathbf {w} = \sigma _{0}\) and the risk minimisation problem of \(\min \limits \frac {1}{2}\mathbf {w}^{T} {\Sigma } \mathbf {w}, \text {s.t.} \mathbf {r}^{T}\mathbf {w} = r_{0}\).
The problem presented here is the sparse interior-point where bounds are combined with linear constraints. For the full predictor-corrector problem, where bounds and constraints are not combined, see references stated above.
The assumptions of normality and independence can be of course challenged by using more advanced models that incorporate serial correlation in asset returns. Nevertheless, a more thorough study of the stylised facts of asset returns is beyond the scope of this study.
All simulation runs and statistical analysis were performed on a Macbook Pro Core i5, 2.4 GHz with 8 GB RAM.
References
Abreu M, Mendes V (2010) Financial literacy and portfolio diversification. Quant Finance 10(5):515–528
Alexander GJ, Baptista AM (2002) Economic implications of using a mean-VaR model for portfolio selection: a comparison with mean-variance analysis. J Econ Dyn Control 26(7-8):1159–1193
Altman A, Gondzio J (1999) Regularized symmetric indefinite systems in interior point methods for linear and quadratic optimization. Optim Methods Softw 11(1-4):275–302
Ambachtsheer K (2005) Beyond portfolio theory: the next frontier. Financ Anal J 61(1):29–33
Barbieri E, Meo M (2012) A fast object-oriented Matlab implementation of the Reproducing Kernel Particle Method. Comput Mech 49(5):581–602
Bertsekas DP (2014) Constrained optimization and lagrange multiplier methods. Academic Press, Cambridge
Birkbeck N, Levesque J, Amaral JN (2007) A dimension abstraction approach to vectorization in Matlab. In: International symposium on code generation and optimization (CGO’07). IEEE, Piscataway, pp 115–130
Black F, Litterman R (1992) Global portfolio optimization. Financ Anal J 48(5):28–43
Čermák M, Sysala S, Valdman J (2019) Efficient and flexible MATLAB implementation of 2D and 3D elastoplastic problems. Appl Math Comput 355:595–614
Chen H, Krolik A, Lavoie E, Hendren L (2016) Automatic Vectorization for MATLAB. In: International workshop on languages and compilers for parallel computing. Springer, Berlin, pp 171–187
Chhabra AB (2005) Beyond Markowitz: a comprehensive wealth allocation framework for individual investors. J Wealth Manag 7(4):8–34
Drobetz W (2001) How to avoid the pitfalls in portfolio optimization? putting the Black-Litterman approach at work. Fin Mkts Portfolio Mgmt 15 (1):59–75
Dupačová J (1999) Portfolio optimization via stochastic programming: Methods of output analysis. Math Methods Oper Res 50(2):245–270
Gârleanu N, Pedersen LH (2016) Dynamic portfolio choice with frictions. J Econ Theory 165:487–516
Goldfarb D, Liu S (1990) An O(n3L) primal interior point algorithm for convex quadratic programming. Math Program 49(1-3):325–340
Hager WW (1987) Dual techniques for constrained optimization. J Optim Theory Appl 55(1):37–71
Lin CC, Liu YT (2008) Genetic algorithms for portfolio selection problems with minimum transaction lots. Eur J Oper Res 185(1):393–404
Liu YJ, Zhang WG (2013) Fuzzy portfolio optimization model under real constraints. Insur Math Econ 53(3):704–711
Markowitz HM, Todd GP (2000) Mean-variance analysis in portfolio choice and capital markets, vol 66. John Wiley & Sons, New York
Mizuno S, Todd MJ, Ye Y (1993) On adaptive-step primal-dual interior-point algorithms for linear programming. Math Oper Res 18(4):964–981
Pardalos PM (1997) Optimization techniques for portfolio selection. In: New operational approaches for financial modelling. Springer, Berlin, pp 19–33
Pardalos PM, Sandström M, Zopounidis C (1994) On the use of optimization models for portfolio selection: A review and some computational results. Comput Econ 7(4):227–244
Pasini G (2017) Principal component analysis for stock portfolio management. Int J Pur Appl Math 115(1):153–167
Quaranta AG, Zaffaroni A (2008) Robust optimization of conditional value at risk and portfolio selection. J Banking Finance 32(10):2046–2056
Shampine LF (2005) Solving hyperbolic PDEs in MATLAB. Appl Numer Anal Comput Math 2(3):346–358
Shampine LF (2008) Vectorized adaptive quadrature in MATLAB. J Comput Appl Math 211(2):131–140
Shampine LF (2009) Vectorized solution of ODEs in Matlab. Scalable Computing: Practice and Experience, 10(4):337–345
Vanderbei RJ, Carpenter TJ (1993) Symmetric indefinite systems for interior point methods. Math Program 58(1-3):1–32
Yamashita H (1998) A globally convergent primal-dual interior point method for constrained optimization. Optim Methods Softw 10(2):443–469
Ypma TJ (1995) Historical development of the Newton–Raphson method. SIAM Rev 37(4):531–551
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Kontosakos, V.E. Fast Quadratic Programming for Mean-Variance Portfolio Optimisation. SN Oper. Res. Forum 1, 25 (2020). https://doi.org/10.1007/s43069-020-00025-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s43069-020-00025-0