Just came across an interesting wiki page on the Bogleheads site:
Placing cash needs in a tax-advantaged accountIn their example they use an emergency fund, I modified it a bit. Suppose you had $100,000 in your portfolio with $20,000 in bonds. Then the stock market crashes 50%, you lose your job, and you need to withdraw $10,000. Your portfolio now looks like this:
Taxable:
Tax-advantaged account, such as 401(k):
- $20,000 stock index fund
- $20,000 bond index fund
To avoid selling stocks low, you can sell $10,000 from the stock index fund in your taxable account and exchange the bond fund for similar stock funds in your tax-advantaged account. Now your portfolio looks like this:
Taxable:
Tax-advantaged account, such as 401(k):
- $30,000 stock index fund
- $10,000 bond index fund
Notice you still have $40,000 in stocks, didn't have to sell low, and if you do it right you can tax loss harvest $20,000.