← Home

Follow the build

Updated .

A dated record of how LotWise's optimizer, lot accounting, backtester and checks came together. Each entry says what changed and why it matters for the method. None of them reports results.

Next: a forthcoming paper, to be posted on SSRN (a preprint server for research papers), that describes the methodology and compares a CPU solver with a GPU solver on real data. Backtest results will be published with it.

  1. This site, rebuilt for learning

    The site now leads with the method: how each of the two strategies is built, what the optimizer weighs, and how the work is tested. New pages add a way to get in touch, this changelog with its feed, and a glossary of the tax and portfolio terms the site uses. The tool demos can now be explored: switch the sample portfolio, compare a few preset inputs where an input changes the result, and sort or download the result table. Backtest figures stay off the site until the paper's results are ready.

    • site
  2. Neutral, academic vocabulary

    Optimizer features, index names and data sources were renamed to neutral, descriptive terms, and each formulation cites a public academic or statutory source. Nothing numerical changed: the synthetic test backtest and the tool demos reproduce exactly.

    • provenance
  3. Same inputs, same numbers

    Tax-alpha figures could differ slightly from one run to the next, because the tax-agnostic comparison portfolio added up its trades in an order that Python randomizes for each process. The order is now fixed, and a test runs the comparison under four different seeds to check the numbers agree.

    • backtest
  4. Current frameworks for the site

    The site moved to Node 24, Next.js 16, React 19 and Tailwind CSS 4, a day after the Python packages moved to Python 3.14. The upgrades clear known security advisories in the old versions; the pages look and read the same.

    • site
  5. A static site with precomputed tools

    Accounts, sign-in and the live server were removed, and every page is now built ahead of time from files in the repository. Each tool runs offline on curated sample portfolios at its default settings, and the site shows those saved results, so what you see can be reproduced from the code.

    • site
    • tools
  6. A tighter solve for the tax problem

    A simple convex model can sell a stock at a loss and buy it back in the same rebalance, booking a loss the wash-sale rule would disallow. The optimizer now uses a relaxation that treats taxes and risk together (after Moehle, Kochenderfer, Boyd and Ang, 2021), fixes whether each loss-holding stock is bought or sold, then re-solves the exact problem. It is now the default route for tax-aware solves.

    • optimizer
    • tax
  7. Lot accounting rebuilt on the statute

    Tax-lot bookkeeping moved into its own small library, adapted from the author's earlier lot-accounting code with several rules corrected against the statute. It decides long-term status by calendar anniversary, so a leap day can no longer misclassify a lot, and it handles wash sales as IRC §1091 and §1223(3) describe: the disallowed loss moves to the replacement shares' basis and their holding period carries over. Backtests now apply it at every rebalance, including a loss washed by a later purchase, and the independent checker reproduces the same ledger.

    • tax
    • backtest
  8. One interface, more than one solver

    The optimizer can hand its quadratic programs to a different numerical solver through a single interface, and a small harness compares solvers on the same problem. Results from the default solver are unchanged. This is the groundwork for comparing solvers on identical problems.

    • optimizer
  9. An independent validation harness

    A separate package now checks the optimizer, the lot accounting and the backtester before a number is trusted: conservation checks at every step, hand-computed test cases, and an independent re-implementation of the tax rules that shares no code with the production path. It found two real bugs, both fixed: an oversized sell could book shares that did not exist, and backtests judged holding periods against today's date instead of the simulated one.

    • validation
  10. Raw data stays private

    A written rule, enforced in code and tests, separates raw market data from derived results. Only derived values, such as returns, weights and tax figures, may reach anything public; raw prices never do.

    • data
  11. Wash sales across a household's accounts

    A loss harvested in one account can be undone by a purchase in another account the same household owns. A new check flags those collisions and separates a deferred loss, where the replacement sits in a taxable account and the loss moves to its basis, from a permanently lost one, where the replacement sits in an IRA or Roth IRA (IRS Revenue Ruling 2008-5).

    • tax
  12. Planning several accounts together

    The optimizer gained a joint mode for several portfolios. One realized-tax budget lets a loss in one account offset a gain in another, and the optimizer works out which account should harvest a loss so that a purchase elsewhere does not wash it.

    • optimizer
    • tax

Backtested and simulated results are hypothetical. Nothing here is investment, tax, or legal advice.