> ## Documentation Index
> Fetch the complete documentation index at: https://docs.itoflow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare tax-loss harvesting rules

> Ask Itoflow to compare tax-loss harvesting rules on the same lots and inputs, so the gap between them reflects the rule. See each rule's after-tax result beside the tracking error it costs. A research study, not tax advice.

Harvesting rules differ a lot in what they save and in how far they pull a book from its index. Ask Itoflow to run several rules on the same lots, prices and tax rates, so the gap between them comes from the rule and not the data.

**What you'll get:** each rule's ending value after tax, the tax it saved, its trading costs and its tracking error against the index, with the code that produced them.

## Try it

> [tab] Ask your AI assistant
>
> With [Itoflow connected to your assistant](https://docs.itoflow.ai/mcp/install.md), paste this into your assistant:
>
> ```text theme={null}
> Use Itoflow to compare tax-loss harvesting rules for a newly invested
> $10 million account that tracks the S&P MidCap 400, from the end of November
> 2025 to today, reviewed monthly. Compare no harvesting; selling any lot down
> 5%; a loss threshold scaled to each stock's volatility; and sales chosen by
> an optimizer. Hold every rule to the same 1% active risk budget. For each
> rule, try both cash and IJH.US as the replacement. Use a 40.8% short-term
> and a 23.8% long-term tax rate, a 30-day wash-sale window and a 0.10%
> trading cost. Assume no outside gains: losses offset gains inside the
> account and unused losses carry forward. Report each rule's ending value
> after tax, the tax saved and the realized tracking error against the index,
> and say what drives the differences. Wait for the research to finish.
> ```
>
> > [card] [Open in Claude](https://claude.ai/new?q=Use%20the%20Itoflow%20plugin%20\(https%3A%2F%2Fgithub.com%2Fitoflow%2Fskills\)%20for%20this.%20If%20it%20isn't%20installed%20yet%2C%20first%20tell%20me%20how%20to%20install%20it%20and%20sign%20in%20to%20Itoflow%2C%20and%20wait%20until%20I%20confirm.%20Then%3A%0A%0AUse%20Itoflow%20to%20compare%20tax-loss%20harvesting%20rules%20for%20a%20newly%20invested%20%2410%20million%20account%20that%20tracks%20the%20S%26P%20MidCap%20400%2C%20from%20the%20end%20of%20November%202025%20to%20today%2C%20reviewed%20monthly.%20Compare%20no%20harvesting%3B%20selling%20any%20lot%20down%205%25%3B%20a%20loss%20threshold%20scaled%20to%20each%20stock's%20volatility%3B%20and%20sales%20chosen%20by%20an%20optimizer.%20Hold%20every%20rule%20to%20the%20same%201%25%20active%20risk%20budget.%20For%20each%20rule%2C%20try%20both%20cash%20and%20IJH.US%20as%20the%20replacement.%20Use%20a%2040.8%25%20short-term%20and%20a%2023.8%25%20long-term%20tax%20rate%2C%20a%2030-day%20wash-sale%20window%20and%20a%200.10%25%20trading%20cost.%20Assume%20no%20outside%20gains%3A%20losses%20offset%20gains%20inside%20the%20account%20and%20unused%20losses%20carry%20forward.%20Report%20each%20rule's%20ending%20value%20after%20tax%2C%20the%20tax%20saved%20and%20the%20realized%20tracking%20error%20against%20the%20index%2C%20and%20say%20what%20drives%20the%20differences.%20Wait%20for%20the%20research%20to%20finish.)
> >
> > Start this in Claude with the Itoflow plugin.
>
> > [card] [Open in ChatGPT](https://chatgpt.com/?q=Use%20the%20Itoflow%20plugin%20\(https%3A%2F%2Fgithub.com%2Fitoflow%2Fskills\)%20for%20this.%20If%20it%20isn't%20installed%20yet%2C%20first%20tell%20me%20how%20to%20install%20it%20and%20sign%20in%20to%20Itoflow%2C%20and%20wait%20until%20I%20confirm.%20Then%3A%0A%0AUse%20Itoflow%20to%20compare%20tax-loss%20harvesting%20rules%20for%20a%20newly%20invested%20%2410%20million%20account%20that%20tracks%20the%20S%26P%20MidCap%20400%2C%20from%20the%20end%20of%20November%202025%20to%20today%2C%20reviewed%20monthly.%20Compare%20no%20harvesting%3B%20selling%20any%20lot%20down%205%25%3B%20a%20loss%20threshold%20scaled%20to%20each%20stock's%20volatility%3B%20and%20sales%20chosen%20by%20an%20optimizer.%20Hold%20every%20rule%20to%20the%20same%201%25%20active%20risk%20budget.%20For%20each%20rule%2C%20try%20both%20cash%20and%20IJH.US%20as%20the%20replacement.%20Use%20a%2040.8%25%20short-term%20and%20a%2023.8%25%20long-term%20tax%20rate%2C%20a%2030-day%20wash-sale%20window%20and%20a%200.10%25%20trading%20cost.%20Assume%20no%20outside%20gains%3A%20losses%20offset%20gains%20inside%20the%20account%20and%20unused%20losses%20carry%20forward.%20Report%20each%20rule's%20ending%20value%20after%20tax%2C%20the%20tax%20saved%20and%20the%20realized%20tracking%20error%20against%20the%20index%2C%20and%20say%20what%20drives%20the%20differences.%20Wait%20for%20the%20research%20to%20finish.)
> >
> > Start this in ChatGPT with the Itoflow plugin.
>
> Using another client? Copy the prompt with the button on the code block.
>
> The prompt settles the choices the agent would otherwise ask about: how the account starts, which gains the losses can offset, and which rules the risk budget limits. To use your own lots, attach them as a file in the Itoflow app and name the file in the prompt.

> [tab] In the Itoflow app
>
> 1. Open [Chat](https://app.itoflow.ai/chat).
> 2. Attach your lots as a file, or describe a model account as in the prompt on the other tab.
> 3. Name the rules to compare, the tax rates, the wash-sale window, trading costs and the replacement.

## What a result looks like

[Finding tax alpha with Itoflow](https://itoflow.ai/blog/how-to-measure-tax-alpha), September 29, 2026, compared eight harvesting approaches and a no-harvest baseline on one modeled $10M account that tracked the S&P MidCap 400 from September 2021 to September 2026. Its assumptions differ from the prompt above: $100,000 of short-term and \$50,000 of long-term gains a year outside the account, and a 15% one-way turnover limit.

* Optimized sales with IJH as the replacement ended \$1.08M (7.3%) ahead of no harvesting: 4.85 points from lower modeled tax and 2.49 points from returns after costs.
* That gain came with more tracking error against the index: 1.56% a year, against 1.19% with no harvesting.
* In each threshold rule, replacing sold lots with the ETF beat holding the proceeds in cash.

The study measures fixed rules, not an agent's choices. It uses fills at the close, one period and simplified corporate events. It is not tax advice.

We ran the prompt above on October 28, 2026, and it didn't finish. The agent rebuilt the index's holdings at the start, then stopped: one change of security in the index had no verified price and identity history. It reported no result rather than drop that security, use today's members or shorten the period, and it saved the setup for a rerun.

## How it's checked

* **Same inputs for every rule.** The [research contract](https://docs.itoflow.ai/platform/agent-harness.md#the-research-contract) fixes the lots, prices, rates and costs before the comparison runs.
* **You get the code.** The agent writes the harvesting and wash-sale logic in Python in its sandbox, so you can read the rules it applied and run them again.
* **A second agent reviews it.** The [independent reviewer](https://docs.itoflow.ai/platform/agent-harness.md#independent-review) reads the files before the answer reaches you.

## Limits

* A replay needs the index's dated holdings and full price and identity history for every security in them. Itoflow rebuilds past holdings from a fund that tracks the index, and for several funds those start in late 2025. Where history is missing, the agent stops and says so.
* Results are modeled. Real fills, tax lots and corporate events will differ.
* Itoflow doesn't give tax advice or file anything. Check rules for your own account with a tax adviser.
* A strategy can act on a harvesting rule on a paper portfolio. On a live portfolio, a person approves each list of trades.

## Next steps

* [Run a strategy under a mandate](https://docs.itoflow.ai/use-cases/run-a-strategy.md) to apply a rule on a paper portfolio.
* [Measure a book's factor risk](https://docs.itoflow.ai/use-cases/measure-factor-risk.md) to see what a replacement does to your exposures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.