A Note on Portfolio Optimization with Quadratic Transaction Costs
AA Note on Portfolio Optimizationwith Quadratic Transaction Costs ∗ Pierre ChenQuantitative ResearchAmundi Asset Management, Paris [email protected]
Edmond LezmiQuantitative ResearchAmundi Asset Management, Paris [email protected]
Thierry RoncalliQuantitative ResearchAmundi Asset Management, Paris [email protected]
Jiali XuQuantitative ResearchAmundi Asset Management, Paris [email protected]
November 2019
Abstract
In this short note, we consider mean-variance optimized portfolios with transactioncosts. We show that introducing quadratic transaction costs makes the optimizationproblem more difficult than using linear transaction costs. The reason lies in thespecification of the budget constraint, which is no longer linear. We provide numericalalgorithms for solving this issue and illustrate how transaction costs may considerablyimpact the expected returns of optimized portfolios.
Keywords:
Portfolio allocation, mean-variance optimization, transaction cost, quadraticprogramming, alternating direction method of multipliers.
JEL classification:
C61, G11.
The general approach for introducing liquidity management in the mean-variance optimiza-tion model of Markowitz (1952) is to assume fixed bid-ask spreads. We then obtain the lineartransaction cost model, which can be solved using an augmented quadratic programmingproblem (Scherer, 2007). However, as shown by Lecesne and Roncoroni (2019a, 2019b), unittransaction costs may be a linear function of the trading size, implying that a model withquadratic transaction costs may be more appropriate. In this article, we investigate thisapproach and show how linear and quadratic transaction costs modify the mean-varianceoptimized framework. In particular, we do not obtain a standard QP problem when trans-action costs are quadratic, because the budget constraint is no longer linear. In this case, weobtain a quadratically constrained quadratic program (QCQP), which is an NP-hard prob-lem. However, using the ADMM framework, we are able to derive an efficient algorithmthat solves this issue. Finally, we use this algorithm to illustrate the impact of transactioncosts on optimized portfolios and Markowitz efficient frontiers. ∗ The authors are grateful to Jules Roche for his helpful comments. a r X i v : . [ q -f i n . P M ] J a n Note on Portfolio Optimization with Quadratic Transaction Costs
We consider a universe of n assets. Let w = ( w , . . . , w n ) be a portfolio. The return ofPortfolio w is given by: R ( w ) = n (cid:88) i =1 w i R i = w (cid:62) R where R = ( R , . . . , R n ) is the random vector of asset returns. If we note µ and Σ the vectorof expected returns and the covariance matrix of asset returns, we deduce that the expectedreturn of Portfolio w is equal to: µ ( w ) = E [ R ( w )] = w (cid:62) µ whereas its variance is given by: σ ( w ) = E (cid:104) ( R ( w ) − µ ( w )) (cid:105) = w (cid:62) Σ w The mean-variance optimization framework of Markowitz (1952) consists in maximizing theexpected return µ ( w ) for a fixed value σ (cid:63) of the volatility σ ( w ). This can be achieved bymaximizing the quadratic utility function: U ( w ) = γµ ( w ) − σ ( w )The mean-variance optimization framework can then be rewritten as a standard quadraticprogramming (QP) problem: w (cid:63) = arg min 12 w (cid:62) Σ w − γw (cid:62) µ (1)s . t . (cid:26) (cid:62) n w = 1 n ≤ w ≤ n The budget constraint (cid:62) n w = 1 (or (cid:80) ni =1 w i = 1) implies that the wealth is entirely invested,whereas the second constraint indicates that Portfolio w is long-only .Let us now introduce transaction costs. We note ˜ w the current portfolio and C ( w | ˜ w )the cost of rebalancing the current portfolio ˜ w towards the portfolio w . We deduce that thenet return is equal to the gross return minus the transaction costs: R ( w | ˜ w ) = R ( w ) − C ( w | ˜ w )It follows that: µ ( w | ˜ w ) = E [ R ( w | ˜ w )]= µ ( w ) − µ C ( w | ˜ w )and: σ ( w | ˜ w ) = E (cid:104) ( R ( w | ˜ w ) − µ ( w | ˜ w )) (cid:105) = E (cid:104) ( R ( w ) − µ ( w ) + µ C ( w | ˜ w ) − C ( w | ˜ w )) (cid:105) = σ ( w ) + σ C ( w | ˜ w ) − ρ C ( w | ˜ w ) σ ( w ) σ C ( w | ˜ w ) This constraint can be removed. µ C ( w | ˜ w ) = E [ C ( w | ˜ w )] is the expected cost of rebalancing and σ C ( w | ˜ w ) is thestandard deviation of C ( w | ˜ w ). The function ρ C ( w | ˜ w ) is the correlation between the grossreturn R ( w ) and the transaction cost C ( w | ˜ w ). Generally, we assume that ρ C ( w | ˜ w ) ≈ (cid:62) n w + C ( w | ˜ w ) = 1Here, we face an issue because the budget constraint is stochastic. This is why portfoliomanagers assume that transaction costs are known and not random. In this case, theoptimization problem becomes: w (cid:63) = arg min 12 w (cid:62) Σ w − γ (cid:0) w (cid:62) µ − C ( w | ˜ w ) (cid:1) (2)s . t . (cid:26) (cid:62) n w + C ( w | ˜ w ) = 1 n ≤ w ≤ n A first idea is to consider constant transaction costs. In this case, we have: C ( w | ˜ w ) = n (cid:88) i =1 c i · | w i − ˜ w i | where c i is the unit cost associated with Asset i . A better formulation is to distinguish bidand ask prices. Following Scherer (2007), we have: C ( w | ˜ w ) = C − ( w | ˜ w ) + C + ( w | ˜ w )= n (cid:88) i =1 c − i · max ( ˜ w i − w i ,
0) + n (cid:88) i =1 c + i · max ( w i − ˜ w i , c − i and c + i are the bid and ask unit transaction costs. We deduce that the transactioncost for Asset i satisfies: C i ( w | ˜ w ) = c − i · ( ˜ w i − w i ) if w i < ˜ w i w i = ˜ w i c + i · ( w i − ˜ w i ) if w i > ˜ w i (3)In this approach, the unit transaction cost is fixed and does not depend on the rebalancingweight: c i ( w | ˜ w ) = C i ( w | ˜ w ) | w i − ˜ w i | = c − i if w i < ˜ w i w i = ˜ w i c + i if w i > ˜ w i We can also assume that the unit transaction cost is a linear function of the rebalancingweight: c i ( w | ˜ w ) = c − i + δ − i · ( ˜ w i − w i ) if w i < ˜ w i w i = ˜ w i c + i + δ + i · ( w i − ˜ w i ) if w i > ˜ w i It follows that: C i ( w | ˜ w ) = c − i · ( ˜ w i − w i ) + δ − i · ( ˜ w i − w i ) if w i < ˜ w i w i = ˜ w i c + i · ( w i − ˜ w i ) + δ + i · ( w i − ˜ w i ) if w i > ˜ w i (4)3 Note on Portfolio Optimization with Quadratic Transaction CostsIn the academic literature, Specification (3) is known under the term ‘ linear transactioncosts ’, whereas Specification (4) corresponds to ‘ quadratic transaction costs ’. An example isprovided in Figure 1, where bid and ask transaction costs are different . On the left side, wehave reported the linear case, whereas the quadratic case corresponds to the right side . Wenotice that introducing quadratic costs has a more adverse effect on the portfolio’s return.By construction, the choice of one specification will impact portfolio optimization, especiallyif the rebalancing is significant.Figure 1: An example of linear and transaction costs (in %) -1 -0.5 0 0.5 1012345 Linear cost -1 -0.5 0 0.5 1012345
Quadratic cost -1 -0.5 0 0.5 1012345 -1 -0.5 0 0.5 1012345
Since C ( w | ˜ w ) is a nonlinear function of w , Problem (2) is not a standard QP problem.This is why Scherer (2007) suggested rewriting the transaction costs as follows: C ( w | ˜ w ) = c − i · ∆ w − i + c + i · ∆ w + i where ∆ w − i = max ( ˜ w i − w i ,
0) and ∆ w + i = max ( w i − ˜ w i ,
0) represent the sale and purchaseof Asset i . By definition, we have ∆ w − i · ∆ w + i = 0 and: w i = ˜ w i + ∆ w + i − ∆ w − i For instance, in the case of corporate bonds, there are some periods where it is easier to sell bonds thanbuy bonds or the contrary. The parameters are the following: c − i = 1%, c + i = 2%, δ − i = 2% and δ + i = 3%. Moreover, we assumethat the current allocation ˜ w is equal to 0. w (cid:63) = arg min 12 w (cid:62) Σ w − γ (cid:32) n (cid:88) i =1 w i · µ i − n (cid:88) i =1 ∆ w − i · c − i − n (cid:88) i =1 ∆ w + i · c + i (cid:33) (5)s . t . (cid:80) ni =1 w i + (cid:80) ni =1 ∆ w − i · c − i + (cid:80) ni =1 ∆ w + i · c + i = 1 w i + ∆ w − i − ∆ w + i = ˜ w i n ≤ w ≤ n We notice that we obtain a QP problem with respect to the variables x = ( w, ∆ w − , ∆ w + ).Indeed, we have: x (cid:63) = arg min 12 x (cid:62) Qx − x (cid:62) R (6)s . t . (cid:26) Ax = Bx − ≤ x ≤ x + where: Q = Σ n,n n,n n,n n,n n,n n,n n,n n,n and: R = γ µ − c − − c + For the equality constraint, we obtain: A = (cid:18) (cid:62) n ( c − ) (cid:62) ( c + ) (cid:62) I n I n − I n (cid:19) and: B = (cid:18) w (cid:19) For the bounds, we notice that:0 ≤ w i ≤ ⇔ ≤ ˜ w i + ∆ w + i − ∆ w − i ≤ ⇔ − ˜ w i ≤ ∆ w + i − ∆ w − i ≤ − ˜ w i ⇔ (cid:26) − ˜ w i ≤ ∆ w + i ≤ − ˜ w i if ∆ w − i = 0˜ w i − ≤ ∆ w − i ≤ ˜ w i if ∆ w + i = 0However, we know that ∆ w − i ≥ w + i ≥
0. We deduce that x − = n and: x + = n ˜ w n − ˜ w Problem (6) is called an augmented QP problem (Roncalli, 2013), because we have aug-mented the number of variables in order to find the optimal solution w (cid:63) which is given bythe following relationship: w (cid:63) = (cid:0) I n n,n n,n (cid:1) x (cid:63) We consider an investment universe of 7 assets. Their expected return and volatility ex-pressed as a % are equal to: i µ i σ i c − = 20 bps and c + = 10 bps, we obtain theefficient frontier that is reported in Figure 2. Here, we face an issue because transactioncosts imply that (cid:80) ni =1 w (cid:63)i <
1. Therefore, the efficient frontier cannot be represented by thepair ( σ ( w (cid:63) ) , µ ( w (cid:63) )) because the net wealth (cid:80) ni =1 w (cid:63)i depends on the values taken by c − and c + . With no transaction costs, we retrieve the classical efficient frontier of Markowitz(1952). However, in order to compare efficient frontiers, we have to normalize the optimizedportfolio: ¯ w (cid:63) = w (cid:63)i (cid:80) ni =1 w (cid:63)i Indeed, plotting ( σ ( w (cid:63) ) , µ ( w (cid:63) )) is misleading since we have paid transaction costs in orderto rebalance the portfolio. For instance, if the transaction costs are high, we have (cid:80) ni =1 w (cid:63)i (cid:28) net expected return ’),which is equal to µ net ( ¯ w (cid:63) ) = µ ( ¯ w (cid:63) ) − C ( w (cid:63) | ˜ w ). The efficient frontier with transactioncosts is then represented by the curve ( σ ( ¯ w (cid:63) ) , µ net ( ¯ w (cid:63) )). However, with c − = 20 bps and c + = 10 bps, Figure 2 gives the impression that transaction costs have little impact on theefficient frontier.Let us now consider an unrealistic case: c − = 2% and c + = 1%. We obtain Figure 3and we notice the big impact of transaction costs on the expected return of the portfolio. InFigure 4, we have reported the total amount of transaction costs with respect to portfoliovolatility. Since the case c − = 20 bps and c + = 10 bps is more realistic, it may not reflectthe real impact on a trading strategy. Indeed, these transaction costs are paid at eachrebalancing date. The efficient frontier considers a yearly expected return, whereas the netexpected return assumes only one portfolio rebalancing in the year, and does not take intoaccount the total turnover of the portfolio. For example, if we assume that we rebalancethe portfolio 5 times in the year, we obtain the green curve that illustrates how cumulativetransaction costs can be damaging for portfolio performance. In the case of quadratic transaction costs, we can use the same approach by consideringaugmented variables. We deduce that: C ( w | ˜ w ) = n (cid:88) i =1 ∆ w − i (cid:0) c − i + δ − i ∆ w − i (cid:1) + n (cid:88) i =1 ∆ w + i (cid:0) c + i + δ + i ∆ w + i (cid:1) = ∆ w −(cid:62) c − + ∆ w −(cid:62) ∆ − ∆ w − + ∆ w + (cid:62) c + + ∆ w + (cid:62) ∆ + ∆ w + σ ( ¯ w (cid:63) ) , µ net ( ¯ w (cid:63) )) with c − = 20 bps and c + = 10 bps Figure 3: Efficient frontier ( σ ( ¯ w (cid:63) ) , µ net ( ¯ w (cid:63) )) with c − = 2% and c + = 1% where ∆ − = diag (cid:0) δ − , . . . , δ − n (cid:1) and ∆ + = diag (cid:0) δ +1 , . . . , δ + n (cid:1) are two diagonal matrices. Itfollows that the objective function of Problem (2) remains quadratic: f (cid:0) w, ∆ w − , ∆ w + (cid:1) = 12 w (cid:62) Σ w − γ (cid:0) w (cid:62) µ − C ( w | ˜ w ) (cid:1) = 12 (cid:0) w (cid:62) Σ w + ∆ w −(cid:62) (cid:0) γ ∆ − (cid:1) ∆ w − + ∆ w + (cid:62) (cid:0) γ ∆ + (cid:1) ∆ w + (cid:1) − γ (cid:0) w (cid:62) µ − ∆ w −(cid:62) c − − ∆ w + (cid:62) c + (cid:1) but the budget constraint is no longer linear: (cid:62) n w + ∆ w −(cid:62) c − + ∆ w + (cid:62) c + (cid:124) (cid:123)(cid:122) (cid:125) Linear term + ∆ w −(cid:62) ∆ − ∆ w − + ∆ w + (cid:62) ∆ + ∆ w + (cid:124) (cid:123)(cid:122) (cid:125) Quadratic term = 1Indeed, the budget constraint is composed of a linear term and a quadratic term.Let x = ( w, ∆ w − , ∆ w + ) be the vector of original variables and augmented variables. Weobtain: x (cid:63) = arg min 12 x (cid:62) Qx − x (cid:62) R (7)s . t . A x + x (cid:62) C x = B A x = B x − ≤ x ≤ x + where: Q = Σ n,n n,n n,n γ ∆ − n,n n,n n,n γ ∆ + R = γ µ − c − − c + For the equality constraints, we obtain: (cid:18) A A (cid:19) = (cid:18) (cid:62) n ( c − ) (cid:62) ( c + ) (cid:62) I n I n − I n (cid:19) and: (cid:18) B B (cid:19) = (cid:18) w (cid:19) The matrix C is defined as follows: C = n,n n,n n,n n,n ∆ − n,n n,n n,n ∆ + The bounds remain the same. We have x − = n and: x + = n ˜ w n − ˜ w Again, the optimal solution w (cid:63) is given by the following relationship: w (cid:63) = (cid:0) I n n,n n,n (cid:1) x (cid:63) Following Perrin and Roncalli (2019), we can use the alternating direction method of mul-tipliers (ADMM) algorithm formulated by Gabay and Mercier (1976) to solve Problem (7)and overcome the non linear constraint. To do this, we leave the objective function as well asall the linear constraints in the x -update and put the non linear constraint in the y -update.In this case, the x -update is easily solved using QP, but the y -update is an NP-hard problemin the general case. Problem (7) is equivalent to: { x (cid:63) , y (cid:63) } = arg min ( x,y ) f x ( x ) + f y ( y ) (8)s.t. x − y = n where: f x ( x ) = 12 x (cid:62) Qx − x (cid:62) R + Ω x ( x )and: f y ( y ) = Ω y ( y )The sets Ω x and Ω y are defined as follows:Ω x ( x ) = (cid:8) x ∈ [0 , n : A x = B , x − ≤ x ≤ x + (cid:9) y ( y ) = (cid:8) y ∈ [0 , n : A y + y (cid:62) C y = B (cid:9) The corresponding ADMM algorithm consists of the following three steps (Boyd et al. , 2011;Perrin and Roncalli, 2019):1. The x -update is: x ( k +1) = arg min x (cid:26) f x ( x ) + ϕ (cid:13)(cid:13)(cid:13) x − y ( k ) + u ( k ) (cid:13)(cid:13)(cid:13) (cid:27) (9)2. The y -update is: y ( k +1) = arg min y (cid:26) f y ( y ) + ϕ (cid:13)(cid:13)(cid:13) x ( k +1) − y + u ( k ) (cid:13)(cid:13)(cid:13) (cid:27) (10)3. The u -update is: u ( k +1) = u ( k ) + x ( k +1) − y ( k +1) (11)As noted by Perrin and Roncalli (2019), the x -update is a QP problem: x ( k +1) = arg min 12 x (cid:62) ( Q + ϕI n ) x − x (cid:62) (cid:16) R + ϕ (cid:16) y ( k ) − u ( k ) (cid:17)(cid:17) (12)s . t . (cid:26) A x = B x − ≤ x ≤ x + There is no difficulty in finding the numerical solution x ( k +1) . In fact, the issue concernsthe calculation of y ( k +1) . δ − i = δ − and δ + i = δ + Generally, the y -update is easily solved by combining proximal operators and the Dykstraalgorithm. However, in our case, we cannot use such a decomposition because the constraintis unusual. In fact, we have the following optimization problem: y ( k +1) = arg min y (cid:13)(cid:13)(cid:13) y − v ( k +1) y (cid:13)(cid:13)(cid:13) s.t. y ∈ Ω y where v ( k +1) y = x ( k +1) + u ( k ) . We deduce that the Lagrange function is equal to: L ( y, λ ) = 12 (cid:13)(cid:13)(cid:13) y − v ( k +1) y (cid:13)(cid:13)(cid:13) + λ (cid:32) n (cid:88) i =1 (cid:0) w i + ∆ w − i (cid:0) c − i + δ − i ∆ w − i (cid:1) + ∆ w + i (cid:0) c + i + δ + i ∆ w + i (cid:1)(cid:1) − (cid:33) Using the similar partition v ( k +1) y = ( v, ∆ v − , ∆ v + ) as y = ( w, ∆ w − , ∆ w + ), the KKT con-ditions are: w i − v i + λ = 0∆ w − i − ∆ v − i + λ (cid:0) c − i + 2 δ − i ∆ w − i (cid:1) = 0∆ w + i − ∆ v + i + λ (cid:0) c + i + 2 δ + i y + i (cid:1) = 0 (cid:80) ni =1 (cid:0) w i + ∆ w − i (cid:0) c − i + δ − i ∆ w − i (cid:1) + ∆ w + i (cid:0) c + i + δ + i ∆ w + i (cid:1)(cid:1) = 110 Note on Portfolio Optimization with Quadratic Transaction CostsWe then get a nonlinear system of 3 n + 1 equations. We first consider the case δ − i = δ − and δ + i = δ + . In Appendix A.1 on page 14, we show that λ is the solution of a quintic equation: α λ + α λ + α λ + α λ + α λ + α = 0From this, we can conclude that there are as many solutions to the nonlinear system asthere are real roots to the last polynomial equation. Since we know that KKT conditions arenecessary, it is sufficient to compare the different solutions obtained for this system in orderto find the solution of our original program . More general methods are available in order tonumerically solve the nonlinear system such as the Newton-Raphson algorithm. However,for these methods, it is usually necessary to compute the inverse of a Hessian matrix at eachstep of iteration which is very costly (around O (cid:0) (3 n + 1) (cid:1) ). By taking advantage of thederivation of the y -update, we only need one step of cost O (cid:0) (cid:1) to compute the roots of thepolynomial in order to solve the system. δ − i (cid:54) = δ − j and δ + i (cid:54) = δ + j The case δ − i (cid:54) = δ − j and δ + i (cid:54) = δ + j complicates the problem. Indeed, we obtain a polynomialequation of degree 2 n + 1. Another solution is to rewrite the y -update problem in a matrixform : y ( k +1) = arg min 12 (cid:16) y − v ( k +1) y (cid:17) (cid:62) (cid:16) y − v ( k +1) y (cid:17) s . t . A y + y (cid:62) C y − B = 0We obtain a quadratically constrained quadratic program (QCQP). Since a quadratic equal-ity is not convex, the optimization problem is not convex. More generally, a QCQP is anNP-hard problem. A numerical solution is therefore to consider an interior-point algorithmby specifying the gradient of the objective function, the gradient of the equality constraintand the Hessian of the Lagrangian . However, since we have only one constraint and theobjective function is simple, we can derive the numerical solution (Park and Boyd, 2017),which is described in Appendix A.2 on page 16. Remark 1.
The ADMM formulation has allowed us to split the QCQP Problem (7) with twoinequality and two equality constraints into a QP problem ( x -update) and a QCQP problemwith only one constraint ( y -update). As explained by Park and Boyd (2017), solving QCQPwith one constraint is feasible and relatively easy. This is not always the case when thereare two or more constraints. We consider our previous example. We assume that the current portfolio is the optimalportfolio ˜ w corresponding to volatility of 2%. In a second period, the portfolio managerwould increase portfolio risk and target volatility equal to 4%. Portfolio w (cid:63) MVO is the optimalsolution if we do not take into account transaction costs. However, this portfolio is notrealistic if we consider transaction costs. We set c − = 2%, c + = 1%, δ − = 5% and δ + = 5%. It is also possible that there are cases where we can get several solutions as we are projecting onto aquadratic equation. For example, we would get an infinite number of solutions if we project a point onto acircle, where this point is its center. However, in the general case, we avoid these critical points and findonly one single real root to the polynomial equation. ϕ is set to one because its value has no impact on the solution. They are respectively equal to y − v ( k +1) y , A + 2 C y and I n + 2 λC .
11 Note on Portfolio Optimization with Quadratic Transaction CostsTable 1: Comparison of optimized portfolios with linear and quadratic costsAsset ˜ w w (cid:63)
MVO w (cid:63) LC w (cid:63) QC ¯ w (cid:63) LC ¯ w (cid:63) QC .
16 0 .
01 0 .
00 6 .
70 0 .
00 6 .
802 21 .
41 0 .
08 14 .
52 10 .
84 14 .
67 11 .
013 16 .
13 10 .
92 16 .
13 14 .
32 16 .
28 14 .
534 12 .
79 22 .
42 12 .
79 12 .
78 12 .
91 12 .
985 10 .
56 24 .
77 10 .
56 10 .
56 10 .
67 10 .
726 7 .
34 22 .
59 18 .
27 14 .
17 18 .
45 14 .
387 5 .
62 19 .
22 26 .
74 29 .
13 27 .
01 29 . µ ( w ) 3 .
33 6 .
08 5 .
86 5 .
73 5 .
92 5 . σ ( w ) 2 .
00 4 .
00 4 .
00 4 .
00 4 .
04 4 . C LC ( w | ˜ w ) 1 .
58 0 .
98 0 . C QC ( w | ˜ w ) 2 .
52 1 .
63 1 . µ LC ( w | ˜ w ) 3 .
33 4 .
50 4 .
88 4 . µ QC ( w | ˜ w ) 3 .
33 3 .
56 4 .
23 4 . w (cid:63) LC . We observe that the two solutions w (cid:63) MVO and w (cid:63) LC are very different. For instance, theLC solution keeps a significant proportion of Asset 2 in order to pay less transaction costs.Indeed, Portfolios w (cid:63) MVO and w (cid:63) LC pay respectively 1 .
58% and 0 .
98% of transaction costs. Inthe case of quadratic transaction costs, the solution is Portfolio w (cid:63) QC . We notice that it hasa lower turnover than the two previous portfolios. Moreover, it selects assets with a highreturn in order to compensate for the transaction costs. This is why we obtain a weight of29 .
13% for Asset 7.Figure 5: Efficient frontier ( σ ( ¯ w (cid:63) ) , µ net ( ¯ w (cid:63) )) with quadratic transaction costs
12 Note on Portfolio Optimization with Quadratic Transaction CostsIn Figure 5, we have reported the efficient frontier with the previous transaction costs.We verify that it is below the unconstrained MVO efficient frontier. We also notice thatquadratic transaction costs have a significant adverse effect on the net expected return ofoptimized portfolios. In our example, we rebalance a portfolio, which has low volatility. Thisimplies that it is inefficient to target an optimized portfolio with high volatility, becausewe have to pay substantial transaction costs. For instance, it is impossible to target anexpected return greater than 4%, implying that having portfolio volatility higher than 5%is not optimal.
Remark 2.
We do not say that it is impossible to target volatility higher than , but wesay that it is not optimal. Indeed, the ADMM algorithm stops before the optimized portfolioreaches . In order to match volatility σ (cid:63) > , we have to solve the strict σ -problem: w (cid:63) = arg max n (cid:88) i =1 w i · µ i − n (cid:88) i =1 ∆ w − i (cid:0) c − i + δ − i ∆ w − i (cid:1) − n (cid:88) i =1 ∆ w + i (cid:0) c + i + δ + i ∆ w + i (cid:1) (13)s . t . (cid:80) ni =1 w i + (cid:80) ni =1 ∆ w − i (cid:0) c − i + δ − i ∆ w − i (cid:1) + (cid:80) ni =1 ∆ w + i (cid:0) c + i + δ + i ∆ w + i (cid:1) = 1 w i + ∆ w − i − ∆ w + i = ˜ w i √ w (cid:62) Σ w = σ (cid:63) n ≤ w ≤ n This can be done by rewriting Problem (13) as a QCQP program . In Figure 5, we verifythat QCQP optimized portfolios such that σ ( w (cid:63) ) > are in fact not optimal, because theyare dominated by portfolios with a higher expected return and lower volatility. In this short note, we study mean-variance optimized portfolios with linear and quadratictransaction costs. We show how the problem can be solved using the techniques of quadraticprogramming and alternating direction method of multipliers. We also illustrate how linearand quadratic transaction costs can lead to different solutions and penalize the portfolio’sreturn. Moreover, the introduction of quadratic transaction costs opens a new field ofresearch when we consider transition management, asset ramp-up or portfolio scaling.
References [1]
Boyd , S.,
Parikh , N.,
Chu , E.,
Peleato , B., and
Eckstein , J. (2010), DistributedOptimization and Statistical Learning via the Alternating Direction Method of Multi-pliers,
Foundations and Trends R (cid:13) in Machine learning , 3(1), pp. 1-122.[2] Gabay , D., and
Mercier , B. (1976), A Dual Algorithm for the Solution of NonlinearVariational Problems via Finite Element Approximation,
Computers & Mathematicswith Applications , 2(1), pp. 17-40.[3]
Lecesne , L., and
Roncoroni , A. (2019a), Optimal Allocation in the S&P 600 UnderSize-driven Illiquidity,
ESSEC Working Paper .[4]
Lecesne , L., and
Roncoroni , A. (2019b), How Should Funds Decisions and Perfor-mances React to Size-Driven Liquidity Friction,
ESSEC Working Paper . See Appendix A.3 on page 17.
13 Note on Portfolio Optimization with Quadratic Transaction Costs[5]
Markowitz , H. (1952), Portfolio Selection,
Journal of Finance , 7(1), pp. 77-91.[6]
Park , J., and
Boyd , S. (2017), General Heuristics for Nonconvex Quadratically Con-strained Quadratic Programming, arXiv , 1703.07870.[7]
Perrin , S., and
Roncalli , T. (2019), Machine Learning Algorithms and PortfolioOptimization, in Jurczenko, E. (Ed.),
Machine Learning in Asset Management , ISTEPress – Elsevier, forthcoming.[8]
Roncalli , T. (2013),
Introduction to Risk Parity and Budgeting , Chapman andHall/CRC Financial Mathematics Series.[9]
Scherer , B. (2007),
Portfolio Construction & Risk Budgeting , Third edition, RiskBooks.
AppendixA Mathematical results
A.1 Solution of the y -update in the case δ − i = δ − and δ + i = δ + We would like to solve the following nonlinear system of 3 n + 1 equations: w i − v i + λ = 0∆ w − i − ∆ v − i + λ (cid:0) c − i + 2 δ − ∆ w − i (cid:1) = 0∆ w + i − ∆ v + i + λ (cid:0) c + i + 2 δ + ∆ w + i (cid:1) = 0 (cid:80) ni =1 (cid:0) w i + ∆ w − i (cid:0) c − i + δ − ∆ w − i (cid:1) + ∆ w + i (cid:0) c + i + δ + ∆ w + i (cid:1)(cid:1) = 1The first 3 n equations are equivalent to: w i = v i − λ ∆ w − i = ∆ v − i − λc − i λ − ∆ w + i = ∆ v + i − λc + i λ + where λ − = 1 + 2 λδ − and λ + = 1 + 2 λδ + . The last equation then becomes:( ∗ ) ⇔ n (cid:88) i =1 ( v i − λ ) + n (cid:88) i =1 (cid:18) ∆ v − i − λc − i λ − (cid:19) (cid:18) c − i + δ − i ∆ v − i − λc − i λ − (cid:19) + n (cid:88) i =1 (cid:18) ∆ v + i − λc + i λ + (cid:19) (cid:18) c + i + δ + i ∆ v + i − λc + i λ + (cid:19) = 1 ⇔ λ − λ + (cid:32) n (cid:88) i =1 v i − (cid:33) − λλ − λ + n + λ − λ + n (cid:88) i =1 c − i (cid:0) ∆ v − i − λc − i (cid:1) + λ + δ − n (cid:88) i =1 (cid:0) ∆ v − i − λc − i (cid:1) + λ − λ + n (cid:88) i =1 c + i (cid:0) ∆ v + i − λc + i (cid:1) + λ − δ + n (cid:88) i =1 (cid:0) ∆ v + i − λc + i (cid:1) = 014 Note on Portfolio Optimization with Quadratic Transaction CostsWe have λ − = (cid:16) δ − (cid:17) λ + (4 δ − ) λ + 1, λ + = (cid:16) δ + (cid:17) λ + (4 δ + ) λ + 1 and: λ − λ + = (cid:16) δ − δ + (cid:17) λ + 4 δ + (cid:0) δ − + δ + (cid:1) λ + 2 (cid:0) δ − + 2 δ + (cid:1) λ + 1 λ − λ + = (cid:16) δ − δ + (cid:17) λ + 4 δ − (cid:0) δ − + 2 δ + (cid:1) λ + 2 (cid:0) δ − + δ + (cid:1) λ + 1 λ − λ + = (cid:16) δ − δ + (cid:17) λ + 16 δ − δ + (cid:0) δ − + δ + (cid:1) λ +4 (cid:16) δ − + 4 δ − δ + + δ + (cid:17) λ + 4 (cid:0) δ − + δ + (cid:1) λ + 1We deduce that:( ∗ ) ⇔ (cid:32) n (cid:88) i =1 v i − (cid:33) (cid:16)(cid:16) δ − δ + (cid:17) λ + 16 δ − δ + (cid:0) δ − + δ + (cid:1) λ + 4 (cid:16) δ − + 4 δ − δ + + δ + (cid:17) λ (cid:17) + (cid:32) n (cid:88) i =1 v i − (cid:33) (cid:0) (cid:0) δ − + δ + (cid:1) λ + 1 (cid:1) − n (cid:16)(cid:16) δ − δ + (cid:17) λ + 16 δ − δ + (cid:0) δ − + δ + (cid:1) λ (cid:17) − n (cid:16) (cid:16) δ − + 4 δ − δ + + δ + (cid:17) λ + 4 (cid:0) δ − + δ + (cid:1) λ + λ (cid:17) + (cid:32) n (cid:88) i =1 c − i ∆ v − i (cid:33) (cid:16)(cid:16) δ − δ + (cid:17) λ + 4 δ + (cid:0) δ − + δ + (cid:1) λ + 2 (cid:0) δ − + 2 δ + (cid:1) λ + 1 (cid:17) − (cid:32) n (cid:88) i =1 c − i (cid:33) (cid:16)(cid:16) δ − δ + (cid:17) λ + 4 δ + (cid:0) δ − + δ + (cid:1) λ + 2 (cid:0) δ − + 2 δ + (cid:1) λ + λ (cid:17) + (cid:32) δ − n (cid:88) i =1 ∆ v − i (cid:33) (cid:16)(cid:16) δ + (cid:17) λ + (cid:0) δ + (cid:1) λ + 1 (cid:17) − (cid:32) δ − n (cid:88) i =1 ∆ v − i c − i (cid:33) (cid:16)(cid:16) δ + (cid:17) λ + (cid:0) δ + (cid:1) λ + λ (cid:17) + (cid:32) δ − n (cid:88) i =1 c − i (cid:33) (cid:16)(cid:16) δ + (cid:17) λ + (cid:0) δ + (cid:1) λ + λ (cid:17) + (cid:32) n (cid:88) i =1 c + i ∆ v + i (cid:33) (cid:16)(cid:16) δ − δ + (cid:17) λ + 4 δ − (cid:0) δ − + 2 δ + (cid:1) λ + 2 (cid:0) δ − + δ + (cid:1) λ + 1 (cid:17) − (cid:32) n (cid:88) i =1 c + i (cid:33) (cid:16)(cid:16) δ − δ + (cid:17) λ + 4 δ − (cid:0) δ − + 2 δ + (cid:1) λ + 2 (cid:0) δ − + δ + (cid:1) λ + λ (cid:17) + (cid:32) δ + n (cid:88) i =1 ∆ v + i (cid:33) (cid:16)(cid:16) δ − (cid:17) λ + (cid:0) δ − (cid:1) λ + 1 (cid:17) − (cid:32) δ + n (cid:88) i =1 ∆ v + i c + i (cid:33) (cid:16)(cid:16) δ − (cid:17) λ + (cid:0) δ − (cid:1) λ + λ (cid:17) + (cid:32) δ + n (cid:88) i =1 c + i (cid:33) (cid:16)(cid:16) δ − (cid:17) λ + (cid:0) δ − (cid:1) λ + λ (cid:17) = 0We obtain a quintic equation: α λ + α λ + α λ + α λ + α λ + α = 015 Note on Portfolio Optimization with Quadratic Transaction Costswhere: α = 16 nδ − δ + α = (cid:16) δ − δ + (cid:17) (cid:32) n (cid:88) i =1 v i − (cid:33) − nδ − δ + (cid:0) δ − + δ + (cid:1) − δ − δ + (cid:32) δ + n (cid:88) i =1 c − i + δ − n (cid:88) i =1 c + i (cid:33) α = 16 δ − δ + (cid:0) δ − + δ + (cid:1) (cid:32) n (cid:88) i =1 v i − (cid:33) − n (cid:16) δ − + 4 δ − δ + + δ + (cid:17) − (cid:0) δ − + δ + (cid:1) (cid:32) δ + n (cid:88) i =1 c − i + δ − n (cid:88) i =1 c + i (cid:33) α = 4 (cid:16) δ − + 4 δ − δ + + δ + (cid:17) (cid:32) n (cid:88) i =1 v i − (cid:33) − n (cid:0) δ − + δ + (cid:1) +4 (cid:32) δ + n (cid:88) i =1 c − i ∆ v − i + δ − n (cid:88) i =1 c + i ∆ v + i (cid:33) − (cid:0) δ − + 4 δ + (cid:1) n (cid:88) i =1 c − i − (cid:0) δ − + δ + (cid:1) n (cid:88) i =1 c + i + 4 δ − δ + (cid:32) δ + n (cid:88) i =1 ∆ v − i + δ − n (cid:88) i =1 ∆ v + i (cid:33) α = 4 (cid:0) δ − + δ + (cid:1) (cid:32) n (cid:88) i =1 v i − (cid:33) − n + 4 (cid:32) δ + n (cid:88) i =1 c − i ∆ v − i + δ − n (cid:88) i =1 c + i ∆ v + i (cid:33) − (cid:32) n (cid:88) i =1 c − i + n (cid:88) i =1 c + i (cid:33) + 4 δ − δ + (cid:32) n (cid:88) i =1 ∆ v − i + n (cid:88) i =1 ∆ v + i (cid:33) and: α = (cid:32) n (cid:88) i =1 v i − (cid:33) + (cid:32) n (cid:88) i =1 c − i ∆ v − i + n (cid:88) i =1 c + i ∆ v + i (cid:33) + (cid:32) δ − n (cid:88) i =1 ∆ v − i + δ + n (cid:88) i =1 ∆ v + i (cid:33) A.2 Solution of the y -update in the case δ − i (cid:54) = δ − j and δ + i (cid:54) = δ + j We consider the following optimization problem: y ( k +1) = arg min 12 (cid:16) y − v ( k +1) y (cid:17) (cid:62) (cid:16) y − v ( k +1) y (cid:17) s . t . A y + y (cid:62) C y − B = 0Following Park and Boyd (2017), the Lagrangian is given by: L ( y, λ ) = 12 (cid:16) y − v ( k +1) y (cid:17) (cid:62) (cid:16) y − v ( k +1) y (cid:17) + λ (cid:0) A y + y (cid:62) C y − B (cid:1) = 12 y (cid:62) ( I n + 2 λC ) y + (cid:16) λA − v ( k +1) (cid:62) y (cid:17) y + (cid:18) v ( k +1) (cid:62) y v ( k +1) y − λB (cid:19)
16 Note on Portfolio Optimization with Quadratic Transaction CostsThe first order conditions are: (cid:26) ( I n + 2 λC ) y + λA (cid:62) − v ( k +1) y = n A y + y (cid:62) C y − B = 0Therefore, we have: y = ( I n + 2 λC ) − (cid:16) v ( k +1) y − λA (cid:62) (cid:17) It follows that the equality constraint becomes: A ( I n + 2 λC ) − (cid:16) v ( k +1) y − λA (cid:62) (cid:17) + (cid:16) v ( k +1) y − λA (cid:62) (cid:17) (cid:62) ( I n + 2 λC ) − C ( I n + 2 λC ) − (cid:16) v ( k +1) y − λA (cid:62) (cid:17) − B = 0Since C is a diagonal matrix, ( I n + 2 λC ) − is also a diagonal matrix. It follows that theprevious equation is equivalent to: n (cid:88) i =1 A ,i (cid:16) v ( k +1) y,i − λA ,i (cid:17) λ ( C ) i,i + n (cid:88) i =1 ( C ) i,i (cid:16) v ( k +1) y,i − λA ,i (cid:17) (cid:16) λ ( C ) i,i (cid:17) − B = 0By replacing A ,i , B , ( C ) i,i and v ( k +1) y,i by their values, we obtain the following nonlinearequation: n (cid:88) i =1 ( v i − λ ) + n (cid:88) i =1 c − i (cid:0) ∆ v − i − λc − i (cid:1) λδ − i + n (cid:88) i =1 c + i (cid:0) ∆ v + i − λc + i (cid:1) λδ + i + n (cid:88) i =1 δ − i (cid:0) ∆ v − i − λc − i (cid:1) (cid:0) λδ − i (cid:1) + n (cid:88) i =1 δ + i (cid:0) ∆ v + i − λc + i (cid:1) (cid:0) λδ + i (cid:1) − λ (cid:63) is found, the solution y ( k +1) is given by: w i = v i − λ (cid:63) ∆ w − i = ∆ v − i − λ (cid:63) c − i λ (cid:63) δ − i ∆ w + i = ∆ v + i − λ (cid:63) c + i λ (cid:63) δ + i A.3 QCQP formulation of the strict σ -problem In the case of the strict σ -problem, the optimization problem becomes: x (cid:63) = arg min − x (cid:62) R + x (cid:62) Qx s . t . A x + x (cid:62) C x = B A x = B x (cid:62) C x = B x − ≤ x ≤ x +
17 Note on Portfolio Optimization with Quadratic Transaction Costswhere x = ( w, ∆ w − , ∆ w + ), Q = n,n n,n n,n n,n ∆ − n,n n,n n,n ∆ + and: R = µ − c − − c + For the equality constraints, we obtain: (cid:18) A A (cid:19) = (cid:18) (cid:62) n ( c − ) (cid:62) ( c + ) (cid:62) I n I n − I n (cid:19) and: B B B = wσ (cid:63) where σ (cid:63) is the targeted volatility of the portfolio. The matrices C and C are defined asfollows: C = n,n n,n n,n n,n ∆ − n,n n,n n,n ∆ + and: C = Σ n,n n,n n,n n,n n,n n,n n,n n,n The bounds remain the same: x − = n and: x + = n ˜ w n − ˜ w Again, the optimal solution w (cid:63) is given by the following relationship: w (cid:63) = (cid:0) I n n,n n,n (cid:1) x (cid:63)(cid:63)