Sub topic 1
Start with a target allocation
Prerequisites
This chapter assumes you know what stocks, bonds, and funds are, and that a portfolio weight is an asset's value divided by the total portfolio value. You should be comfortable with percentages. The code uses Python 3, but you can follow the logic without running it.
Start with a target allocation
A target allocation is the mix of asset classes you intend to hold, expressed as weights that sum to 100%. An example is 60% stocks and 40% bonds. Every rebalancing rule needs a target, because rebalancing means returning to it.
Why weights drift and how to measure it
Weights change whenever prices change. If stocks rise faster than bonds, stocks take a larger share of the portfolio. This change is called drift.
Drift is the current weight minus the target weight. The following script computes both for a portfolio with $72,000 in stocks and $38,000 in bonds.
targets = {"stocks": 0.60, "bonds": 0.40}
values = {"stocks": 72000.0, "bonds": 38000.0}
total = sum(values.values())
weights = {a: values[a] / total for a in values}
drift = {a: weights[a] - targets[a] for a in targets}
for a in targets:
print(f"{a}: weight {weights[a]:.1%}, drift {drift[a]:+.1%}")The output shows stocks at 65.5% (drift +5.5) and bonds at 34.5% (drift -5.5).
What rebalancing is for
Rebalancing controls risk. A portfolio that drifts toward stocks carries more market risk than you chose. Rebalancing sells the asset classes that grew and buys the ones that lagged, which restores the risk level in the target.
Rebalancing does not aim to raise returns. It often sells recent winners, and that can lower returns in some periods. Its purpose is to keep the portfolio matched to the risk you accepted.
Calendar rebalancing
Calendar rebalancing checks the portfolio on fixed dates, such as every 12 months, and trades back to target on those dates. The review interval sets the trade-off between drift and trading activity.
| Review interval | Reviews per year | Drift control |
|---|---|---|
| Monthly | 12 | Tight |
| Quarterly | 4 | Moderate |
| Annual | 1 | Loose |
The following function reports whether a review is due.
from datetime import date
def calendar_due(last_rebalance: date, today: date, interval_months: int) -> bool:
elapsed = (today.year - last_rebalance.year) * 12 + (today.month - last_rebalance.month)
return elapsed >= interval_months
print(calendar_due(date(2026, 1, 15), date(2026, 11, 28), 12)) # False
print(calendar_due(date(2026, 1, 15), date(2027, 1, 2), 12)) # TrueExercise
A portfolio holds $50,000 in stocks and $50,000 in bonds against a 60/40 target. What is the drift for stocks, and what is it for bonds?
Show answer
Stocks are at 50% weight, so drift is -10 percentage points. Bonds are at 50% weight against a 40% target, so drift is +10 percentage points.