Optimization Methods in Finance
Total Page:16
File Type:pdf, Size:1020Kb
Optimization Methods in Finance Gerard Cornuejols Reha Tut¨ unc¨ u¨ Carnegie Mellon University, Pittsburgh, PA 15213 USA January 2006 2 Foreword Optimization models play an increasingly important role in financial de- cisions. Many computational finance problems ranging from asset allocation to risk management, from option pricing to model calibration can be solved efficiently using modern optimization techniques. This course discusses sev- eral classes of optimization problems (including linear, quadratic, integer, dynamic, stochastic, conic, and robust programming) encountered in finan- cial models. For each problem class, after introducing the relevant theory (optimality conditions, duality, etc.) and efficient solution methods, we dis- cuss several problems of mathematical finance that can be modeled within this problem class. In addition to classical and well-known models such as Markowitz' mean-variance optimization model we present some newer optimization models for a variety of financial problems. Acknowledgements This book has its origins in courses taught at Carnegie Mellon University in the Masters program in Computational Finance and in the MBA program at the Tepper School of Business (G´erard Cornu´ejols), and at the Tokyo In- stitute of Technology, Japan, and the University of Coimbra, Portugal (Reha Tut¨ unc¨ u).¨ We thank the attendants of these courses for their feedback and for many stimulating discussions. We would also like to thank the colleagues who provided the initial impetus for this project, especially Michael Trick, John Hooker, Sanjay Srivastava, Rick Green, Yanjun Li, Lu´ıs Vicente and Masakazu Kojima. Various drafts of this book were experimented with in class by Javier Pena,~ Fran¸cois Margot, Miroslav Karamanov and Kathie Cameron, and we thank them for their comments. Contents 1 Introduction 9 1.1 Optimization Problems . 9 1.1.1 Linear Programming . 10 1.1.2 Quadratic Programming . 11 1.1.3 Conic Optimization . 11 1.1.4 Integer Programming . 12 1.1.5 Dynamic Programming . 13 1.2 Optimization with Data Uncertainty . 13 1.2.1 Stochastic Programming . 13 1.2.2 Robust Optimization . 14 1.3 Financial Mathematics . 15 1.3.1 Portfolio Selection and Asset Allocation . 16 1.3.2 Pricing and Hedging of Options . 18 1.3.3 Risk Management . 19 1.3.4 Asset/Liability Management . 20 2 Linear Programming: Theory and Algorithms 21 2.1 The Linear Programming Problem . 21 2.2 Duality . 23 2.3 Optimality Conditions . 26 2.4 The Simplex Method . 29 2.4.1 Basic Solutions . 30 2.4.2 Simplex Iterations . 33 2.4.3 The Tableau Form of the Simplex Method . 37 2.4.4 Graphical Interpretation . 40 2.4.5 The Dual Simplex Method . 41 2.4.6 Alternatives to the Simplex Method . 43 3 LP Models: Asset/Liability Cash Flow Matching 45 3.1 Short Term Financing . 45 3.1.1 Modeling . 46 3.1.2 Solving the Model with SOLVER . 48 3.1.3 Interpreting the output of SOLVER . 51 3.1.4 Modeling Languages . 52 3.1.5 Features of Linear Programs . 53 3.2 Dedication . 54 3.3 Sensitivity Analysis for Linear Programming . 56 3 4 CONTENTS 3.3.1 Short Term Financing . 56 3.3.2 Dedication . 61 3.4 Case Study . 64 4 LP Models: Asset Pricing and Arbitrage 67 4.1 The Fundamental Theorem of Asset Pricing . 67 4.1.1 Replication . 69 4.1.2 Risk-Neutral Probabilities . 70 4.1.3 The Fundamental Theorem of Asset Pricing . 72 4.2 Arbitrage Detection Using Linear Programming . 73 4.3 Additional Exercises . 76 4.4 Case Study: Tax Clientele Effects in Bond Portfolio Manage- ment . 80 5 Nonlinear Programming: Theory and Algorithms 83 5.1 Introduction . 83 5.2 Software . 85 5.3 Univariate Optimization . 86 5.3.1 Binary search . 86 5.3.2 Newton's Method . 90 5.3.3 Approximate Line Search . 93 5.4 Unconstrained Optimization . 95 5.4.1 Steepest Descent . 95 5.4.2 Newton's Method . 99 5.5 Constrained Optimization . 102 5.5.1 The generalized reduced gradient method . 105 5.5.2 Sequential Quadratic Programming . 110 5.6 Nonsmooth Optimization: Subgradient Methods . 111 6 NLP Models: Volatility Estimation 113 6.1 Volatility Estimation with GARCH Models . 113 6.2 Estimating a Volatility Surface . 117 7 Quadratic Programming: Theory and Algorithms 123 7.1 The Quadratic Programming Problem . 123 7.2 Optimality Conditions . 124 7.3 Interior-Point Methods . 126 7.4 The Central Path . 129 7.5 Interior-Point Methods . 130 7.5.1 Path-Following Algorithms . 130 7.5.2 Centered Newton directions . 131 7.5.3 Neighborhoods of the Central Path . 133 7.5.4 A Long-Step Path-Following Algorithm . 136 7.5.5 Starting from an Infeasible Point . 136 7.6 QP software . 137 7.7 Additional Exercises . 137 CONTENTS 5 8 QP Models: Portfolio Optimization 139 8.1 Mean-Variance Optimization . 139 8.1.1 Example . 141 8.1.2 Large-Scale Portfolio Optimization . 146 8.1.3 The Black-Litterman Model . 149 8.1.4 Mean-Absolute Deviation to Estimate Risk . 153 8.2 Maximizing the Sharpe Ratio . 155 8.3 Returns-Based Style Analysis . 158 8.4 Recovering Risk-Neural Probabilities from Options Prices . 160 8.5 Additional Exercises . 164 8.6 Case Study . 166 9 Conic Optimization Tools 169 9.1 Introduction . 169 9.2 Second-order cone programming: . 169 9.2.1 Ellipsoidal Uncertainty for Linear Constraints . 171 9.2.2 Conversion of quadratic constraints into second-order cone constraints . 173 9.3 Semidefinite programming: . 174 9.3.1 Ellipsoidal Uncertainty for Quadratic Constraints . 176 9.4 Algorithms and Software . 177 10 Conic Optimization Models in Finance 179 10.1 Tracking Error and Volatility Constraints . 179 10.2 Approximating Covariance Matrices . 182 10.3 Recovering Risk-Neural Probabilities from Options Prices . 185 10.4 Arbitrage Bounds for Forward Start Options . 187 10.4.1 A Semi-Static Hedge . 188 11 Integer Programming: Theory and Algorithms 193 11.1 Introduction . 193 11.2 Modeling Logical Conditions . 194 11.3 Solving Mixed Integer Linear Programs . 197 11.3.1 Linear Programming Relaxation . 197 11.3.2 Branch and Bound . 198 11.3.3 Cutting Planes . 206 11.3.4 Branch and Cut . 210 12 IP Models: Constructing an Index Fund 213 12.1 Combinatorial Auctions . 213 12.2 The Lockbox Problem . 214 12.3 Constructing an Index Fund . 217 12.3.1 A Large-Scale Deterministic Model . 218 12.3.2 A Linear Programming Model . 221 12.4 Portfolio Optimization with Minimum Transaction Levels . 222 12.5 Exercises . 223 12.6 Case Study . 224 6 CONTENTS 13 Dynamic Programming Methods 225 13.1 Introduction . 225 13.1.1 Backward Recursion . 228 13.1.2 Forward Recursion . 231 13.2 Abstraction of the Dynamic Programming Approach . 232 13.3 The Knapsack Problem. 235 13.3.1 Dynamic Programming Formulation . 235 13.3.2 An Alternative Formulation . 236 13.4 Stochastic Dynamic Programming . 237 14 DP Models: Option Pricing 239 14.1 A Model for American Options . 239 14.2 Binomial Lattice . 241 14.2.1 Specifying the parameters . 242 14.2.2 Option Pricing . 243 15 DP Models: Structuring Asset Backed Securities 247 15.1 Data . 249 15.2 Enumerating possible tranches . 251 15.3 A Dynamic Programming Approach . 252 15.4 Case Study . 253 16 Stochastic Programming: Theory and Algorithms 255 16.1 Introduction . 255 16.2 Two Stage Problems with Recourse . 256 16.3 Multi Stage Problems . 258 16.4 Decomposition . 260 16.5 Scenario Generation . 263 16.5.1 Autoregressive model . 263 16.5.2 Constructing scenario trees . 265 17 SP Models: Value-at-Risk 271 17.1 Risk Measures . 271 17.2 Minimizing CVaR . 274 17.3 Example: Bond Portfolio Optimization . 276 18 SP Models: Asset/Liability Management 279 18.1 Asset/Liability Management . 279 18.1.1 Corporate Debt Management . 282 18.2 Synthetic Options . 285 18.3 Case Study: Option Pricing with Transaction Costs . 288 18.3.1 The Standard Problem . 289 18.3.2 Transaction Costs . 290 19 Robust Optimization: Theory and Tools 293 19.1 Introduction to Robust Optimization . 293 19.2 Uncertainty Sets . ..