Individual and cooperative portfolio optimization as linear program

We derive a linear program for minimization, subject to a linear constraint, of an arbitrary positively homogeneous convex functional, whose dual set is given by linear inequalities, possibly involving auxiliary variables. This allows to reduce to linear programming individual and cooperative portfolio optimization problems with arbitrary deviation measures whose risk envelopes are given by a finite number of linear constraints. Earlier, such linear programs were known only for individual porfolio optimization problems with special examples of deviation measures, such as mean absolute deviation or CVaR deviation.


Introduction
One of the central problems in finance is determining optimal financial portfolio, that is, optimal capital distribution among n financial instruments. A celebrated work of Markowitz [9] suggests to select a portfolio with minimum possible standard deviation of the rate of return subject to a constraint on the expected return. However, Markowitz himself acknowledged that standard deviation is not an ideal way to estimate the portfolio risk, because it is symmetric and therefore equally penalizes loss and profit. As a possible alternative, Markowitz considers lower semi-deviation, which penalises only returns below the expected value. However, while the optimization problem with standard deviation has a closed form solution, the one with lower semi-deviation B Bogdan Grechuk bg83@leicester.ac.uk Dawei Hao dh294@leicester.ac.uk 1 School of Computing and Mathematical Sciences, University of Leicester, Leicester, UK reduces to convex (in fact, quadratic) programming, which is still reasonably efficient, but may take some time to solve for large-scale portfolios.
In 1991, Konno and Yamazaki [8] studied portfolio optimization with mean absolute deviation (MAD) instead of standard deviation, and showed that it reduces to linear programming, and can therefore be solved very efficiently. However, mean absolute deviation is also symmetric, so has limited advantages in comparison with the standard deviation. In 2000, Rockafellar and Uryasev [14,15] suggested to use conditional value-at-risk (CVaR) as a risk measure, and demonstrated that it is at the same (i) non-symmetric, and focused on penalising losses, and (ii) the portfolio optimization problem with it reduces to linear programming.
In 2002, Rockafellar, Uryasev and Zabarankin [12,16] introduced general deviation measures -a broad class of functionals that contains standard deviation, standard semi-deviation, MAD and CVaR-deviation as special cases, and study portfolio optimization problem in this general setting [13]. This provides investors with flexibility when choosing which deviation measure is the best for modelling their individual risk preferences. Moreover, the resulting risk preferences are consistent with the theory of rational choice [3], and can be easily restored based on the actions an investor performed in the past [6]. However, portfolio optimization problem with general deviation measure reduces to convex programming, which can be more difficult to solve than linear programming. For some individual deviation measures, like MAD or CVaRdeviation, or related risk measures [15], norms [10], or performance measures [2], the problem can be reduced to linear programming using specific properties of these functionals. However, the general question "for what deviation measures portfolio optimization problem can be reduced to linear programming" has not been investigated.
In 2013, Grechuk and Zabarankin [4,7] suggested an idea of cooperative investment, that allows investors with different risk preferences share the risk inherited in a portfolio with mutual benefit. It is shown in [4] that the optimal portfolio of the group can be found from mean-deviation optimization problem with certain deviation measure D * that can be explicitly constructed from deviation measures D 1 , . . . , D m representing individual risk preferences of m investors. However, even if D 1 , . . . , D m are "commonly used" deviation measures like MAD or CVaR-deviation, so that individual portfolio optimization problems can be reduced to linear programming by well-known methods specific for these deviation measures, it is not clear how to write a linear program to minimize the deviation measure D * . This paper develops general method for reducing to linear programming portfolio optimization problem with general deviation measures that have polyhedral dual sets. This is a broad class of deviation measures, that contains MAD and CVaR-deviation as special cases. Importantly, if deviation measures D 1 , . . . , D m representing risk preferences of m investors belong to this class, then so is the corresponding deviation measure D * , which allows one to reduce the cooperative investment problem to linear programming.
A key technical difficulty is that, for many polytopes, the number of vertices V is exponentially larger than the number of faces F. If the dual set of some deviation measure D is such polytope, it is trivial to reduce portfolio optimization problem with D to linear programming with the number of constraints proportional to V . This, however, is highly impractical. The main feature of our method is that our linear program has the number of variables and constrains that depends polynomially on F. Using the minimax theorem (see equation (15) below), it is relatively easy to write down a small linear program to compute the optimal value of the optimization problem, but, with this method, it is unclear how to compute the optimal solution, that is, the weights of the optimal portfolio. Our main result (Theorem 1) shows how to write down a small linear program that allows to compute both optimal value and the optimal portfolio for optimization problem with arbitrary deviation measure with polyhedral dual set.
Our main result is formulated as a minimization of an arbitrary positively homogeneous convex functional, whose dual set is given by linear inequalities, and its applicability goes far beyond portfolio analysis with deviation measures. For example, Chekhlov, Uryasev and Zabarankin [1] studied portfolio optimization minimizing drawdown, and proved that this problem reduces to linear programming. We show that this result can alternatively be derived as another direct corollary from our main theorem.
This work is organised in five sections. Section 2 defines deviation measures and introduces portfolio optimization problem. Section 3 reduces this problem to linear programming, which is the main result of this work. Section 4 presents some examples and applications of the main result to the individual and cooperative portfolio optimization. Section 5 concludes the work.

Optimization problem with deviation measures
Let ( , F, P) be a probability space, where is an arbitrary non-empty set, F is the σ -algebra of subsets of , and P is a probability measure on ( , F). Sets belonging to F will be called events. A random variable (r.v.) is a function X : → R such that for every x ∈ R set {ω ∈ | X (ω) ≤ x} is an event. Let L 2 ( ) be the vector and q X (α) = inf{x|F X (x) > α} define the cumulative distribution function (CDF) and quantile function of an r.v. X ∈ L 2 ( ), respectively.
We will study a one period model of financial market with one risk-free asset with constant rate of return r 0 , and n risky assets with random rates of returnsr i ∈ L 2 ( ), i = 1, . . . , n. Denote r i =r i − r 0 , i = 1, . . . , n the excess rate of return over the risk-free rate. A financial portfolio is formed by investing the proportion y 0 of the unit capital in the risk-free asset and proportion y i in each risky asset i = 1, . . . , n. Then the budget constraint is n i=0 y i = 1, and the excess rate of return of the portfolio is Note that X does not depend on y 0 , and portfolio optimization problem can be formulated over y = (y 1 , . . . , y n ) ∈ R n , where is the transpose operation. y 0 can then be found from the budget constraint as y 0 = 1 − n i=1 y i . If we assume the possibility of short sales (y i < 0) and borrowing at the risk-free rate (y 0 < 0), then y ∈ R n is unconstrained. We assume that investor would like to form a portfolio with E[X ] at least which minimizes the deviation from this mean.
for all X and all λ > 0 (positive homogeneity), In this paper, we only consider finite deviation measures, that is, such that D(X ) < ∞ for all X ∈ L 2 ( ). Examples of deviation measures include the standard deviation and conditional value-at-risk (CVaR) deviation at level α ∈ (0, 1), defined as Deviation measures can be characterized in terms of risk envelopes E ⊂ L 2 ( ), which are sets of random variables (r.v.'s), satisfying (R1) E is a convex and closed bounded set containing 1, As shown in [12] and [16], there is a one-to-one correspondence between deviation measures and risk envelopes given by the formulas and The mean deviation portfolio optimization problem is for some > 0.
With new notation and where μ = (μ 1 , . . . , μ n ) . The properties of deviation measures imply that ρ : R n → R is a non-negative positively homogeneous lower-semicontinuous convex function. Then set is a convex 2 closed bounded set containing 0, and For every y ∈ R n denote Q ρ (y) = {q ∈ Q : q y = ρ(y)} the set of vectors for which the maximum in (7) is attained. Note that for every S ∈ E (2) implies that In practice, instrument's rates of returns are often estimated from historical data. The resulting distributions may then be discrete, and it is convenient to model them as r.v.s on a finite probability space. Let us assume that is finite with T = | | and P(ω) > 0 for any ω ∈ . Then all random variables can be identified with vectors in Let R be n × T matrix with entries r it = r i (ω t ), i = 1, . . . , n, t = 1, . . . , T . Then the excess rate of return X of a portfolio with weights y ∈ R n is X = R y. Then we have Hence, Following [5], we call deviation measure D finitely generated if the corresponding risk envelope E is a convex hull of a finite number of points. For example, standard deviation is not finitely generated, while the mean absolute deviation and CVaR deviation are.
Indeed, the risk envelopes of MAD and CVaR-deviation are given by respectively, see [12,Example 6] and [12,Example 3]. Both E M and E C are convex polytopes in R T with a finite number of vertices. Set E M can be conveniently represented as Here, c is a new auxiliary variable. Geometrically, the constraints in (9) represent a polytope E M in space R T +1 with coordinates (s 1 , . . . , s T , c), and E M is the projection of E M to R T . Such representations are of crucial importance, because polytopes with exponentially many vertices and faces can often be represented as projections of polytopes given by polynomially many constraints [17]. Let D be a finitely generated deviation measure, whose risk envelope E is defined by a finite number of linear constraints, possibly involving some auxiliary variables. Then set Q in (8) is a bounded convex polytope, which can be given explicitly in the following form. Let u ∈ R m be a vector of auxiliary variables, and let q u ∈ R n+m be the vector whose first n coordinates is q and last m coordinates is u. Then let where A is some k × (n + m) matrix and b ∈ R k is a vector.
In the Examples below, we provide the details how exactly set Q for MAD(X ) and CVaR α (X ) can be written in the form (10). We will use the following notations. Let 0 i, j be an i × j matrix whose entries are all zeros, E i, j be an i × j matrix whose entries are all ones and I i,i be an i × i identity matrix. (8) can be represented in the form (10) with m = T + 1, k = 2(1 + T + n), and the matrix A and vector b are given by Let us define u = S c be the vector of auxiliary variables in (10). Then, with A and b defined in (11), imply that q − RS T ≤ 0 and −q + RS T ≤ 0, respectively. This is exactly the description of the set Q in (12). (8) can be represented in the form (10) with m = T , k = 2(T + 1 + n), and the matrix A and vector b are given by (8) becomes Let us define u = S be the vector of auxiliary variables in (10). Then, with A and b defined in (13),

Reduction to linear programming
In this section, we study optimization problem (5) with ρ given by (7), where Q is defined in (10). The goal is to show that this problem can be reduced to linear programming.
First, we note that, for any fixed y ∈ R n , ρ(y) can be calculated using linear program Next, let v * be the optimal value of (5), and let K μ = y ∈ R n | μ y ≥ 1 . Then where the last equality follows from Sion's minimax theorem [18]. We next compute f (q) := inf y∈K μ q y. If q = vμ for some constant v ≥ 0, then where the third equality follows from the definition of K μ . If, conversely, q = vμ for any v ≥ 0, then one can find a hyperplane going throuth the origin separating vectors q and μ. This implies the existence of a vector y * such that μ y * > 0 > q y * . Then, for any constant C ≥ (μ y * ) −1 , one has μ (Cy * ) ≥ 1, hence (Cy * ) ∈ K μ . Then where the last equality follows from q y * < 0 and the fact that C can be arbitrary large.
If Q is given by (10), this is a linear program. Hence, one can easily find the optimal value v * . However, this method does not return optimal y * in (5), which corresponds to the optimal portfolio weights. We next prove that y * can also be computed from a linear program.
Theorem 1 Let ρ be given by (7) with Q defined in (10). Then optimal solution y * to (5) can be found from the following linear program which can alternatively be written in a component form where a i j , i = 1, . . . , k, j = 1, . . . , n + m and b i , i = 1, . . . , k are the entries of A and the components of b, respectively, and π = (π 1 , · · · , π k ) .
On the other hand, constraint A v μ u ≤ b implies that q = v μ ∈ Q. By (6), for every y ∈ R n , ρ(y) ≥ q y = v μ y. If μ y ≥ 1, this implies that ρ(y) ≥ v . Hence, v * ≥ v , so in fact v * = v . This implies that v * , y * , u * , π * is in fact an optimal solution to (16).
It is left to prove that y is an optimal solution to (5). Let q ∈ Q be arbitrary.
Then there exists u ∈ R m such that q u (a i ) ≤ b i , i = 1, . . . , k. Multiplying i-th inequality by π i and adding up, we get q u Because q ∈ Q was arbitrary, this implies that ρ(y ) ≤ v * . Because y satisfies the constraint in (5), and v * is an optimal value in (5), we have ρ(y ) = v * , and y is an optimal solution to (5).

Individual portfolio optimization
In this section we assume that probability space is finite uniform with T equally-likely scenarios. Recall that R denotes the n ×T matrix whose entries r it represent the excess rate of return of asset i under scenario t. (5) with μ i = E[r i ] , i = 1, . . . , n and

Example 3 Portfolio optimization problem (3) with D(X ) = MAD(X ) reduces to
This representation is a special case of (10), and Theorem 1 is applicable.

Example 4 Portfolio optimization problem (3) with D(X
This representation is a special case of (10), and Theorem 1 is applicable.

Example 5 Assume that the deviation measure in (3) is a linear combination of M CVaR-Deviations (Mixed CVaR-Deviation Measure)
where 0 < α 1 < · · · < α M < 1, M i=1 λ i = 1 and λ i ≥ 0, ∀i. The corresponding functional ρ defined in (4) can be represented in the form of (7) with This representation is a special case of (10), and Theorem 1 is applicable.
Our next example is portfolio optimization with drawdown. Let vector z = (z 1 , ..., z T ) represent the time series (historical or forecasted) of prices of a financial instrument or portfolio. Then the drawdown of z at time t is the difference between the maximal price before t and the price at time t. One may consider portfolio minimizing the maximal drawdown or the average drawdown or, more generally, the conditional Drawdown-at-risk (CDaR) measure CDaR α (z) for any α ∈ (0, 1), which, intuitively, is the average of α fraction of the worst drawdowns. For a portfolio with weights y, CDaR α (y) can be equivalently defined [1] as with where s + t = max{0, s t } and R is a n × T matrix in which the entry r it for i = 1, . . . , n and t = 1, . . . , T denotes the adjusted rate of return of ith asset over the time period [0, t].

Example 6 Let the risk measure in (5) be a linear combination of M CDaRs
where 0 < α 1 < · · · < α M < 1, M i=1 λ i = 1 and λ i ≥ 0, ∀i. This risk measure can be represented in the form of (7) with This representation is a special case of (10), and Theorem 1 is applicable.

Risk sharing and cooperative investment
Assume that m investors jointly hold a financial instrument or portfolio, whose profit after unit of time is modelled as a random variable X (negative values of X corresponds to losses). Investors are allowed to distribute X among themselves, so that investor i gets part Y i with m i=1 Y i = X . Each investor evaluates his/her part using meandeviation utility function where D i is a deviation measure used by investor i. We call vector Y = (Y 1 , ..., Y m ) an allocation. We say that allocation Z = (Z 1 , ..., . . , m with at least one inequality being strict. An allocation Y is called feasible if m i=1 Y i = X , and Pareto optimal if there is no feasible allocation that dominates it. Equivalently, a feasible allocation is Pareto optimal if and only if it is a maximizer in the optimization problem So far, we have discussed sharing of a fixed instrument with profit X . Now assume that there are two instruments available, with profits X 1 and X 2 , respectively, and investors are allowed to choose which one to share. If, for example, E[X 1 ] = E[X 2 ] but D * (X 1 ) > D * (X 2 ), then, for any allocation Y with Y i = X 1 one may find an allocation Z with Z i = X 2 that dominates Y , and therefore it does not make sense to choose X 1 . From this discussion, it is clear that in general the group of investor should look for a portfolio with as small D * as possible, or, in other words, should solve optimization problem (3) with D * in place of D. If D 1 , . . . , D m are deviation measures with risk envelopes E 1 , . . . , E m , respectively, then D * defined in (25) is also a deviation measure with risk envelope E = E 1 ∩ · · · ∩ E m , see [5]. Equivalently, if ρ i (y) = D i n i=1 y i r i , defined as in (4), has dual sets Q i , then the group of investors should solve problem (5) where ρ is defined in (7) with If all Q i can be represented in the form (10), then their intersection Q is also in the form (10), and Theorem 1 can be used to reduce (5) to a linear program. Now, if y * is the optimal solution to (5), then X * = n i=1 y * i r i is the optimal solution to (3) with D = D * . Next we may solve optimization problem (25) to find a Pareto optimal allocation Y = (Y 1 , . . . , Y m ). Note that if Y = (Y 1 , . . . , Y m ) is Pareto optimal, then for any constants C 1 , . . . , C m with C i = 0, allocation (Y 1 + C 1 , . . . , Y m + C m ) is also Pareto optimal. This allows us to choose a Pareto optimal allocation that is "fair" in various senses, for example, one with E[Y 1 + C 1 ] = · · · = E[Y m + C m ]. Fig. 1 The optimal solution of cooperative investment problems Example 7 (Cooperative investment of S&P100 index with MAD and CVaR-Deviation) Assume that there are two investors in a financial market, the first one with MAD risk measure and the second one with single CVaR-Deviation risk measure at risk level α, and both investors wants to form an optimal joint portfolio to be shared between them. We select the same n = 96 instruments from the S&P100 index and identify weekly rates of return for T = 150 weeks from 04/Jul/2016 to 20/May/2019. We calculate weekly rates of return r it , i = 1, . . . , n, t = 1, . . . , T according to We select = 0.8 in (3) and α = 0.3. If investors would invest individually, then they solve (3) with D(X ) = MAD(X ) and D(X ) = CVaR α (X ), respectively, and the optimal values of the objective functions are 0.364 and 0.457, respectively.
In contrast, let the investors solve the cooperative investment problem (3) with D = D * to identify the optimal cooperative investment weights y * . Figure 1 represents the weights y * of optimal cooperative portfolio, and also the weights of individual optimal portfolios with MAD and CVaR-Deviation, respectively. Further, if Y * 1 and Y * 2 are the shares of X * = n i=1 y * i r i the investors receive in the cooperative investment problem, then MAD(Y * 1 ) = 0.327 < 0.364, and CVaR α (Y * 2 ) = 0.420 < 0.457.
In Example 7, both investors received shares with the same expected return but lower risk than their optimal individual investments. This is possible because Y * 1 and Y * 2 are not representable as n i=1 y i r i and are therefore not available on the market individually. Only their sum X * is available on the market.

Conclusions
Linear programming is one of the most efficient methods to solve applied problems, including portfolio optimization problems in finance. Different authors considered specific portfolio optimization problems, e.g. with mean absolute deviation, conditional value-at-risk, or drawdown, and derived linear programming formulations of these problems in each specific case. In this paper, we establish a general framework which allows to reduce all these and many other optimizations problems to linear programming in a unified way. In addition to reproving many existing results in a unified fashion, we present a new application to cooperative portfolio problem, for which the linear programming formulation was not known before this work. and the components of b, respectively. The first constraint A ⎡ ⎣ vμ S c ⎤ ⎦ ≤ b reduces to n j=1 μ j a i j v + n+T j=n+1 s j−n a i j + ca i,n+T +1 ≤ b i , i = 1, . . . , 2(1 + T + n). And the second constraint μ y ≥ 1 implies n i=1 μ i y i ≥ 1. Then, for all π i ≥ 0, i = 1, . . . , 2(1 + T + n), the next constraint A π = y 0 T +1,1 in component form is π i a i j = y j , j = 1, . . . , n and π i a i j = 0, j = n + 1, . . . , n +
where block I E is a M × MT matrix and block M R is a n × MT matrix such that Based on the Theorem 1, the portfolio optimization problem (3) with mixed CVaRdeviation measure reduces to (5)  π i a i j = y j , j = 1, . . . , n and 2(MT +M+n) i=1 π i a i j = 0, j = n + 1, . . . , n + MT , respectively. Finally, π b ≤ v implies 2(MT +M+n) i=1 Derivation of Example 6: Let the risk measure in (5) be a linear combination of M CDaRs (22). Then, it can be represented in the form of (7) with Q defined in (23).
The set Q can be represented in the form (10)  with L i,i being an i × i lower triangular matrix whose entries above the main diagonal are all zeros and entries in and below the main diagonal are all ones.