% Portfolio rebalancing model For long only with unavailable funds and trading constraints. % Justin Solms % 17 July 2013 \newcommand{\ve}[1]{\underline{#1}} # Introduction A current portfolio is to be rebalanced to it's model weightings with a minimum of cash left over. The rebalanced portfolio is called the model portfolio and is the portfolio that would ideally be traded toward. Some units and cash in the current portfolio are unavailable for selling. A set of units of a specific ticker are also not allowed to be sold and similarly another set may not be sold and these are sell-locked and buy-locked ticker sets respectively. # The current portfolio The current portfolio capital is $k=k_a+k_u$ where $k_a$ is the available capital and $k_u$ is the unavailable capital. The available capital is (@available_capital) $$k_a=\ve{u}_a\cdot\ve{p}+c_a$$ where $\ve{u}_a$ is the available units vector, $c_a$ is the available cash and $\ve{p}$ is the current unit price. Similarly the unavailable capital is (@unavailable_capital) $$k_u=\ve{u}_u\cdot\ve{p}+c_u$$ Rewriting the capital we have (@capital) $$k = \ve{u}_a\cdot\ve{p}+c_a + \ve{u}_u\cdot\ve{p}+c_u$$ The current portfolio weights $\ve{\omega}_c$ written in terms of current pricing and total units $\ve{u}$ and total cash not invested $c$ are $$P\ve{u}=(k-c) \ve{\omega}_c$$ where $P=\text{diag}(\ve{p})$ is the diagonal matrix from of the price vector. It is more convenient to write the above as (@current_model) $$\ve{u}=P^{-1}(k-c)\ve{\omega}_c$$ # Trading The current portfolio weights $\ve{\omega}_c$ are assumed to be incorrect compared to the model weights $\ve{\omega}_m$ and that is why portfolio rebalancing is required. Rebalancing involves trading only the available part of the current portfolio. Trading is a zero sum game. The traded cash $c_t$ frangible for traded units $\ve{u}_t$ must be equal in value to the units $\ve{u}_t\cdot\ve{p}$ at current prices and so (@trade) $$\ve{u}_t\cdot\ve{p}+c_t=0$$ This zero value equation may be added to the available capital (@available_capital) (as we are not interested in trading the unavailable capital) (@traded_available_capital) $$k_a=\ve{u}_a\cdot\ve{p}+c_a+c_u+\ve{u}_t\cdot\ve{p}+c_t$$ The trade must also use up all available cash and so similarly to (@current_model) we have a new equation for the traded portfolio that adds traded units $\ve{u}_t$ to the current total units $\ve{u}$, whilst leaving the unavailable cash $c_u$ behind. Also a small fractional unit residual $\ve{u}_r$ is left behind to account for the fact that the traded units are an integer number of units. (@trade_model) $$\ve{u}_r+\ve{u}_t+\ve{u}=P^{-1}(k-c_u)\ve{\omega}_m$$ where $\ve{0}\leq\ve{u}_r<\ve{1}$ Let the final outcome of available of units $\ve{u}_f$ and cash $c_f$ after trades be (@final_units) $$\ve{u}_f=\ve{u}_a+\ve{u}_t$$ (@final_cash) $$c_f=c_a+c_t$$ Equations (@traded_available_capital) and (@trade_model) may be rewritten as $$k_a=(\ve{u}_a+\ve{u}_t)\cdot\ve{p}+(c_a+c_t)$$ $$\ve{u}_a+\ve{u}_t=P^{-1}(k-c_u)\ve{\omega}_m-\ve{u}_u$$ then using (@final_units) and (@final_cash) the above may be rewritten (@traded_available_capital_a) $$c_f=k_a-\ve{u}_f\cdot\ve{p}$$ (@trade_model_a) $$\ve{u}_f=P^{-1}(k-c_u)\ve{\omega}_m-\ve{u}_u-\ve{u}_r$$ The above equations have the constraints $c_f\geq 0$ - Positive final cash left over. $\ve{u}_f\geq\ve{0}$ - Positive numbers of units. $\ve{0}\leq\ve{u}_r<\ve{1}$ - Fractional residual units. And $C^{\overline{B}}\ve{u}_t\leq 0$ - The buying constraint. $C^{\overline{S}}\ve{u}_t\leq 0$ - The selling constaint. where $C^{\overline{B}}$ and $C^{\overline{S}}$ are diagonal matrices with ones for constrained tickers and zeros for unconstrained tickers.