using the nag library for second-order cone … › market › posters › socp.pdfapril 2019...

1
April 2019 [email protected] www.nag.com where e is the vector of all ones, μ controls the trade-off between excess return and absolute risk and tev is the threshold on TEV. Note that without the absolute risk in the objective, the problem reduces to excess-return optimization. However, Roll (1992) noted this classical model leads to the unpalatable result that the active portfolio has systematically higher risk than the benchmark and is not optimal. Therefore, by taking the absolute risk into account the QCQP model (solved by SOCP) improves the performance of active portfolio. SOCP solver in the NAG Library was used to solve the above model. Each efficient frontier in the figure was generated by solving 2000 SOCPs. The whole process took around 4 mins (less than 0.02s per solving). Various financial models can be significantly enhanced by using the NAG SOCP solver. minimize x∈< 30 -r T x + μ(b + x) T V (b + x) subject to e T x =0, x + b 0, x T Vx tev, Case study: Portfolio optimization with tracking-error constraints The following model explores the risk and return relationship of active portfolios subject to tracking-error volatility (TEV). Let r be the vector of expected returns and V the covariance matrix for asset returns (estimated from daily data for 30 stocks in DJIA from March 2018 to March 2019). Randomly generating a benchmark portfolio b, we solve the following optimization: The NAG SOCP solver is more robust and outperforms both SEDUMI and SDPT3 on all test cases in DIMACS problem dataset in terms of efficiency and accuracy. Comparison of time on 12 DIMACS problems that all three solvers managed to solve successfully. NAG SEDUMI SDPT3 Problems solved 100% 77.78% 83.33% Table 1: Statistics on solvers’ status after run, percent- age of successful solve attempts. Prob. class No. of prob. Avg. n Avg. m Avg. nc nb 4 3098.75 321 906 nql 3 86102 49440 12300 qssp 3 99486 49471 24871 sched 8 17712.5 8448.5 1.5 Table 2: DIMACS problem statistics. 18 test prob- lems in 4 classes. (n number of variables, m number of linear constraints, nc number of quadratic cone con- straints.) Performance of the NAG SOCP solver We compare our solve times for 18 DIMACS Challenge problems to the well-known solvers SEDUMI and SDPT3 (default options, accuracy 10 -8 , single-threaded mode). Probability constraint: Prob(a T x b) η, where a is an independent Gaussian random vector and η 0.5. Constraints involving power functions, for example: x 5 1 x 2 2 x 3 3 x 6 4 1 and - x 1/5 1 x 2/5 2 x 1/5 3 x 4 ,x i 0. Quadratic/linear fractional problem: minimize x∈< n p i=1 kF i x+g i k 2 a T i x+b i , subject to a T i x + b i > 0,i =1,...,p. Convex quadratic constraint: 1 2 x T Px + q T x + r 0. The p-norm constraints: kxk p = n X i=1 |x i | p 1/p t, where p 1, e.g., absolute value |x|≤ t, l 1 -norm kxk 1 t and Euclidean norm kxk 2 t. Minimize sum of norm: min n i=1 kx i k 2 . Minimize maximum of norm: min max 1ir kx i k 2 . SOCP is widely used in quantitative finance due to its flexibility and versatility to handle a large variety of problems with different kinds of constraints, such as stochastic and robust portfolio optimization. Here is a list of problems and constraints that can be transformed into equivalent SOCPs. Quantitative finance professionals could use these elements to build more complex and more realistic models other than linear and quadratic programming. Versatility of SOCP and SOCP-representable problems Feasible region of an SOCP problem with 3 variables. minimize x∈< n c T x subject to l A Ax u A , l x x u x , x ∈K, where A ∈< m×n , l A ,u A ∈< m , c, l x ,u x ∈< n are the problem data, and K = K n 1 ×···×K n r ×< n l where K n i is a second-order cone defined as K n i q := x =(x 1 ,...,x n i ) ∈< n i : x 2 1 n i X j =2 x 2 j ,x 1 0 . Second-order cone programming (SOCP) is convex optimization which extends linear programming (LP) with second-order (Lorentz or the ice cream) cones. It appears in a broad range of applications from engineering, control theory and quantitative finance to quadratic programming and robust optimization. It has become an important tool for financial optimization due to its powerful nature. Interior point methods (IPM) are the most popular approaches to solve SOCP problems due to their theoretical polynomial complexity and practical performance. The NAG SOCP solver (e04pt) uses an IPM to solve a problem in the standard form: What is SOCP? Using the NAG Library for Second-order Cone Programming in Finance Shuanghua Bai (Numerical Algorithms Group)

Upload: others

Post on 25-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using the NAG Library for Second-order Cone … › market › posters › socp.pdfApril 2019 support@nag.co.uk where eis the vector of all ones, controls the trade-off between excess

April 2019 [email protected] www.nag.com

where e is the vector of all ones, µ controls the trade-off between excess return and absolute risk and tev isthe threshold on TEV. Note that without the absolute risk in the objective, the problem reduces to excess-returnoptimization. However, Roll (1992) noted this classical model leads to the unpalatable result that the activeportfolio has systematically higher risk than the benchmark and is not optimal. Therefore, by taking the absoluterisk into account the QCQP model (solved by SOCP) improves the performance of active portfolio.

SOCP solver in the NAG Library was used to solve the above model. Each efficient frontier in the figure wasgenerated by solving 2000 SOCPs. The whole process took around 4 mins (less than 0.02s per solving).

Various financial models can be significantly enhanced by using the NAG SOCP solver.

minimizex∈<30

−rTx + µ(b + x)TV (b + x)

subject to eTx = 0,

x + b ≥ 0,

xTV x ≤ tev,

Case study: Portfolio optimization with tracking-error constraintsThe following model explores the risk and return relationship of active portfolios subject to tracking-errorvolatility (TEV). Let r be the vector of expected returns and V the covariance matrix for asset returns (estimatedfrom daily data for 30 stocks in DJIA from March 2018 to March 2019). Randomly generating a benchmarkportfolio b, we solve the following optimization:

The NAG SOCP solver is more robust and outperforms both SEDUMI and SDPT3 on all test cases inDIMACS problem dataset in terms of efficiency and accuracy.

Comparison of time on 12 DIMACS problems that allthree solvers managed to solve successfully.

NAG SEDUMI SDPT3Problems solved 100% 77.78% 83.33%

Table 1: Statistics on solvers’ status after run, percent-age of successful solve attempts.

Prob. class No. of prob. Avg. n Avg. m Avg. ncnb 4 3098.75 321 906nql 3 86102 49440 12300qssp 3 99486 49471 24871sched 8 17712.5 8448.5 1.5

Table 2: DIMACS problem statistics. 18 test prob-lems in 4 classes. (n number of variables, m numberof linear constraints, nc number of quadratic cone con-straints.)

Performance of the NAG SOCP solverWe compare our solve times for 18 DIMACS Challenge problems to the well-known solvers SEDUMI andSDPT3 (default options, accuracy 10−8, single-threaded mode).

• Probability constraint:

Prob(aTx ≤ b) ≥ η,

where a is an independent Gaussian random vectorand η ≥ 0.5.

• Constraints involving power functions, for example:

x51x22x

33x

64 ≥ 1 and − x1/51 x

2/52 x

1/53 ≤ x4, xi ≥ 0.

•Quadratic/linear fractional problem:

minimizex∈<n

∑pi=1‖Fix+gi‖2aTi x+bi

,

subject to aTi x + bi > 0, i = 1, . . . , p.

• Convex quadratic constraint:

1

2xTPx + qTx + r ≤ 0.

• The p-norm constraints:

‖x‖p =

n∑i=1

|xi|p1/p

≤ t,

where p ≥ 1, e.g., absolute value |x| ≤ t, l1-norm‖x‖1 ≤ t and Euclidean norm ‖x‖2 ≤ t.

•Minimize sum of norm: min∑ni=1 ‖xi‖2.

•Minimize maximum of norm: minmax1≤i≤r ‖xi‖2.

SOCP is widely used in quantitative finance due to its flexibility and versatility to handle a large variety ofproblems with different kinds of constraints, such as stochastic and robust portfolio optimization. Here is a list ofproblems and constraints that can be transformed into equivalent SOCPs. Quantitative finance professionalscould use these elements to build more complex and more realistic models other than linear and quadraticprogramming.

Versatility of SOCP and SOCP-representable problems

Feasible region of an SOCP problem with 3 variables.

minimizex∈<n

cTx

subject to lA ≤ Ax ≤ uA,

lx ≤ x ≤ ux,

x ∈ K,

where A ∈ <m×n, lA, uA ∈ <m, c, lx, ux ∈ <n arethe problem data, and K = Kn1 × · · · × Knr × <nlwhere Kni is a second-order cone defined as

Kniq :=

x = (x1, . . . , xni) ∈ <ni : x21 ≥

ni∑j=2

x2j, x1 ≥ 0

.

Second-order cone programming (SOCP) is convex optimization which extends linear programming (LP) withsecond-order (Lorentz or the ice cream) cones. It appears in a broad range of applications from engineering,control theory and quantitative finance to quadratic programming and robust optimization. It has becomean important tool for financial optimization due to its powerful nature. Interior point methods (IPM) are themost popular approaches to solve SOCP problems due to their theoretical polynomial complexity and practicalperformance. The NAG SOCP solver (e04pt) uses an IPM to solve a problem in the standard form:

What is SOCP?

Using the NAG Library for Second-order ConeProgramming in Finance

Shuanghua Bai (Numerical Algorithms Group)