Having a math related issue, and I feel like the solution is obvious but I just can't get it for some reason. Let's say you have four sector ETFs (or stocks, whatever really). You want to maintain those at an allocation of

Fund A: 50%

Fund B: 30%

Fund C: 15%

Fund D: 5%

After a year you have the following allocation

Fund A: 45%

Fund B: 20%

Fund C: 25%

Fund D: 10%

You want to get it back to the original allocation. Let's say that your portfolio is $1,000,000. The rebalancing would be quite easy (just sell 5% of Fund D for example, and put it in Fund A) but there's a slight complication, selling incurs fees and capital gains tax. During the year you also made $100,000 cash (to simplify let's say you kept the entire amount in cash until rebalancing time). So now your portfolio is $1,100,000. Using an inefficient strategy (as far as I can tell) I could sell 15% of my portfolio from the funds that gained, move them into the funds that lost (giving me my original allocation) and then invest the cash according to the original allocation.

However, this seems inefficient. Intuitively, I feel like I should be able to sell less than 15% of my funds because I have cash to rebalance with, but I can't seem to figure out the formula to minimize selling while attaining the original allocation. Any ideas?

  • "Intuitively, I feel like I should be able to sell less than 15% of my funds because I have cash to rebalance with" - this intuition is sort of true if you're still thinking about the initial $1m value, because the cash means your portfolio value is $1.1m so desired allocations are higher dollar amounts. But the $1m figure has no real bearing on your rebalance, ideally you just go straight to "desired C = 15% * 1.1m = $165k; current C = $250k; thus I need to sell $85k C" Nov 30, 2021 at 11:07

1 Answer 1


Ignoring taxes:

(A) Calculate the current value of each fund (current percent times $1,100,000).

(B) Calculate the target value of each fund (initial percent times $1,100,000).

Subtract (A) from (B). This will be the amount of each fund that you will have to buy or sell.

If I did my math right, you'll be selling $55k of Fund D and buying $55k of Fund A and you'll be selling $110k of Fund C and buying $110k of Fund B.

If you want to include the taxes, determine what you'll pay on $165k of sales (if purchases were made at different prices, use the highest ones to minimize taxes). Then, subtract the tax due from $1,100,00 repeat this process.

If there's cash involved, it's the same process except that you'll have to reduce the amount of funds sold.

  • Your last sentence is exactly what I am struggling with. Could you walk me through the same scenario and process except with the extra cash this time?
    – trallgorm
    Dec 6, 2021 at 16:53
  • If you have cash on hand, you'd need to sell less of your overweighted funds in order to have enough cash to buy the appropriate amount of the underweighted funds because you're already part way toward that total amount. Dec 7, 2021 at 11:32
  • I think I'm missing something because I still don't get how that works. For example if I am 100k overweight in one fund, and 100k underweight in one fund, and have 100k in cash, I can't just purchase 100k worth of the underweight fund and call it a day because I am still overweight in one fund. So how are you calculating how much you need to sell off after that? It would be helpful if you walked the exact same process as you did but just including the cash this time.
    – trallgorm
    Dec 7, 2021 at 15:43
  • This is starting to sound like a homework problem. Be that as it may, in order to solve this, you need to set up a spreadsheet that reflects the allocation that you want. That will determine how much of each fund you want to have now. Use the cash to bring the shortfalls up and sell off from the overweighted ones enough to reach the desired allocation. And sorry, I'm not going to set up a spreadsheet in order to provide you the answer. Dec 7, 2021 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .