Tax-Aware Direct Indexing · Long/Short Tax-Aware

How a tax-aware optimizer decides what to buy and sell, lot by lot.

LotWise explains how two tax-aware strategies are built, direct indexing and long-short, right down to the tax lot (each separate purchase of a stock, with its own date and cost). It is written for individuals, practitioners and advisors who want to learn how the method works. You will find both strategies explained, tools with results on sample portfolios, and the methodology behind them.

Results · coming soon

Results on real data are coming soon.

Backtest results on real data will be published with a forthcoming paper on SSRN, a preprint server for research papers. The paper describes the methodology and compares a CPU solver with a GPU solver on real data. Until then, this site explains the method, and the tools show results on sample portfolios.

How results will be shown

Many start years, not one hand-picked window.

A single backtest window can flatter a strategy or punish it, depending on when it starts. When results are published, each strategy will be run from many different start years under the same rules, so you can see how it behaves across different markets rather than in one chosen period.

What the solver actually does

Four rules the optimizer applies every rebalance.

These are the rules of the direct-indexing engine. The long-short strategy extends the same engine with a short side and a fee for borrowing shares; where a rule differs for it, the rule says so.

  1. 01

    Tracking error is priced, never free.

    Tracking error is how far the portfolio's returns drift from its benchmark index. The optimizer treats it as a cost and weighs it against tax cost, so the portfolio moves away from the index only where the tax saving pays for it. In direct indexing, a drift in a single stock or sector inside a band around its benchmark weight costs only its tracking error; outside the band the optimizer adds an extra penalty, and the cash buffer is a hard limit. The long-short strategy prices tracking error and drift the same way, and limits any single short to 0.5% of the portfolio's value.

  2. 02

    Lot by lot, not position by position.

    Every position is a stack of tax lots, each with its own purchase date and cost. When the optimizer sells, it chooses which specific lots to sell as part of the solve, weighing each lot's gain or loss at its short- or long-term rate, so the gain or loss reflects the lots sold rather than an average.

  3. 03

    The 30-day wash-sale rule applies to every loss.

    The wash-sale rule disallows a loss if you buy the same, or a substantially identical, security within 30 days before or after the sale. The optimizer never sells a stock at a loss and buys it back in the same rebalance, and the backtest keeps a ledger of every loss sale: if the stock is bought back inside the window, the loss is disallowed and added to the cost of the new shares, as the rule requires. After a harvest, the tracking-error cost pulls the optimizer toward similar stocks, so the portfolio keeps its shape. An optional wash-sale lock goes further: the optimizer then makes no trade that would wash a loss — no buying back a stock sold at a loss in the last 30 days, and no selling a loss lot of a stock bought in that time. The strategies on this site follow the US rule; other countries treat such losses differently.

  4. 04

    Every trade carries its reason.

    Every backtest run records what produced it: the code version, a fingerprint of the data, the settings and the pinned solver options. It also keeps the lot-by-lot ledger behind every trade. Runs are deterministic: the same inputs give the same results.

Strategies

The strategies, explained step by step.

  • Tax-Aware Direct Indexing

    Track a benchmark. Harvest losses lot by lot. Respect wash sales.

  • Long/Short Tax-Aware

    Go more than 100% long, short the difference, and harvest tax losses on both sides.

Tools

Tools you can try, with results on sample portfolios.

Each tool answers one focused question about one portfolio snapshot. Results are computed ahead of time by the same code, on sample portfolios.

  • Transition Planner

    A quarter-by-quarter selling schedule that trims an overweight portfolio inside a yearly budget for realized gains.

  • Year-End Loss Harvest Maximizer

    Finds every lot you can sell at a loss without realizing a gain, holding back a lot when other shares of the same stock were bought in the last 30 days.

  • Charitable-Giving Optimizer

    Picks the appreciated lots to give so that a gift of stock avoids the most capital-gains tax.

Questions about the method?

Talk it through, or follow along.

If you want to discuss how these strategies are implemented, get in touch. To see each step as the work goes on, including the paper with real-data results, follow the build.