Portfolio Rebalance
What it does
This skill checks how far a portfolio has moved from its target mix and suggests trades to fix it. It is for investors and advisors who rebalance across several accounts, including taxable ones.
When to use it
- ✓When a portfolio's mix has drifted away from its target and needs checking.
- ✓When you want to rebalance across taxable and tax-advantaged accounts.
- ✓When you want to know which trades would be most tax-efficient.
Skill link
https://github.com/AI4Finance-Foundation/FinRobot/blob/master/finrobot_desktop/skills/wealth-management/portfolio-rebalance/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My portfolio has drifted from its target mix. Show me the trades that would bring it back and note the tax impact.”
5 new skills a week. 1 minute to read.
How it works
The agent compares current holdings with target allocations, flags positions outside the allowed band, and proposes trades. It prefers tax-advantaged accounts first and tries to avoid costly sales in taxable accounts.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Portfolio Rebalance
description: Analyze portfolio allocation drift and generate rebalancing trade recommendations across accounts. Considers tax implications, transaction costs, and wash sale rules. Triggers on "rebalance", "portfolio drift", "allocation check", "rebalancing trades", or "my portfolio is out of balance".
Workflow
Step 1: Current State
For each account, capture:
- Account type (taxable, IRA, Roth, 401k)
- Holdings with current market value
- Cost basis (for taxable accounts)
- Unrealized gains/losses per position
Step 2: Drift Analysis
Compare current allocation to IPS targets:
| Asset Class | Target % | Current % | Drift | $ Over/Under |
|---|---|---|---|---|
| US Large Cap Equity | ||||
| US Small/Mid Cap | ||||
| International Developed | ||||
| Emerging Markets | ||||
| Investment Grade Bonds | ||||
| High Yield / Credit | ||||
| TIPS / Inflation Protected | ||||
| Alternatives | ||||
| Cash |
Flag positions exceeding the rebalancing band (typically ±3-5%).
Step 3: Trade Recommendations
Generate trades to bring allocation back to target:
Tax-Aware Rebalancing Rules:
- Prefer rebalancing in tax-advantaged accounts (IRA, Roth) first — no tax consequences
- In taxable accounts, avoid selling positions with large short-term gains
- Harvest losses where possible while rebalancing
- Watch for wash sale rules (30-day window) across all accounts
- Consider directing new contributions to underweight asset classes instead of trading
Trade List:
| Account | Action | Security | Shares/$ | Reason | Tax Impact |
|---|---|---|---|---|---|
| Buy/Sell | Rebalance / TLH | ST gain / LT gain / Loss |
Step 4: Asset Location Review
Optimize which assets are held in which account types:
- Tax-deferred (IRA/401k): Bonds, REITs, high-turnover funds (highest tax drag)
- Roth: Highest expected growth assets (tax-free growth)
- Taxable: Tax-efficient equity (index funds, ETFs, munis), tax-loss harvesting candidates
Step 5: Implementation
- Total trades by account
- Estimated transaction costs
- Estimated tax impact (realized gains/losses)
- Net effect on allocation drift
Step 6: Output
- Drift analysis table
- Recommended trade list (Excel)
- Tax impact summary
- Before/after allocation comparison
Important Notes
- Don't rebalance for rebalancing's sake — small drift within bands is fine
- Tax costs can outweigh rebalancing benefits in taxable accounts — calculate the breakeven
- Consider pending cash flows (contributions, withdrawals, RMDs) before trading
- Check for any client-specific restrictions (ESG, concentrated stock, lockups)
- Document rationale for every trade for compliance records
- Wash sale rules apply across accounts — coordinate trades across the household
FAQ
What is a rebalancing band?
It is the allowed range around each target, such as plus or minus three to five percent.
Does it consider wash sale rules?
Yes. The skill includes wash sale rules in its trade recommendations.
Does it place trades for me?
No. It recommends trades, and you decide what to do.
Details
Original description by the author
Analyze portfolio allocation drift and generate rebalancing trade recommendations across accounts. Considers tax implications, transaction costs, and wash sale rules. Triggers on "rebalance", "portfolio drift", "allocation check", "rebalancing trades", or "my portfolio is out of balance".
Popularity
- GitHub stars
- 8.4k
- Ranking position
- #12463
- License
- Apache-2.0
- Updated
- 10/24/2026
Comments
- …
More skills from this repository
Portfolio AI Readiness
8.4kHelps your agent review updates from several investment companies, rank where AI would help most, and list quick wins for each company.
Due Diligence Checklist
8.4kHelps your agent build and track a checklist for reviewing a company before a deal, grouped by area, with missing items and red flags noted.
Diligence Meeting Prep
8.4kHelps your agent prepare questions and points to check before a diligence meeting, such as a management presentation or a customer reference call.
Investment Committee Memo
8.4kHelps your agent draft a formal investment committee memo that summarizes a deal, its risks, its financials, and its recommendation for approval.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.