A realized gain or loss arises when an investment is disposed of for more or less than its cost basis. Realization matters because the result can affect taxable income and capital-gains taxes. Selling an appreciated asset creates a realized gain; selling a depreciated asset creates a realized loss that can offset realized gains or ordinary income. section 4.2.3 section 14.0
Index rebalancing and a heartbeat trade
Suppose an ETF holds $500,000 of stock A with a $300,000 cost basis. Selling A to rebalance would create a $200,000 realized capital gain. Instead, a heartbeat trade can exchange newly contributed securities for stock A without selling it, aligning the portfolio while avoiding that taxable event. section 4.2.3
Table 4.3 Holdings and cost basis
| A | B | C | D | E | |
| Portfolio value | $500,000 | $300,000 | $200,000 | $0 | $0 |
| Cost basis | $300,000 | $225,000 | $150,000 | $0 | $0 |
Use the holdings and cost-basis table to calculate the realized gain produced by selling each position. section 4.2.3
Realization creates several practical trade-offs:
- Tax-loss harvesting deliberately sells depreciated assets, then reinvests the proceeds in similar but not identical assets to preserve portfolio exposure. section 14.0
- A harvested loss can defer taxes rather than eliminate them: replacing a $100,000 position with one bought for $95,000 produces a larger future gain when the replacement reaches $150,000. section 14.1.1
- The economic value of deferral depends on the payment horizon T and discount rate r: x(1 - (1 + r)^(-T)), where x is the deferred tax liability. section 14.1.1
