How to plan a rebalance with AI

Last updated August 2026

Short answer

Three questions in order: what are my current weights against target, what would closing the gap cost in realised gains, and what are the specific trades. Reversing the first two is the common error, because a plan that looks tidy on weights alone can carry a tax bill large enough to make redirecting contributions the better answer.

Rebalancing is postponed because measuring drift is tedious rather than because the decision is hard. Removing the tedium is most of the value here.

Step one: the current weights

Across every account together, since allocation is a property of the whole portfolio rather than of any one login.

Check the output against a broker statement before relying on anything downstream.

If the weights do not reconcile, nothing that follows is worth reading, which is a quick check and an important one.

Step two: the tax cost

Ask what selling to target would realise in capital gains, split between short-term and long-term.

Inside a 401(k), IRA or HSA the answer is nothing, which is why that is where the correcting should start.

In a taxable account the figure frequently makes redirecting contributions the better route, and knowing it before choosing is the whole point of asking in this order.

Step three: the trades

Specific amounts in specific holdings, with the sheltered accounts used first.

Ask for the version that uses new contributions and dividends where possible, since it achieves the same drift correction without a sale.

Then ask for the tax-optimal lot selection on anything that does have to be sold, which is a mechanical question with a definite answer.

Try it in Walnut

Walnut connects to your brokerage and shows current weights against your targets, which is the number this whole exercise depends on.

Checks worth requesting explicitly

Wash sales: anything sold at a loss and repurchased within 30 days either side, in any account including an IRA.

Holding periods: whether waiting days or weeks moves a gain from short-term to long-term treatment.

Fund overlap: whether the buy side of the plan increases exposure you already hold through a different fund.

What it cannot decide

Whether the target allocation is right, which is a question about your horizon and tolerance rather than about drift.

Whether now is a good time, which is a market call the whole approach exists to avoid making.

Whether to act at all, since the rule that triggers a rebalance should have been set in advance and in writing.

A prompt that produces something usable

Using my connected accounts, show current weights by asset class against my targets, then the dollar amount that would have to move.

Show the realised gain that closing the gap by selling would produce in taxable accounts, split short-term and long-term.

Then give me the version that uses retirement accounts and new contributions first, and only sells in the taxable account for whatever remains.

Doing it once a year

Pick a date and use it, so the trigger is the calendar rather than how the market feels that week.

Run the same three questions each time, which makes the answers comparable year to year.

Write down what you did, since next year's version is far quicker when last year's reasoning is in front of you.

Sources

Guidance on allocation and rebalancing is published by the SEC at investor.gov. Capital gains rates and the wash sale rule are in IRS Topic no. 409 and Publication 550. Walnut is informational and is not an investment adviser. This guide is educational and not personalized investment or tax advice.

FAQ

What should I ask for first?

+

Current weights against your targets, across every account together. Everything else depends on that number, and it is the part people cannot easily produce by hand, which is why the job gets postponed.

What should I ask for second?

+

The tax cost of closing the gap by selling in a taxable account. In a taxable portfolio that figure frequently changes the plan from selling to redirecting contributions instead.

Can it place the trades?

+

Only where the brokerage connection permits order placement, and many connections are read-only. Analysis and execution are separate permissions, so an assistant can sometimes tell you exactly what to do and be unable to do it.

How do I avoid a wash sale?

+

Ask it to flag any position sold at a loss that was bought, or is scheduled to be bought, within 30 days either side, including in other accounts and any IRA. Brokers only see their own accounts, so this is where a cross-account view earns its keep.

Should I rebalance across accounts or within each one?

+

Across, because allocation is a property of everything you own. Doing the correcting inside retirement accounts first avoids tax entirely and frequently gets you close enough without touching the taxable one.

What about drift inside an asset class?

+

Worth asking about explicitly. An equity allocation at exactly target can still be concentrated in a handful of companies, and the headline weights will not show it.

How precise does this need to be?

+

Not very. Getting within a percentage point or two of target is sufficient, and chasing exactness generates trades and tax for no benefit.

Does this replace a rule?

+

No. The rule decides when to rebalance; the analysis decides how. Without a rule set in advance, an assistant simply makes it easier to have the same argument with yourself more often.

How do I make this repeatable?

+

Pick a date, ask the same three questions each year, and write down what you did. The trigger should be the calendar or a drift threshold rather than how the market feels, and having last year's reasoning in front of you makes the next round much quicker.

Related guides

    How to plan a rebalance with AI - Walnut AI Investing App