/wealth-management:rebalancingfrom wealth-management
Maintains portfolio allocations using calendar-based, threshold-based, and tax-efficient rebalancing strategies. Covers the rebalancing premium, Leland optimal bands, and transaction cost trade-offs.
Ships in wealth-management. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Rebalance at fixed time intervals regardless of drift magnitude:
Calendar rebalancing is simple to implement and schedule but may miss large dislocations between dates or trigger unnecessary trades when drift is minimal.
Rebalance when any asset weight drifts beyond a defined tolerance band around its target:
Threshold rebalancing is more responsive to market dislocations and avoids unnecessary trades when markets are calm. However, it requires more frequent monitoring.
Leland (2000) derived the optimal no-trade band width as a function of transaction costs, risk aversion, and asset variance:
Band width proportional to (3 * transaction_cost / (2 * risk_aversion * variance))^(1/3)
Key intuition:
Systematic rebalancing generates a "volatility harvesting" or "rebalancing premium" through the buy-low/sell-high mechanism:
This effect is sometimes called Shannon's Demon: in a two-asset portfolio with equal expected returns but independent volatility, the constantly rebalanced portfolio outperforms buy-and-hold. The rebalancing premium is larger when:
Note: The rebalancing premium is not a free lunch — it underperforms in trending markets where winners keep winning.
Costs incurred when rebalancing that reduce net returns:
Total implementation cost = commissions + half-spread + market impact + opportunity cost
Strategies to minimize tax impact when rebalancing in taxable accounts:
Rebalancing and TLH should be planned together, not as separate trade lists:
Tax benefit = Realized loss * Marginal tax rate. For the 61-day wash-sale window, the $3,000 ordinary-income offset, replacement selection, and full TLH mechanics, see the tax-loss-harvesting skill.
When an investor has multiple account types (taxable, IRA, 401k), optimize rebalancing by:
Factors that determine optimal band width:
Use regular deposits or withdrawals to move toward target weights without explicit rebalancing trades:
The concepts above describe the what and why of rebalancing. This section covers the operational how — the step-by-step process an advisor follows to execute a rebalance for a client household.
Step 1: Aggregate Household View Assemble the complete picture across all accounts (taxable brokerage, Traditional IRA, Roth IRA, 401(k), 529, trust). Calculate the household-level allocation by summing positions across all accounts, not just individual account allocations. Many drift problems are invisible at the account level but obvious at the household level.
Step 2: Asset Location Review Before proposing trades, document which account types hold which asset classes:
If asset location is suboptimal, the rebalance is an opportunity to improve it — but only if the tax cost of repositioning is justified by the long-term tax savings.
Step 3: Drift Analysis and Trade Generation For each asset class, calculate drift from target and compare against tolerance bands (from the IPS or firm default):
Step 4: Tax-Impact Estimation For each proposed sell trade in a taxable account, estimate the tax consequence:
Step 5: Cross-Account Optimization Minimize total household tax impact by choosing where to execute each trade:
Step 6: Before/After Comparison Generate a before/after allocation comparison for advisor review and client communication:
This comparison serves as both a decision tool (does the rebalance justify its costs?) and a compliance artifact (documenting the rationale for the trades).
Step 7: Execution and Confirmation
| Formula | Expression | Use Case |
|---|---|---|
| Threshold Trigger | w_actual - w_target | |
| Optimal Band Width | band ~ (3tc / (2lambda*sigma^2))^(1/3) | Leland optimal no-trade zone |
| Tax-Loss Benefit | Benefit = Loss * Tax Rate | Value of harvested losses |
| Transaction Cost | TC = commission + spread/2 + impact | Total rebalancing cost |
| Drift | Drift_i = w_actual_i - w_target_i | Weight deviation from target |
| Trade Size | Trade_i = (w_target_i - w_actual_i) * Portfolio Value | Dollar amount to trade |
| Rebalancing Premium | RP ~ (1/2) * Σ w_i * sigma_i^2 - (1/2) * sigma_p^2 | Volatility harvesting estimate |
Given:
Calculate: Rebalancing trigger and required trades
Solution:
Check drift:
Target dollar amounts:
Required trades:
Proceeds from equity sales fund the bond purchases. In a taxable account, check the cost basis of equity lots being sold to estimate tax impact before executing.
Given:
Calculate: Tax benefit of harvesting the loss
Solution:
Realized loss from sale: $10,000
Tax benefit calculation:
If the investor had no capital gains to offset:
Implementation:
Note: TLH creates a lower cost basis in the replacement security, so taxes are deferred, not eliminated. However, the time value of the tax deferral and the ability to offset gains at favorable rates makes TLH valuable.
Run with uv run scripts/rebalancing.py (the PEP 723 header resolves dependencies automatically) or with python3 scripts/rebalancing.py after pip install numpy scipy. The bare run prints a demo covering drift analysis, threshold checks, trade generation, cash flow rebalancing, transaction costs, tax-aware lot selection, Leland bands, and the rebalancing premium. Pass --verify to assert the demo outputs match this skill's worked examples (prints PASS/FAIL), or --help for an overview of the available classes. The file is primarily meant to be imported as a module (e.g., from rebalancing import DriftAnalyzer, TradeGenerator, TaxAwareLotSelector).
What SKILL.md sets; muted values are Claude Code's defaults
38 skills in this plugin
/alternativesAnalyze alternative investments including hedge funds, private equity, and venture capital. Use when the user asks about hedge fund strategies (long/short, macro, event-driven), PE or VC performance metrics (IRR, TVPI, DPI), fee structures ('2-and-20', carry, hurdle rates), the J-curve effect, illiquidity premiums, lock-up periods, or hedge fund replication. Also trigger when users mention 'managed futures', 'CTA', 'fund of funds', 'vintage year', 'capital calls', 'distributions', 'carried interest', or ask how to evaluate an alternative investment manager./asset-allocationDetermine how to distribute capital across asset classes using strategic and tactical allocation frameworks. Use when the user asks about portfolio allocation, mean-variance optimization, Black-Litterman, risk parity, glide paths, or target-date strategies. Also trigger when users mention 'how much in stocks vs bonds', '60/40 portfolio', 'policy portfolio', 'core-satellite', 'liability-driven investing', 'asset-liability matching', or ask how to split their money across investments./bet-sizingDetermine how much capital to allocate to individual positions within a portfolio. Use when the user asks about position sizing, the Kelly criterion, fractional Kelly, risk budgeting, or conviction weighting. Also trigger when users mention 'how much to put in one stock', 'maximum position size', 'how concentrated should my portfolio be', 'number of holdings', 'VaR budget per position', 'how big a bet', or ask about scaling position sizes with volatility.npx claudepluginhub joellewis/finance_skills --plugin wealth-managementOther plugins' skills for the same job