Rebalancing Shares to Maintain a Target Portfolio Weight
Summary
This answer derives how many shares to sell after a price change to restore an asset to its initial portfolio weight, assuming sale proceeds remain in cash and no outside capital is added. It writes the starting and ending portfolio values, equates the asset’s fraction of wealth before and after the price move, and solves for the new share count. The required sale therefore depends on the initial cash and share holdings as well as both prices; a fixed sell percentage per doubling does not apply across all starting allocations or target weights.
For an initially balanced stock-and-cash portfolio whose stock price doubles, the answer calculates that one quarter of the shares must be sold to preserve the 50% allocation. It also flags that the derivation assumes all shares can be sold at the stated price. For a price decline, restoring the weight may require buying shares, and a no-borrowing investor can run out of cash. The exchange does not cover taxes, transaction costs, or market impact.
Key ideas
- Maintaining a target weight requires comparing the asset’s value with total portfolio value before and after rebalancing.
- Sale proceeds added to cash must be included in the ending portfolio value.
- The required share sale depends on the starting holdings, cash, and price change.
- With equal initial stock and cash values, a price doubling requires selling one quarter of the shares to keep the stock weight at one half.
- The calculation assumes execution at the stated price and excludes trading costs and taxes.
Tags
Full text
# How to keep the ratio of two assets constant when one asset is appreciating towards the other
# How to keep the ratio of two assets constant when one asset is appreciating towards the other
I am looking for a formula that lets me keep the ratio between two assets in my portfolio constant when one of the assets is appreciating continually in comparison to the other asset.
Imagine a portfolio consisting of USD and say Amazon stock in the year 1998. Over the next few years the stock will double in terms of USD again and again. I discovered that if the owner would sell ~28.5714 % of the stock per doubling the composition of the portfolio would approach 50% USD and 50% AMZN over time.
How can this number (28.5714 %) be mathematically derived? Is there a formula that lets me compute the portion that would have to be sold per doubling in order to arrive at a different portfolio composition? Say I would like to be only 10% exposed to AMZN.
I wrote and used this tool: https://davalb.github.io/continuous-divestment/ to experimentally arrive at the 28.5714 figure.
(I am not entirely sure if this is the right community to ask this question. If not I apologize. Any hints where I could get an answer to this question are very welcome!)
## Answer by robertspierre (score 2, accepted)
https://quant.stackexchange.com/a/35449
So, if I understood the question correctly
In $t=1$ you have $n_1$ amazon shares that are sold for $p_1$ each. You also have $C_1$ in cash, for a total portfolio value of $$W_1 = n_1 p_1 + C_1 $$ In $t=2$ the price of the amazon shares rose to $p_2$. Now your portfolio value is $$W_2 = n_1 p_2 + C_1 $$ You want a new situation $$W_2^{'} = n_2 p_2 + C_2 $$ In which you have sold $n_1 - n_2$ Amazon shares, and put the proceedings of the selling in cash. You want to impose that the value of the Amazon shares over the total value of the portfolio is the same in $W_2^{'}$ and $W_1$ So you have 2 conditions: (1) $$\dfrac{n_2 \cdot p_2}{W_2^{'}} = \dfrac{n_1 \cdot p_1}{W_1}$$ and (2) $$C_2 = C_1 + p_2 (n_1 - n_2)$$ The second condition arises from the fact that the cash in $t=2$ is equal to the cash in $t=1$ plus the proceedings of the shares you sold. You do not add additional cash from your pockets. Putting (2) in (1) and solving for $n_2$ yields to: $$n_2 = n_1 \cdot \dfrac{p_1}{p_2} \cdot \dfrac{C_1 + n_1 p_2}{C_1 + n_1 p_1}$$ Suppose $p_1 = 1\$$,$p_2 = 2\$$,$n_1 = 1 \,\text{share}$, $C_1 = 1\$$, the formula yields $ n_2 = 0.75 \,\text{shares}$. In fact, both the initial weight of the Amazon share is 50%. Also the final weight of the Amazon shares, after the price doubled and you sold 0.25 shares, is 50%.
EDIT:
The amount of shares you have to sell is
$$ n_1 - n_2 = \Delta n = n_1 \left[ \dfrac{C_1 (p_2 - p_1)}{p_2(C_1 +n_1 p_1)} \right]$$
Hypothesizing that the price double ($p_2 = 2 p_1$) and the initial cash weight for 50% ($C_1 = n_1 p_1$), we obtain
$$ \dfrac{\Delta n}{n_1} = \dfrac{1}{4} $$
That is, you have to sell 25% of your Amazon shares.
EDIT2:
There is the implicit assumption that you are able to sell all your $\Delta n$ shares for the same price of $p_2$. This may not be true, especially if you have to sell a large amount of shares. You may not be able to find people willing to buy later shares at $p_2$, because they entered a buy order for a lower price
Moreover, if the price falls ($p_2 < p_1$), you need to buy shares. In this case, if you don't want to borrow money, you have to impose the restriction $C_2 \ge 0$, which leads to a minimum $p_2$ value. If the price falls below this value, you have lost all your cash and you are not able to buy further shares.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.