Let’s say we have a vector of forecast returns e = (e_1,…e_n) for the n assets we’re trading, and we want to compute the optimal portfolio p* that maximizes the expected return, net of transaction costs, and adjusted for quadratic risk. Assuming our initial position is p^0, and costs are proportional, and denoting by Ω the covariance matrix of the assets, we are led to the standard minimization problem
where T is transposition, λ>0 is the risk-aversion coefficient, and α>0 is the proportional transaction cost (which could be made asset-dependent). The optimal portfolio is the value p = p* where the sup in (1) is achieved.
Let’s now adopt the following notations
and note that φ—>φ* defined by
is the Legendre-Fenchel transform, we see that (1) can naturally be interpreted as the transform
Since the two functions in (2) are convex, we have the useful identity
where *_inf is the inf-convolution (see below). It is easy to compute the Legendre transform of φ_1 and φ_2
Putting together (5) and (6), we get, for φ = φ_1 + φ_2:
We have therefore expressed (1) as another optimization problem involving the inverse of Ω instead of Ω. (Note that the computation above can also be interpreted via the dual problem of (1).) In practice, the formulation in (7) can be convenient if Ω is close to singular (large condition number), since we could choose a regularized pseudo-inverse to plug into (7), something that might not be as straightforward in (1).
Let’s see now how we can compute the optimal portfolio p* from (7). As is well-known, the gradient of a Legendre transform is the inverse function of the gradient of the original function (assuming convexity); therefore, taking account that p* is the point where the sup in (1) is achieved, we have
Practically speaking, all we need to do is therefore compute φ* in (7) using a standard quadratic optimizer with constraints; then the gradient of φ* at e is the optimal portfolio.
Let’s see finally how we can easily recover two trivial cases and thereby gain some intuition about (7). When α→0, clearly the inf in (7) is simply the value at η=0, and, computing the gradient, we get
which is the usual optimal portfolio in the quadratic case without transaction costs. On the other hand, if α→∞, we find that the gradient, and therefore p*, is equal to p^0, as expected, since, in the presence of large transaction costs, it is optimal to not trade and keep our initial portfolio p^0.
Quantitatively Yours,

