Skip to content
Skillpedia
Analysis & spreadsheets8.4k · #12463

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.md

Copy 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

Use this skill to help me: https://github.com/AI4Finance-Foundation/FinRobot/blob/master/finrobot_desktop/skills/wealth-management/portfolio-rebalance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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".

repo: AI4Finance-Foundation/FinRobot

Popularity

GitHub stars
8.4k
Ranking position
#12463
License
Apache-2.0
Updated
10/24/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills