Tier 2: capital-loss carryforward and NIITVerified
Two cross-border fidelity gaps closed in the tax estimate. Capital-loss carryforward: US net capital losses beyond the $3,000/yr ordinary offset no longer vanish. %apply-loss-year advances a carryforward through each year (losses offset gains first, then up to $3,000 offsets ordinary, the rest carries on); capital-loss-carryin walks the journal's earlier years so compute-taxes nets this year's gains against prior losses. New tax-result field us-cap-loss-cf, shown in the report. (journal-years moved to ledger.lisp so the tax layer can use it.) NIIT: the 3.8% Net Investment Income Tax on the lesser of net investment income (interest, dividends, rents, royalties, capital gains) and MAGI over the non-indexed threshold ($200k single / $250k mfj). US persons only; it is not creditable against Canadian tax, so it is flagged as a distinct line and folded into the US total. Adds capital-loss-carryforward and niit-net-investment-income-tax tests. 158 checks pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>