Whenever current portfolio weights differ from their target weights, either due to market movements, signal changes or other reasons, a portfolio manager in a frictionless world would immediately trade to the target portfolio. In reality, however, every adjustment incurs trading costs. Therefore a portfolio manager faces an optimization problem, where he needs to balance portfolio suboptimality and trading costs.
In this article, I derive an analytical framework for this trade-off. Starting from a simple asset-by-asset baseline, I show why variable costs prevent us from ever trading all the way to target weights and how fixed costs split the rebalancing rule into two distinct bands. Extending the model to a full return covariance matrix then reveals two effects that an isolated asset-by-asset view overlooks. Weight deviations across correlated assets can offset each other at the portfolio level, and it can be preferable to leave expensive assets untouched while trading cheaper proxies, even when doing so pushes those proxies further away from their own target weights.
Cost Function
Say we have assets. Let denote their current portfolio weights, the target weights, and the new weights we choose to rebalance to. At each rebalancing date, we select to minimize the total cost
is a fixed transaction cost (such as ticket fees or operational overhead) incurred as a lump sum whenever any trade occurs, regardless of trade size. The indicator function takes the value as soon as at least one portfolio weight is changed, and if the portfolio remains untouched at . The vector contains the asset-specific variable transaction costs (such as broker commissions), where the absolute value operator in acts element-wise on the trade vector because both purchases and sales incur positive costs. The scalar is the suboptimality-aversion parameter, translating units of quadratic deviation into units of transaction cost, and is a symmetric positive definite penalty matrix () that weights the quadratic deviation from the target portfolio.
If , the quadratic term in (1) penalizes raw weight deviations equally across assets, reducing the problem to independent scalar optimization problems. If , where is the positive definite return covariance matrix, the quadratic term equals the tracking-error variance , coupling the assets through their correlations. The latter is economically more natural because portfolio return deviations are what ultimately matter, not weight deviations.
To simplify the subsequent algebra, we shift the coordinate system so that the target portfolio lies at the origin. To do so, we define the post-trade deviation from the target as and the current deviation as . The trade vector can then be expressed as the difference between these two deviations.
In (2) we start from the definition of the trade vector, and in (3) we subtract and add the target weight vector . In (4) we substitute the definitions and . Equation (4) simply states that the trade executed in each asset is the difference between the desired post-trade deviation and the pre-trade deviation . Since subtracting from both sides also makes the condition equivalent to , substituting (4) into (1) gives the total cost function in terms of .
If we refrain from trading altogether by choosing (which corresponds to and ), the first two terms in (5) vanish.
In (6) we evaluate (5) at the current deviation . In (7) we use the fact that the statement is false and the trade vector equals the zero vector, leaving only the quadratic penalty of the current deviation in (8). is the status-quo suboptimality.
Two-Stage Problem Separation
At first glance, the jump discontinuity at in (5) complicates the analytical minimization, as the function is not continuous everywhere and therefore not globally differentiable. For every point , however, the indicator term is simply an additive constant . Therefore, the fixed costs affect only the extensive margin (whether to trade at all), not the intensive margin (how much to trade once a trade is initiated). Mathematically, shifting the cost surface vertically upward by a constant leaves its gradient and thus the location of its minimum unchanged. We can therefore isolate the continuous part of the cost function from (5) as and determine its unique global minimum .
Moving from the status quo deviation to this optimal deviation strictly lowers total cost (5) below the status-quo holding cost (8) if and only if the following condition holds.
In (9) we state the economic rationality condition that the total post-trade cost (including the fixed fee) must be strictly smaller than the cost of doing nothing. In (10) we substitute (5) for on the left-hand side and the holding cost (8) on the right-hand side. In (11) we subtract the continuous post-trade cost from both sides and read the inequality from right to left. In (12) we define the gross cost savings of the optimal rebalancing trade as , which represents the cost reduction after paying variable transaction costs , but before paying the fixed fee . Thus, the rebalancing problem decouples into first computing the optimal target under variable costs alone, and second checking whether the resulting gross savings clear the fixed-cost hurdle in (12).
Diagonal Case
Stage 1
Let us first solve this two-stage problem for a diagonal positive definite penalty matrix with diagonal entries . This specification covers both the identity matrix () and standalone variance-weighted penalties () where cross-asset correlations are ignored. Substituting the diagonal structure of and the element-wise definition of the absolute value vector into the continuous cost function gives the following expression.
In (13) we write with the explicit diagonal matrix. In (14) we expand the inner product and the quadratic form into sums over the individual assets , since all off-diagonal entries of are zero. In (15) we merge both sums into a single summation. Because each summand depends exclusively on the scalar variable of asset without any cross-terms , minimizing the portfolio cost (15) is equivalent to minimizing for each asset independently.
No-Trade Threshold
To minimize with respect to , we derive the first-order optimality condition. However, the variable transaction cost term has a sharp V-shaped kink at the status-quo point and is not differentiable there in the classical sense. If we buy asset (), costs increase at rate ; if we sell asset (), costs also increase as moves down, which means the slope with respect to is . Right at the point of inaction (), the slope jumps instantaneously from to . We handle such kinks using the subdifferential . Geometrically, the subdifferential consists of the slopes of all supporting lines that touch the graph at the given point and lie entirely below it. Away from the kink (), the graph is smooth, so there is only one tangent slope, namely the sign . At the bottom of the V-kink (), however, any line with a slope between and stays below the V, so the subdifferential is the entire closed interval . A convex function attains its global minimum at if and only if a flat horizontal tangent (slope ) is contained in the sum of the subdifferential of the cost term and the derivative of the smooth suboptimality term, which we then evaluate at the status-quo point to determine when inaction is optimal.
In (16) we state the first-order optimality condition by adding the subdifferential of the variable cost term and the classical derivative of the quadratic suboptimality term. In (17) we move the marginal suboptimality term to the left-hand side. To check under what condition it is optimal not to trade asset at all (), in (18) we substitute and into (17). In (19) we rewrite the interval inclusion as an absolute value inequality, and in (20) we divide by to define the asset-specific no-trade threshold . Both intermediate equation (19) and final threshold (20) have a neat economic interpretation, since is the marginal suboptimality reduction of trading the very first dollar of asset back toward target, while is the proportional transaction cost per dollar traded. As long as marginal benefit does not exceed marginal cost , the best action is inaction. Consequently, the width of the no-trade band in (20) is directly proportional to the asset’s variable cost and inversely proportional to both the suboptimality-aversion parameter and the asset’s standalone penalty weight .
Optimal Active Trade
If the current deviation breaches this threshold, so that , falls outside , and holding violates (17). Because the quadratic suboptimality penalty pulls the portfolio toward the origin , the optimal trade moves from toward . If the asset is overweight (), we sell (), and if it is underweight (), we buy (). In either case, the trade direction has the opposite sign of the current deviation , so . Because , we are on the smooth flank of the V-function where the subdifferential contains only the single slope , and (16) reduces to an ordinary first-order condition.
In (21) we replace the subdifferential in (16) for an active trade with the sign function. In (22) we substitute the trade direction . In (23) we move the marginal transaction cost to the right-hand side, which shows that at the optimal stopping point , the remaining marginal suboptimality benefit must equal the proportional trading cost . In (24) we divide by and insert from (20). Because , stays on the same side of zero as without overshooting the origin, confirming . Combining the inactive regime for from (20) and the active regime for from (24), we obtain closed-form expressions for the post-trade deviation and the optimal trade size .
In (25) we unify (20) and (24) via the minimum of the current deviation magnitude and the threshold . In (26) we subtract to form the trade . In (27) we factor out , and in (28) we rewrite as , which is the negative of the soft-thresholding operator familiar from Lasso regression.
Equations (24) and (28) reveal a first important principle of trading under proportional costs, namely that even when the current deviation is large enough to trigger a trade, you never trade all the way back to the target weight (). Instead, you only shave off the excess deviation outside the band and stop right on the boundary . Mathematically, this is because quadratic suboptimality has diminishing marginal costs near zero ( as ), whereas variable transaction costs are linear and constant. Once you reach the edge , every additional basis point of trading costs but saves less than in suboptimality.
Stage 2
Having solved Stage 1, we now evaluate Stage 2 (the fixed-cost trigger (12)) by computing the gross cost savings of each asset. For untraded assets (), we have and zero savings. For actively traded assets (), equations (24) and (28) imply that the post-trade residual suboptimality is and the traded notional is . Substituting these into the cost difference gives the gross savings for asset .
In (29) we subtract the continuous post-trade cost (variable transaction cost plus residual suboptimality penalty) from the initial holding cost . In (30) we substitute the active destination ; notice economically that the raw risk reduction is diminished by the variable spread payment . In (31) we eliminate using the marginal-cost identity from (20). In (32) we factor out and use , allowing us to compress the bracketed expression in (33) via the second binomial formula into the square of the optimal trade size from (28). Equation (33) shows that after paying the variable spread , the net savings do not depend on the total deviation , but only on the squared excess deviation that protrudes beyond the no-trade threshold. Summing (33) across all assets and inserting the sum into (12) yields the closed-form global decision rule for diagonal .
Here, denotes element-wise multiplication and is the threshold vector. Geometrically, (34) creates two nested regions around the target portfolio. An inner hyper-rectangle where variable costs alone prohibit trading () is surrounded by a wider outer inaction region shaped like a rounded box. In the buffer shell between and , trading would be optimal under variable costs alone, but the benefit of doing so is too small to cover the fixed fee . Once crosses the outer trigger boundary , we trade across the buffer shell onto the inner boundary , which prevents high-frequency chattering of tiny trades on consecutive days.
Equation (34) reveals a second important principle, which is that combining variable and fixed transaction costs creates a two-band structure that separates the outer trigger boundary from the inner destination boundary. Under variable costs alone (), both boundaries coincide at , so any deviation beyond immediately triggers a trade to . Under fixed costs alone (), the inner band vanishes () and breaching the trigger boundary sends the portfolio all the way to the target . Only if both frictions act together () does the threshold split into two distinct bands.
Coupled Case
Stage 1
Let us now solve the same two-stage problem for the economically natural specification , where is the symmetric positive definite return covariance matrix. Proceeding in strict analogy to (13)–(15) of the diagonal case, we substitute into the continuous cost function and expand both the inner product and the quadratic form into explicit sums over the individual assets.
In (35) we write the continuous cost function for . In (36) we expand the inner product into a single sum and the quadratic tracking-error penalty into a double sum over row index and column index . In (37) we split this double sum into the diagonal variance terms where and the off-diagonal covariance terms where and . Comparing (37) with its diagonal counterpart (15) shows why the coupled case is not as simple. In (15), all off-diagonal entries were zero, allowing us to minimize each asset’s cost in isolation. In (37), however, the cross-terms couple all assets together, because changing the post-trade deviation of asset alters the tracking-error penalty of asset .
No-Trade Threshold
To derive the first-order optimality condition for asset just as we did in (16), we need the partial derivative of the smooth tracking-error penalty with respect to . In the double sum from (36), the specific variable appears on the diagonal where and , in the -th row where and , and in the -th column where and , whereas all remaining terms with and do not contain .
In (38) we partition the double sum from (36) into the diagonal term, the -th row sum, the -th column sum, and the residual double sum free of . In (39) we use the symmetry of the covariance matrix () and scalar commutativity () to merge the row and column sums into . In (40) we take the partial derivative with respect to , where the residual double sum vanishes. In (41) we absorb the diagonal term back into the single sum over all . Finally, in (42) we recognize as the inner product of the -th row of with the column vector , which is the -th scalar entry of the matrix-vector product .
With the partial derivative (42) in hand, we now mirror (16)–(20) step by step. The strictly convex function attains its unique global minimum at if and only if lies in the partial subdifferential of with respect to every coordinate simultaneously (Karush-Kuhn-Tucker (KKT) condition). We state this condition for each asset , stack all conditions into vector form, and evaluate at the status-quo point to determine when complete inaction is optimal.
In (43) we state the first-order optimality condition for coordinate by adding the variable cost subdifferential and the partial derivative from (42). In (44) we stack the scalar conditions into an vector, where and acts element-wise. In (45) we write this inclusion as an equation by introducing the subgradient vector , where if asset is traded () and if asset is not traded (). In (46) we move the marginal tracking-error vector to the left-hand side. To check when refraining from trading across all assets () is optimal, in (47) we substitute and into the -th row of (46). In (48) we rewrite the interval inclusion as an absolute value inequality, and in (49) we divide by and expand using (40)–(42).
Comparing (48)–(49) with the diagonal threshold (19)–(20) reveals a third important principle, namely that when assets are coupled through their covariance matrix, weight deviations across correlated assets can offset each other at the portfolio level. Say in (49) that all off-diagonal covariances () are zero and . Then (49) reduces to , which is identical to the diagonal threshold (20). When correlations are non-zero, however, asset ’s standalone variance term is augmented inside the absolute value operator by the cross-covariance sum . Economically, is the covariance between asset ’s return and the tracking error return of the entire deviated portfolio. If asset and asset are negatively correlated () and both deviate in the same direction (), or if they are positively correlated () and deviate in opposite directions (), then has the opposite sign of and cancels out part of asset ’s standalone deviation inside (49). Because the two weight deviations naturally hedge each other’s contribution to portfolio tracking error, the marginal benefit of trading either asset may stay below its variable cost even when individual weight deviations are quite large. Geometrically, the inner no-trade zone maps an axis-aligned box through into a sheared -dimensional parallelotope that is elongated along self-hedging directions.
Optimal Active Trade
Now let’s move on to the case when breaches the parallelotope (), so that for at least one asset. We attempt to follow the same steps as in (21)–(24) of the diagonal case by taking an actively traded asset (, where the subgradient is the trade sign ) and solving its first-order condition (43) for using the expansion from (40)–(42).
In (50) we replace the subdifferential in (43) for an active trade with . In (51) we write and expand via (40). In (52) we isolate the diagonal term on the left-hand side, and in (53) we divide by .
Comparing (53) with its diagonal counterpart (24) () reveals the reasons why a naive asset-by-asset solution is suboptimal. In (24), the right-hand side contained only known constants, immediately fixing . In (53), however, asset ’s optimal post-trade deviation depends on the unknown post-trade deviations of all other assets . Regarding (45) (), we can’t solve for all at once, because in general only a subset of assets is actively traded while the remaining assets are held untouched. For an actively traded asset (), its subgradient is fixed on the smooth flank of the V-kink at , while its post-trade deviation is the unknown variable. For an untraded asset (), it is the other way around, as its post-trade deviation is known to equal its pre-trade deviation (at the bottom of the V-kink), while its subgradient is an unknown value inside the interval .
To solve such a system, we must separate the two groups of rows using block matrices. Suppose that at the optimum, assets are actively traded and assets are not traded. Let with cardinality denote the active set, and let with cardinality denote the inactive set. By reordering the asset indices so that the active assets come first and the inactive assets come last, we partition every vector and the covariance matrix into blocks with explicit dimensions. Here, is the column vector of unknown post-trade deviations of the active assets, and is the column vector of known pre-trade deviations of the untraded assets. Furthermore, and are the vectors of active variable costs and active trade signs (so ), while and are the vectors of inactive variable costs and unknown inactive subgradients. Finally, is the covariance submatrix of the active assets with themselves, is the cross-covariance submatrix between the active assets (rows) and the inactive assets (columns), is the cross-covariance submatrix between the inactive assets (rows) and the active assets (columns), and is the covariance submatrix of the inactive assets with themselves.
Substituting these partitioned vectors and submatrices into the KKT equation (45) and carrying out the block matrix-vector multiplication row by column gives the partitioned system.
In (54) we write the KKT condition (45) in partitioned block form, where and denote the respective zero column vectors. In (55) we multiply the partitioned covariance matrix by the partitioned deviation vector. In the top block, multiplying by yields an vector, and multiplying by also yields an vector; analogously, both products in the bottom block have dimension . In (56) we add the two stacked column vectors block by block.
The unknown inactive subgradient vector appears only in the bottom block row, while the top block row contains only the unknown vector alongside the known vector and the sign vector . Setting the top block of (56) equal to therefore gives a self-contained system of linear equations in unknowns.
In (57) we equate the top block of (56) to . In (58) we subtract and from both sides to isolate the unknown active term on the left-hand side. Because is symmetric positive definite, its principal submatrix is also symmetric positive definite and therefore invertible; in (59) we left-multiply both sides by the matrix . In (60) we cancel the scalar and group on the left-hand side. In (61) we replace with the identity matrix , and in (62) we obtain the closed-form block solution for . Subtracting gives the optimal active trade vector .
Once is computed from the top block via (62), we substitute it into the bottom block of (56) to check that the untraded assets indeed remain inside their no-trade thresholds.
In (63) we equate the bottom block of (56) to . In (64) we move the post-trade marginal tracking-error vector of the inactive assets to the left-hand side. In (65) we impose the subdifferential requirement , which we write as an element-wise absolute value inequality for each untraded asset in (66). Because strict convexity of guarantees a unique global minimum, a candidate regime is the global solution if and only if from (62) satisfies the active sign consistency and the inactive boundary check (66).
Proxy Hedging via Regression Betas
Interestingly, the first term in (62) has the form of a multivariate ordinary least squares (OLS) regression and points to another important principle. Let’s first derive this relationship explicitly. Let denote the random return vector of the active assets and denote the random return vector of the inactive assets. Suppose we linearly regress the inactive returns on the active returns via the multivariate linear regression model , where is the vector of intercepts, is the matrix of regression slope coefficients (whose -th column contains the regression betas of inactive asset on the active assets, so ), and is the zero-mean residual vector that is uncorrelated with the regressors , meaning .
In (67) we state the multivariate linear regression equation of on . In (68) we take the cross-covariance matrix on both sides. In (69) we use the bilinearity of the covariance operator, where . In (70) the covariance with the constant vector and the orthogonal residual vector both vanish to the zero matrix , and we substitute . In (71) we left-multiply both sides by , which collapses to the identity matrix in (72) and proves that is the OLS beta matrix . Substituting (72) into (62) allows us to write the optimal active post-trade deviation in terms of .
Multiplying the regression beta matrix by the untraded deviation vector yields an vector of weight adjustments across the active assets. Equation (73) therefore reveals a fourth important principle, showing that when rebalancing a coupled multi-asset portfolio, it can be optimal to leave expensive assets untouched at their deviated weights while deliberately trading cheaper proxy assets away from their own target weights to hedge the unadjusted deviation. If every asset in the portfolio is traded (), the first term in (73) vanishes and , which is the multivariate counterpart of stopping at the no-trade boundary . Whenever rebalancing is partial (), however, suppose an illiquid micro cap equity fund has deviated overweight (), while a cheap, highly liquid equity index future is positively correlated with asset () and currently sits right at its target weight (). A naive asset-by-asset rule would see and do nothing in the liquid future , while either paying the wide spread to sell the illiquid asset or leaving its induced tracking error unhedged. The coupled solution (73), by contrast, leaves the expensive asset untouched () and uses the liquid proxy to sell , deliberately pushing the liquid asset away from its own target weight () because the portfolio-wide tracking-error reduction from the cross-hedge outweighs both the small trading cost and the standalone weight deviation created in asset .
Because each of the assets can be bought, held, or sold, there are possible regimes, and the cross-hedging feedback in (53) means we do not know in advance which regime applies. For small portfolios (such as tactical asset allocation across asset classes) or when all assets trade (), we can evaluate (73) directly in closed form; for larger , a numerical procedure can be used to find the active set .
Stage 2
Having solved Stage 1 for , we need to evaluate Stage 2 (the fixed-cost trigger (12)) in analogy to (29)–(34) of the diagonal case by deriving a closed-form expression for the portfolio’s gross cost savings . In the diagonal case (31), we eliminated from the variable transaction cost term by substituting the first-order condition . In the coupled case, we perform the same elimination in vector form using the KKT condition (46) (). We know from the definition of in (45) that for every asset , the product equals the absolute value . If asset is not traded (), both and equal zero, and if asset is traded (), then , where multiplying any real number by its sign gives its absolute value.
In (74) we expand the inner product into a sum over all assets. In (75) we substitute the identity for each asset , and in (76) we write the sum as the inner product of the vector and the trade vector . In (77) we eliminate by substituting from the KKT condition (46), and in (78) we apply the matrix transpose rule using the symmetry of .
Substituting the variable transaction cost (78) into the gross cost savings from (11)–(12) mirrors the binomial completion of the square in (29)–(33).
In (79) we subtract the continuous post-trade cost from the status-quo holding cost . In (80) we replace the variable transaction cost with (78). In (81) we multiply out and dissolve the outer brackets. In (82) we combine and into and factor out the scalar . Finally, in (83) we compress the quadratic form via the multivariate binomial identity and substitute from (4).
Comparing (83) with its diagonal counterpart (33) () shows that once variable transaction costs are deducted, the net benefit of an optimal rebalance is not the raw difference in portfolio variance , but times the tracking-error variance of the executed trade vector itself.
Inserting (83) into the fixed-cost trigger condition (12) yields the global decision rule for the coupled case.
Geometrically, (84) generalizes the two-band structure of (34) from axis-aligned boxes to sheared parallelotopes. Because in (46) implies for all , the optimal destination always lies inside the inner parallelotope , and for any it lies on the boundary because at least one asset is actively traded with . Moreover, is the metric projection of onto under the Mahalanobis distance induced by , and the outer inaction region is a parallelotope with elliptically rounded corners, i.e. the set of all pre-trade deviations whose squared Mahalanobis distance to is at most .
Conclusion
Stepping back from the algebra, thinking about rebalancing problem in this way replaces ad-hoc calendar or heuristic band rules with four more reasonable principles. First, proportional transaction costs in combination with a convex suboptimality penalty term create an inner no-trade boundary . Because quadratic suboptimality has vanishing marginal cost near the origin while variable trading costs remain constant down to the last dollar traded, an optimal trade never rebalances all the way back to the target portfolio, but stops right at the edge of the inner band. Second, adding fixed transaction costs decouples the outer trigger boundary from the inner destination boundary , creating a buffer shell in which small deviations are tolerated until the net cost savings of trading clear the lump-sum hurdle . Third, measuring portfolio suboptimality by the return covariance matrix rather than by isolated weight deviations transforms the inner no-trade zone from a rigid box into a sheared parallelotope , allowing offsetting deviations across correlated assets to naturally hedge each other without triggering unnecessary trades. Fourth, when deviations do breach the outer boundary and only a subset of assets is traded, the coupled KKT solution automatically uses cheap assets as proxies to hedge the unadjusted deviation of expensive holdings, even when doing so deliberately pushes those cheaper proxies away from their own target weights.