Skip to main content
Log in

Fast Quadratic Programming for Mean-Variance Portfolio Optimisation

  • Original Research
  • Published:
SN Operations Research Forum Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. 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

  2. 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}\).

  3. 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.

  4. 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.

  5. All simulation runs and statistical analysis were performed on a Macbook Pro Core i5, 2.4 GHz with 8 GB RAM.

References

  1. Abreu M, Mendes V (2010) Financial literacy and portfolio diversification. Quant Finance 10(5):515–528

    Article  Google Scholar 

  2. 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

    Article  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. Ambachtsheer K (2005) Beyond portfolio theory: the next frontier. Financ Anal J 61(1):29–33

    Article  Google Scholar 

  5. Barbieri E, Meo M (2012) A fast object-oriented Matlab implementation of the Reproducing Kernel Particle Method. Comput Mech 49(5):581–602

    Article  Google Scholar 

  6. Bertsekas DP (2014) Constrained optimization and lagrange multiplier methods. Academic Press, Cambridge

    Google Scholar 

  7. 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

  8. Black F, Litterman R (1992) Global portfolio optimization. Financ Anal J 48(5):28–43

    Article  Google Scholar 

  9. Č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

    Google Scholar 

  10. 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

  11. Chhabra AB (2005) Beyond Markowitz: a comprehensive wealth allocation framework for individual investors. J Wealth Manag 7(4):8–34

    Article  Google Scholar 

  12. 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

    Article  Google Scholar 

  13. Dupačová J (1999) Portfolio optimization via stochastic programming: Methods of output analysis. Math Methods Oper Res 50(2):245–270

    Article  Google Scholar 

  14. Gârleanu N, Pedersen LH (2016) Dynamic portfolio choice with frictions. J Econ Theory 165:487–516

    Article  Google Scholar 

  15. Goldfarb D, Liu S (1990) An O(n3L) primal interior point algorithm for convex quadratic programming. Math Program 49(1-3):325–340

    Article  Google Scholar 

  16. Hager WW (1987) Dual techniques for constrained optimization. J Optim Theory Appl 55(1):37–71

    Article  Google Scholar 

  17. Lin CC, Liu YT (2008) Genetic algorithms for portfolio selection problems with minimum transaction lots. Eur J Oper Res 185(1):393–404

    Article  Google Scholar 

  18. Liu YJ, Zhang WG (2013) Fuzzy portfolio optimization model under real constraints. Insur Math Econ 53(3):704–711

    Article  Google Scholar 

  19. Markowitz HM, Todd GP (2000) Mean-variance analysis in portfolio choice and capital markets, vol 66. John Wiley & Sons, New York

    Google Scholar 

  20. 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

    Article  Google Scholar 

  21. Pardalos PM (1997) Optimization techniques for portfolio selection. In: New operational approaches for financial modelling. Springer, Berlin, pp 19–33

  22. 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

    Article  Google Scholar 

  23. Pasini G (2017) Principal component analysis for stock portfolio management. Int J Pur Appl Math 115(1):153–167

    Google Scholar 

  24. Quaranta AG, Zaffaroni A (2008) Robust optimization of conditional value at risk and portfolio selection. J Banking Finance 32(10):2046–2056

    Article  Google Scholar 

  25. Shampine LF (2005) Solving hyperbolic PDEs in MATLAB. Appl Numer Anal Comput Math 2(3):346–358

    Article  Google Scholar 

  26. Shampine LF (2008) Vectorized adaptive quadrature in MATLAB. J Comput Appl Math 211(2):131–140

    Article  Google Scholar 

  27. Shampine LF (2009) Vectorized solution of ODEs in Matlab. Scalable Computing: Practice and Experience, 10(4):337–345

  28. Vanderbei RJ, Carpenter TJ (1993) Symmetric indefinite systems for interior point methods. Math Program 58(1-3):1–32

    Article  Google Scholar 

  29. Yamashita H (1998) A globally convergent primal-dual interior point method for constrained optimization. Optim Methods Softw 10(2):443–469

    Article  Google Scholar 

  30. Ypma TJ (1995) Historical development of the Newton–Raphson method. SIAM Rev 37(4):531–551

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vasileios E. Kontosakos.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s43069-020-00025-0

Keywords

Navigation