(o_5 PORTFOLIO OPTIMIZATION USING QUADRATIC PROGRAMMING IHBRARY O F M O R A T U W A . S R I L A f l U . Lakmal Prabhash Ranasinghe 07/8506 Thesis submitted in partial fulfilment of the requirements for the degree of Master of Science. Department of Mathematics, University of Moratuwa, Sri Lanka U n i v e r s i t y o f M o r a t u w a 102483 April 2011 sru" s 1 0 2 4 8 3 D E C L A R A T I O N I hereby certify that this dissertation does not incorporate any material previously submitted for a Degree or Diploma in any University, without acknowledgement, and to the best of my knowledge and belief it does not contain any material previously published or written by another person or myself expect where due reference is made in the text. 26 oShat I I L . P. Ranasinghe Date We endorse the declaration by the candidate. £ 0 / 1 . Mr.T.M.J.A. <&_4>iray Date B . S c ( s p ) M a t h e m a t i c s ( S L ) , P G D i p M a t h s ( P e r a d e n i y a ) , M . S c . ( C o l o m b o ) , M . P h i l ( M o r a t u w a ) Senior Lecturer Department of Mathematics Faculty of Engineering University of Moratuwa M- 3 - 1J6 I OS I WW :/.9.# Mr.Rohan Dissanayake Date B.Sc.Mathamalics(Colombo), M.Sf.(Pime) Senior Lecturer Department of Mathematics Faculty of Engineering University of Moratuwa ii ABSTRACT Investment analysis is concerned, portfolio optimization is very important in order to get maximum profit. In the proposed research the optimization will be done in two main steps. The first part is the modelling mean variance so called reward and risk. The second part is finding optimum solution. The data set published by the Colombo Stock Exchange was used for this research paper as the raw data. The following five companies are selected for the analysis without biases those are Commercial bank, John Keells, Lanka Hospital, The Sri Lanka Telecom and The United motors. These companies represent several fields in the Sri Lankan market such as banking, group of companies, health service, semi government companies, automobile sector. The objective of the research is to find the optimum allocation of the portfolio. The risk should be minimized and the reward should be maximized at the same time. As a strategy to do both of these simultaneously, the linear combination with controlling arbitrary constant is used. That particular linear combination is a convex quadratic function. In order to find the solution of this, the numerical method is used via MATLAB inbuilt'm file'. The developed model of the Markowitz portfolio optimization model 1 could be formulated in order to find the optimum allocation of investment amounts for any number of investment channels. The model can be used by investment researchers and could be applied to gain an analytical idea about the efficient frontier. The model has a parameter that can change emphasis on risk minimization or reward maximization. The portfolio optimization finds the optimum allocation of money to be invested. The optimum allocation depends on several factors, according to Markowitz, the return as well as risk, should be considered simultaneously. The main model for this research is 'Markowitz Portfolio Selection Model'. The objective function of the above model consists a linear combination of risk and return. Since the risk is a quadratic expression, the objective function can also be considered as a quadratic function. Then the normal optimization can not be applied and the non linear optimization (quadratic optimization) must be applied. The main constraint that can be identified is the budgetary constraint along with other limitations, such as boundary restraints. The model has the advantage of changing the budget at any time and the user can use the total budget as a unit, then the optimum allocation fractions, for each investment can be found. The optimization calculation is carried out through 'Matlab', computer aided calculation software. The output of the optimization model is the ratio of the total investment amount to be allocated, the allocated in the percentages of the total portfolio for Commercial Bank, John Keells, Lanka Hospital, Sri Lanka Telecom and United Motors respectively as 0%, 0%, 62%, 38%, and 0%. The minimum function value is - 0.0907, and the function stands for the linear combination of the risk and the reward. 1 Harry Markowitz (1952, 1959) developed his portfolio-selection technique, which came to be called modern portfolio theory (MPT). Prior to Markowitz's work, security-selection models focused primarily on the returns generated by investment opportunities. Standard investment advice was to identify those securities that offered the best opportunities for gain with the least risk and then construct a portfolio from these. iii ACKNOWLEBGEMENT It is a pleasure to thank those who made this thesis possible such as my parents, sister, fiancee who gave me the moral support I required and my lecturers, Mr. Rohana Disanayake and Mr T.M.J.A. Cooray who helped me with the research material. I would also like to make a special reference to Colombo Stock Exchange, without its corporation I would not have the opportunity to gather relevant data. L. P. Ranas inghe iv CONTENTS DECLARATION ii ABSTRACT iii ACKNOWLEDGEMENT iv CONTENTS v TABLES OF CONTENTS viii LIST OF TABLE viii LIST OF FIGURES viii LIST OF ANNEXURE viii CHAPTER 1 9 INTRODUCTION 9 1.1 INTRODUCTION 10 1.2 OBJECTIVE OF THE RESEARCH 11 1.3 SCOPE 11 1.4 SIGNIFICANT OF THE RESEARCH 11 1.5 LIMITATIONS AND DELIMITATIONS 12 1.6 MODERN FINANCIAL MATHEMATICS 12 1.7 PORTFOLIO OPTIMIZATION 13 1.8 CHAPTER SUMMARY 14 CHAPTER 2 15 LITERATURE REVIEW 15 2.1 INTRODUCTION 16 2.2.1 Optimal portfolios using linear programming models 17 2.2.2 A quadratic programming formulation of the portfolio selection model 17 2.2.3 Bond portfolio optimization problems and their applications to index tracking: Apartial optimization approach 17 2.2.5 Qudratic parametric programming for portfolio selection with random problem generation and computational experience 18 2.2.6 Practical portfolio optimization 19 2.2.7 Risk forecasting models and optimal portfolio selection 19 2.2.8 Sensitivity analysis in convex quadratic optimization: Invariant support set interval 20 2.2.9 A reflective Newton method for minimizing a quadratic function subject to bound on some of the variable 20 2.2 CHAPTER SUMMARY 21 CHAPTER 3 22 THEORY AND METHODOLOGY 22 3.1 INTRODUCTION 23 3.2 THEORY AND METHODOLOGY 24 3.3 MARKOWITZ PORTFOLIO SELECTION MODEL 24 3.4 MEASUREMENT OF RETURN AND RISK 26 3.5 RETURN 26 3.6 RISK 27 3.7 EFFICIENT PORTFOLIO 28 3.8 OPTIMIZATION TECHNIQUE (QUADRATIC PROGRAMMING) 30 3.9 NUMERICAL METHOD TO SOLVE THE QUADRATIC PROGRAMMING 31 3.10 COMPUTATIONAL AIDED CALCULATION USING MATLAB 32 3.11 CHAPTER SUMMARY 35 CHAPTER 4 36 THE OPTIMIZATION MODEL 36 4.1 INTRODUCTION 37 4.2 THE RISK AND REWARD MODELS 38 4.3 THE OPTIMIZATION MODEL 40 4.4 RISK AVERSION PARAMETER 41 4.5 REWARD MODEL 42 vi A V 4.6 RISK MODEL 43 4.7 OBJECTIVE FUNCTION FOR OPTIMIZATION MODEL 44 4.8 CONSTRAINTS FOR OPTIMIZATION MODEL 45 4.9 CHAPTER SUMMARY 46 CHAPTER 5 47 EVALUATION OF THE MODEL 47 5.1 INTRODUCTION 48 5.2 THE DATA SET 49 5.3 CLOSING SHARE PRICES 50 5.4 RETURN 52 5.5 THE COVARIANCE MATRIX CALCULATION USING MICROSOFT EXCEL 56 5.6 CALCULATION USING MATLAB 61 5.7 THE OUTPUT ANALYSIS 66 5.8 SENSITIVITY ANALYSIS 67 5.9 SUMMARY OF FINDINGS 69 5.10 CHAPTER SUMMARY 70 CHAPTER 6 71 CONCLUSION AND FURTHER RESEARCH 71 6.1 INTRODUCTION 72 6.2 CONCLUTION 73 6.3 FURTHER RESEARCH 74 REFERENCES 75 APPENDLX Al 78 APPENDIX A2 89 vii TABLES OF CONTENTS LIST OF TABLE Page Table 5.1 Closing share price of the five selected companie 50 Table 5.2: Return values of closing share prices 52 Table 5.3: Reward calculation and (Value - average) calculation 55 Table 5.4: Covariance calculation step 1 59 Table 5.5: Covariance calculation step 2 59 Table 5.6: Covariance calculation step 3 (Final Covariance matrix) 59 Table 5.7: Covariance matrix directly using Excel 60 LEST OF FKGUMES Page Figure 3.1: Investment opportunity set for asset A and B 28 Figure 3.2: The efficient frontier of risky assets and individual assets 29 Figure 5.1: the trend lines of each company closing prices as it is 51 Figure 5.2: Trend line of Return value of the share prices 53 LEST OF ANNEXURE Annexure Description Page Appendix Al The m file of the "quadpro" 78 Appendix A2 The data set 89 viii