Portfolio rebalancing / Tax-aware trades
Simulated accountView code

Portfolio trades and their tax costs

Compare ways to reach a target allocation using a simulated taxable account. See which trades meet the risk limit and how taxes and trading fees affect the decision.

i Canadian ACB model with simulated CAD purchases. Superficial-loss eligibility is screened conservatively, not legally determined. Not tax advice.
Portfolio equity
—
Target tracking error cap
—
ACB pools
—
Trades in selected method
—
PORTFOLIO MANAGER SUMMARY

Comparing rebalance methods

The trade list and cost comparison follow the selected method.

Modeled cost reduction vs risk-only—Positive numbers favor the selected method
Tracking error after trades—
Relative to allowed limit
COST DIFFERENCE FROM RISK-ONLY

Positive bars reduce modeled cost. Negative bars add cost.

This comparison includes an assumed future tax cost and a risk penalty. The result is a modeled trade-off, not a tax refund.

METHOD COMPARISON

Rebalance alternatives

Same portfolio, risk limit and tax assumptions

SOLVED SCENARIOS
MethodAnnual TEModeled tax costTrading feesTotal modeled costFeasibility
Total modeled cost combines estimated taxes, trading fees and the portfolio risk penalty. Lower is better. Infeasible methods breach at least one constraint.
ALLOCATION

Before and after trades

BeforeTargetAfter trades

The after-trade weights follow the selected decision in the table.

RISK AND COST

Cost and tracking error

Each point is a feasible rebalancing method

Feasible alternative Selected method
TRADE DETAILS

Trade list

TradeCost basis pool or lotSharesTrade notional

Canadian sales use the average ACB for each security. U.S. sales show individual lots. These orders are simulated.

TAX POSITION

Canadian ACB inventory

Based on a simulated history of CAD purchases

AVERAGE ACB BY SECURITY
PoolETFSharesBasis / sharePriceUnrealized G/LPre-trade flag
METHODOLOGY

How the four methods choose trades

01   Risk-only

Chooses trades using risk and trading fees. The resulting tax cost is reported afterward.

02   Greedy harvesting

Uses the risk-only trades. The U.S. model selects the cheapest tax lots to sell. Canada uses one averaged ACB per security, so lot selection cannot change the result.

03   Convex heuristic

Solves a relaxed problem, fixes buy and sell directions, then checks nearby feasible allocations.

04   Four-asset benchmark

Checks all 81 buy, sell and hold direction combinations for this four-asset example. The comparison applies to the simplified continuous-share model.

In Canada, the cost basis of identical securities is averaged. Superficial-loss treatment can depend on purchases within 30 days before or after the sale and on holdings 30 days afterward, including affiliated persons. This simulation flags cases for review but cannot determine the actual tax treatment.