Wash Sale Nightmare: How My Spouse 401k Killed My Tax-Loss Harvesting Strategy

I need to share this cautionary tale because it cost me $2,000 in tax savings, and I bet I’m not the only one who’s made this mistake.

The Setup

I’m on the FIRE journey (targeting retirement in 8 years at age 43), and I track everything in Beancount. One of my key tax optimization strategies has always been tax-loss harvesting—selling losing positions to offset capital gains and reduce my tax bill.

In December 2025, I noticed my VTI (Vanguard Total Stock Market ETF) position in my taxable brokerage was down about 12% from my purchase price. Perfect opportunity! I had $67k in capital gains from selling some winning tech stocks earlier in the year, so I figured I could harvest $8,000 in losses from VTI to offset those gains. That would save me roughly $2,000 in taxes (at 24% federal + state).

The Plan (That Failed)

My strategy seemed solid:

  1. Sell $65k of VTI at a loss on Dec 15, 2025
  2. Immediately buy $65k of VXUS (Total International) to stay invested
  3. Wait 31 days (to clear the wash sale window)
  4. Buy back VTI on Jan 16, 2026
  5. Claim $8k loss on my 2025 tax return

I executed steps 1-4 perfectly. Or so I thought.

The Wash Sale Violation I Didn’t See Coming

Fast forward to tax prep in March 2026. I’m reviewing my 1099-B and notice something weird: my VTI sale shows a “wash sale disallowed” adjustment. My $8k loss? Completely disallowed.

I was confused. I checked everything:

  • :white_check_mark: Waited 31 days before buying VTI again (no violation there)
  • :white_check_mark: Didn’t buy VTI in my taxable account during the 30-day window
  • :white_check_mark: Didn’t buy VTI in my Roth IRA (I don’t hold it there)

Then it hit me: My spouse’s 401k.

Her employer 401k has automatic biweekly contributions, and one of the fund options is a total stock market index fund that’s basically identical to VTI. On Dec 28, 2025—just 13 days after I sold VTI—her 401k auto-purchased $847 of this fund.

That single $847 purchase in her 401k disallowed my entire $8k tax-loss harvest. The IRS wash sale rule applies across ALL accounts in your household, including:

  • Your spouse’s IRAs
  • Your spouse’s 401k
  • Your own 401k
  • Your Roth IRA
  • Any account with your name on it

I had no idea. Cost: $2,000 in extra taxes.

My Beancount Solution

I rebuilt my tracking system to prevent this from ever happening again. Now I:

1. Track All Holdings Across All Accounts

I have separate Beancount account trees for each account type:

Assets:Brokerage:Taxable:VTI
Assets:IRA:Traditional:VTI  
Assets:IRA:Roth:VXUS
Assets:401k:Mine:VTI
Assets:401k:Spouse:TotalMarket

2. Use Security Metadata Tags

Every transaction gets tagged with the security identifier:

2025-12-15 * "Sell VTI for tax-loss harvesting"
  Assets:Brokerage:Taxable:VTI  -1000 VTI @@ 65000 USD
  Assets:Brokerage:Taxable:Cash  65000 USD
  @security:VTI @tax-strategy:harvest @wash-sale-check:required

3. Run Pre-Sale Wash Sale Queries

Before ANY tax-loss harvesting sale, I run this Beancount query:

SELECT date, narration, account, position 
WHERE any_meta('security', 'VTI') 
  AND date >= 2025-11-15 
  AND date <= 2025-12-15

This shows me every VTI (or substantially identical) purchase in the 30 days BEFORE the planned sale across ALL accounts.

4. Set Calendar Reminders

After selling, I create a 31-day calendar block: “DO NOT BUY VTI IN ANY ACCOUNT UNTIL [DATE]”

I even emailed my spouse’s HR to pause her 401k contributions for 31 days (she was able to skip one payroll cycle).

Questions for the Community

  1. How do you track wash sales across multiple accounts in Beancount? Do you use metadata tags like I do, or a different approach?

  2. What counts as “substantially identical”? If I sell VTI, is buying SCHB (Schwab Total Market ETF) safe, or would IRS consider that substantially identical since it tracks the same index?

  3. How do you handle spouse’s accounts? Do you track your spouse’s 401k/IRA in your own Beancount file, or maintain separate files?

  4. Any automated solutions? Has anyone built scripts that automatically flag potential wash sale violations before you execute trades?

This mistake was expensive, but I learned my lesson. Now my Beancount setup is wash-sale-proof. I hope sharing this saves someone else the $2k penalty I paid.

TL;DR: Tried to harvest $8k in losses, forgot about spouse’s 401k auto-purchase, IRS disallowed entire loss, paid $2k extra in taxes. Now I track ALL accounts in Beancount with metadata to prevent wash sale violations.

This is an excellent (and expensive) lesson, Fred. As a tax preparer and former IRS auditor, I see this wash sale violation ALL THE TIME during tax season, and you’ve hit on one of the most commonly misunderstood aspects of the rule.

The Cross-Account Problem

You’re absolutely right that the wash sale rule applies across ALL accounts in your household. Most people think it’s just their taxable brokerage account, but the IRS is very clear: it includes:

  • All IRAs (Traditional, Roth, SEP, SIMPLE)
  • All 401(k) plans (yours AND your spouse’s)
  • All brokerage accounts (taxable, joint, custodial)
  • Even your spouse’s accounts at completely different institutions

The IRS specifically addresses this in Revenue Ruling 2008-5: purchases in an IRA can trigger wash sales in your taxable account, even though IRAs are tax-advantaged and normally don’t report wash sales.

The “Substantially Identical” Question

Your question about VTI vs SCHB is the million-dollar question, and unfortunately there’s no clear IRS guidance. Here’s what we know:

Definitely substantially identical:

  • Same fund, different share classes (VTI and VTSAX are the same fund)
  • Same stock, different exchanges
  • Warrants or options on the same security

Probably substantially identical (conservative view):

  • Different ETFs tracking the same index (VTI and SCHB both track total US market)
  • Different share classes of same mutual fund

Probably NOT substantially identical:

  • S&P 500 fund vs Total Market fund (different indexes)
  • US fund vs International fund (VTI vs VXUS is safe)
  • Different asset classes (stocks vs bonds)

My professional advice: Be conservative. If you’re selling VTI, I recommend switching to a meaningfully different index:

  • Sell VTI (Total Market) → Buy VOO (S&P 500) - different index
  • Sell VXUS (Total International) → Buy VWO (Emerging Markets) - different exposure

Yes, S&P 500 and Total Market overlap significantly, but they’re different enough that most tax professionals consider them safe for wash sale purposes.

The 61-Day Window Everyone Forgets

One critical point: It’s not just 30 days AFTER the sale. It’s 30 days BEFORE and 30 days AFTER (plus the day of sale = 61 days total).

So if you:

  • Buy VTI on Dec 1
  • Sell VTI at a loss on Dec 15
  • Think you’re safe because you waited before selling

WRONG. That Dec 1 purchase is within the 30-day-before window, so the wash sale is triggered.

Your Beancount query should check BOTH directions:

-- Check 30 days BEFORE planned sale
WHERE date >= [sale_date - 30 days] AND date <= [sale_date]

-- Check 30 days AFTER planned sale  
WHERE date >= [sale_date] AND date <= [sale_date + 30 days]

Tax Loss Carryover - The Silver Lining

The good news: Your $8k loss isn’t gone forever. When the wash sale was disallowed, that $8k loss was added to the cost basis of the replacement shares (the VTI your spouse bought in her 401k).

So when she eventually sells those shares, she’ll get the benefit of that higher cost basis. It’s deferred, not denied.

The bad news: If it’s in a 401k, you’ll never actually realize that tax benefit since 401k gains aren’t taxed anyway. That’s why wash sales between taxable and tax-advantaged accounts are particularly painful—you lose the loss permanently from a practical standpoint.

My Recommendation for Beancount Users

Your metadata approach is solid. I’d add one more tag: @substantially-identical-to:VTI,VTSAX,VTSMX

That way you can query not just for exact matches, but for anything that might trigger a wash sale:

WHERE any_meta('substantially-identical-to') LIKE '%VTI%'

And definitely track spouse accounts in the same Beancount file. It’s the only way to catch these cross-account violations before they cost you money.

Pro tip: Before ANY tax-loss harvesting sale, run your wash sale check query and physically show the results to your spouse. Make it a two-person verification process.

Oh man, Fred, I feel your pain! I made a similar (though smaller) mistake in my first year using Beancount for tax-loss harvesting. Lost about $500 in potential tax savings before I rebuilt my tracking system.

My Migration Story: Spreadsheet → Beancount Wash Sale Tracking

When I started tax-loss harvesting 4 years ago, I used a Google Spreadsheet to track the 30-day windows. It looked like this:

Sale Date Security Amount Avoid Until Status
2022-11-15 VTI $12k 2022-12-16 :white_check_mark: Safe
2022-12-20 VXUS $8k 2023-01-20 :warning: Active

Problems with the spreadsheet approach:

  1. Manual entry (I’d forget to add sales)
  2. No connection to actual transaction records
  3. Couldn’t check across multiple accounts easily
  4. Had to manually update “Status” column
  5. My spouse had NO visibility into my restrictions

After my wash sale mistake, I moved everything to Beancount with metadata, similar to what you’re doing now.

My Beancount Metadata Approach

I tag transactions with three key metadata fields:

1. Security Tracking

2026-03-15 * "Buy VTI in taxable account"
  Assets:Brokerage:VTI  100 VTI @ 220 USD
  Assets:Brokerage:Cash  -22000 USD
  security: "VTI"
  substantially-identical: "VTI,VTSAX,VTSMX"

The substantially-identical field lists ALL funds I consider wash-sale triggers for this holding. That way I can query for any of them.

2. Tax-Loss Harvest Tagging

2025-12-10 * "SELL VTI for tax-loss harvest"
  Assets:Brokerage:VTI  -500 VTI @ 205 USD
  Assets:Brokerage:Cash  102500 USD
  Income:Brokerage:CapitalGains  -7500 USD
  security: "VTI"
  tax-strategy: "harvest"
  harvest-avoid-until: "2026-01-11"

The harvest-avoid-until field makes it crystal clear when I can safely repurchase.

3. Spouse Account Coordination

This was the game-changer. I track my spouse’s 401k in the SAME Beancount file:

Assets:
  Brokerage:
    Mine:
      Taxable:
        VTI
        Cash
    Spouse:
      401k:
        VTI-Equivalent  ; Her 401k's total market fund
        Cash

Now when I run wash sale queries, I see EVERYTHING in one view.

My Pre-Harvest Checklist (Stolen from Tax Preparers)

Before ANY tax-loss harvest sale, I run through this checklist:

Step 1: Check 30 days BACKWARD

SELECT date, account, position, number 
WHERE security = 'VTI'  
  AND date >= 2025-11-15  -- 30 days before planned sale
  AND date <= 2025-12-15  -- planned sale date
  AND number > 0  -- Only show PURCHASES (positive), not sales

Step 2: Plan the 30 days FORWARD
I add a calendar event: “DO NOT BUY VTI until [date]” and share it with my spouse on our shared calendar.

Step 3: Check spouse’s auto-investments
I literally pull up my spouse’s 401k website and check:

  • Are there any auto-purchases scheduled in the next 30 days?
  • Does her employer match go into VTI-equivalent funds?
  • Any dividend reinvestments that might trigger?

Step 4: Document the replacement purchase
After selling VTI, I immediately buy the replacement (VOO or VXUS) and add metadata:

replacement-for: "VTI sale on 2025-12-15"
reinvest-date: "2026-01-16"  -- When I can buy VTI again

What I Learned the Hard Way

  1. The IRA trap: I once sold VTI in my taxable account and bought it in my Roth IRA the same week, thinking “different account types are fine, right?” WRONG. Cost me $1,200 in disallowed losses.

  2. Dividend reinvestment: Some brokerages auto-reinvest dividends. If VTI pays a dividend during your 30-day window and auto-reinvests, you’ve triggered a wash sale. I now turn off dividend reinvestment during tax-loss harvesting season.

  3. The “substantially identical” rabbit hole: I spent weeks researching whether VTI → SCHB was safe. Finally decided: just use VTI → VOO (Total Market → S&P 500). Different enough that no tax professional would question it, and I don’t lose sleep over audit risk.

Beancount Query I Run Weekly During Tax Season

-- Show all securities I currently hold that might trigger wash sales
SELECT account, security, position, substantially-identical
WHERE number > 0
ORDER BY security

This gives me a dashboard of “watch out for these securities” before making any trades.

Advice for Spouse Account Tracking

To answer your question about tracking spouse accounts: I track them in the same Beancount file, but I use account naming that makes ownership clear:

Assets:Brokerage:Fred:Taxable:VTI
Assets:Brokerage:Fred:IRA:VTI
Assets:Brokerage:Sarah:401k:TotalMarket
Assets:Brokerage:Sarah:IRA:VXUS

Then when I run wash sale checks, I use WHERE account LIKE '%VTI%' to catch BOTH of our accounts.

My spouse doesn’t use Beancount herself, but I set up a Fava view that she can check before making any investment changes in her 401k. Takes 5 seconds: “Am I allowed to buy this fund today, or is Fred harvesting losses?”

The bottom line: Beancount is perfect for wash sale tracking because you can see EVERYTHING in plain text. No hiding in proprietary software formats. If you’re disciplined about metadata tagging, you’ll never make the spouse-401k mistake again.

Hope this helps! Let me know if you want to see my full Beancount setup—happy to share the actual files.

Fred, as a CPA who has prepared hundreds of tax returns with wash sale issues, I want to echo what Tina and Mike have said and add some professional perspective on tax-loss harvesting best practices.

Why CPAs Cringe at DIY Tax-Loss Harvesting

I see wash sale violations in probably 30-40% of my clients who attempt tax-loss harvesting on their own. The most common mistakes:

  1. Not tracking spouse/household accounts (your exact situation)
  2. Forgetting about dividend reinvestments (Mike’s great point)
  3. Misunderstanding the 61-day window (30 before + 1 + 30 after)
  4. Getting too aggressive with “substantially identical” interpretations

The IRS is well aware that wash sales are under-reported. Most brokerage firms only track wash sales within the same account at the same institution—they’re not required to track across your household. That burden falls on YOU, the taxpayer.

Audit Risk & Documentation

Here’s what I tell my clients: If you can’t document it, don’t claim it.

When a client comes to me with tax-loss harvesting, I ask:

  • Show me your transaction history across ALL accounts (yours and spouse’s)
  • Show me proof no substantially identical purchases occurred in the 61-day window
  • Show me your methodology for determining “substantially identical”

If they can’t produce clear documentation, I won’t sign off on claiming the loss. The potential audit risk isn’t worth it.

Beancount is actually PERFECT for this because:

  • Every transaction is documented in plain text
  • Metadata provides audit trail
  • Queries can recreate your entire decision-making process
  • You can literally print the ledger and hand it to the IRS

I’ve had audits where the IRS challenges a wash sale calculation, and being able to show a complete Beancount ledger with metadata has ended the inquiry immediately. The auditor can see EXACTLY what you did and why.

My Professional Recommendation: Conservative Harvesting Strategy

Rather than trying to maximize every dollar of tax losses (and risking violations), I recommend a conservative approach:

Strategy 1: Asset Class Swaps (Safest)

  • Sell: US Total Market (VTI)
  • Buy: International Total Market (VXUS)
  • No ambiguity—completely different asset classes

Strategy 2: Index Swaps (Very Safe)

  • Sell: Total Market (VTI)
  • Buy: S&P 500 (VOO)
  • Different indexes, different holdings, defensible as not substantially identical

Strategy 3: Factor Swaps (Safe)

  • Sell: Total Market (VTI)
  • Buy: Value ETF (VTV) or Growth ETF (VUG)
  • Clearly different investment strategies

Strategy 4: Same Index Different Providers (RISKY)

  • Sell: VTI (Vanguard Total Market)
  • Buy: SCHB (Schwab Total Market)
  • Both track same index—I would NOT recommend this
  • If audited, you’ll have to argue they’re not substantially identical
  • IRS hasn’t ruled on this specifically, but the risk isn’t worth the hassle

Beancount Setup for Audit-Ready Tax-Loss Harvesting

I’ve worked with several clients to build Beancount systems for tax-loss harvesting. Here’s the structure I recommend:

1. Separate Account Trees by Tax Treatment

Assets:
  Taxable:
    Brokerage:
      VTI
      VOO
      Cash
  TaxDeferred:
    IRA-Traditional:
      VTI
      Cash
    IRA-Roth:
      VXUS
      Cash
  SpouseTaxDeferred:
    401k:
      TotalMarketFund
      Cash

This immediately shows which accounts have tax implications for harvesting.

2. Metadata Requirements for Each Harvest

When a client harvests losses, I require these metadata fields:

2025-12-15 * "Tax-loss harvest: VTI → VOO swap"
  Assets:Taxable:Brokerage:VTI  -1000 VTI @ 65.00 USD
  Assets:Taxable:Brokerage:Cash  65000 USD
  tax-strategy: "loss-harvest"
  security-sold: "VTI"
  cost-basis: "75000 USD"  ; Original purchase price
  realized-loss: "10000 USD"
  harvest-date: "2025-12-15"
  avoid-repurchase-until: "2026-01-16"
  replacement-security: "VOO"
  cpa-approved: "yes"  ; I literally have clients tag this

Then when the replacement is purchased:

2025-12-15 * "Buy replacement security for harvest"
  Assets:Taxable:Brokerage:VOO  +295 VOO @ 220.00 USD
  Assets:Taxable:Brokerage:Cash  -64900 USD
  tax-strategy: "harvest-replacement"
  replaces: "VTI"
  harvest-ref: "2025-12-15 VTI sale"

3. Year-End Reconciliation Query

Before filing taxes, I run this query for every client:

-- Show all harvests for tax year 2025
SELECT date, narration, realized-loss, security-sold, replacement-security
WHERE tax-strategy = 'loss-harvest'
  AND YEAR(date) = 2025
ORDER BY date

Then for each harvest, I verify:

-- Check for wash sale violations for specific security
SELECT date, account, position, number
WHERE security IN ('VTI', 'VTSAX', 'VTSMX')  -- All substantially identical
  AND date >= 2025-11-15  -- 30 days before harvest
  AND date <= 2026-01-15  -- 30 days after harvest
  AND number > 0  -- Only purchases

If ANY purchases show up, we have a problem to investigate.

Cost-Benefit Analysis

Here’s the math I share with clients:

Tax-loss harvesting savings:

  • $10k loss harvested
  • 24% federal + 5% state = 29% tax rate
  • Savings: $2,900

Risk of getting it wrong:

  • IRS audit (low probability but expensive)
  • Disallowed loss + penalties
  • CPA fees to resolve: $2,000-5,000
  • Stress and time: Priceless

My advice: Only harvest if the potential savings justify the compliance burden. For losses under $5k, I often tell clients “not worth the risk of errors.”

For losses over $10k (like yours), absolutely worth doing—but ONLY with proper documentation and conservative security swaps.

The Beancount Advantage for CPAs

I’m actually evangelizing Beancount to my CPA colleagues because it solves the biggest tax-season pain point: clients with incomplete records.

Every year, I get clients who:

  • Can’t remember when they bought/sold securities
  • Have missing cost basis information
  • Can’t track across multiple brokerages
  • Lost transaction history when switching providers

With Beancount:

  • Everything is documented in plain text (never loses formatting)
  • Historical records are permanent (not dependent on vendor)
  • Queries can recreate any tax calculation
  • Audit trail is built-in

I wish more of my clients used it.

Final Recommendation

Your Beancount setup is solid, Fred. I’d add just one thing: a year-end reconciliation process where you:

  1. Export all brokerage 1099-B forms
  2. Compare to your Beancount ledger
  3. Verify every wash sale adjustment matches your understanding
  4. Document any discrepancies

That way if there’s a mismatch between your Beancount records and the 1099-B, you catch it BEFORE filing, not after the IRS sends a notice.

Keep up the great work. Your $2k lesson will save you (and others reading this) far more in the long run.

Wow, thank you all for the incredibly detailed responses! This is exactly why I love the Beancount community—practical, experienced advice from people who’ve been in the trenches.

Implementing Your Suggestions

Based on your feedback, I’ve made several improvements to my Beancount wash sale tracking:

1. Added “substantially-identical” Metadata (Tina’s suggestion)

I went through all my holdings and added this tag:

2026-03-22 * "Track substantially identical securities"
  Assets:Brokerage:Taxable:VTI  0 VTI
  security: "VTI"
  substantially-identical: "VTI,VTSAX,VTSMX,VFIAX"

Now my queries catch ANY of these funds across all accounts, not just exact matches.

2. Created Spouse-Visible Fava Dashboard (Mike’s idea)

This was BRILLIANT. I set up a custom Fava query my spouse can check before making ANY 401k changes:

-- Show active wash sale restrictions
SELECT harvest-date, security-sold, avoid-repurchase-until
WHERE tax-strategy = 'loss-harvest'
  AND avoid-repurchase-until >= TODAY()
ORDER BY avoid-repurchase-until

She bookmarked it on her phone. Now before her quarterly 401k rebalancing, she checks: “Is Fred currently harvesting any of these?”

Takes 5 seconds, prevents $2k mistakes. :bullseye:

3. Conservative Security Swaps (Alice’s professional advice)

I’m abandoning my “VTI → SCHB might be okay” strategy. From now on:

My new wash sale swap pairs:

  • VTI (Total Market) ⟷ VOO (S&P 500)
  • VXUS (International) ⟷ VWO (Emerging Markets)
  • BND (Total Bond) ⟷ GOVT (Treasury-only)

Different enough that no CPA would question it, different enough that I sleep soundly during audit season.

4. 61-Day Bi-Directional Query (Tina’s critical point)

I created a Python script that checks BOTH directions before any harvest:

from datetime import datetime, timedelta
import subprocess

def check_wash_sale_window(security, sale_date):
    """Check 30 days before AND after sale date"""
    before_start = sale_date - timedelta(days=30)
    after_end = sale_date + timedelta(days=30)
    
    query = f"""
    SELECT date, account, number, position
    WHERE security = '{security}'
      AND date >= {before_start}
      AND date <= {after_end}
      AND number > 0
    """
    
    result = subprocess.run(['bean-query', 'main.beancount', query], 
                          capture_output=True, text=True)
    
    if result.stdout.strip():
        print(f"⚠️  WARNING: Purchases found in 61-day window!")
        print(result.stdout)
        return False
    else:
        print(f"✅ Clear to harvest {security}")
        return True

# Before selling:
check_wash_sale_window('VTI', datetime(2026, 1, 15))

This is now part of my pre-trade checklist. Won’t execute a harvest until this returns green.

5. Year-End Reconciliation Process (Alice’s recommendation)

I added a calendar reminder for January 31st each year:

Annual Wash Sale Reconciliation:

  1. Download all 1099-B forms from brokerages
  2. Run Beancount query for all harvests in previous tax year
  3. Compare Beancount records to 1099-B wash sale adjustments
  4. Investigate any discrepancies BEFORE tax filing

I did this for 2025 (even though I already filed), and discovered the brokerage correctly flagged my spouse-401k wash sale. At least their system caught it even though I didn’t!

Lessons Learned (Summary)

  1. Wash sales apply across ALL household accounts - spouse’s 401k, your IRA, everything
  2. It’s a 61-day window - 30 days BEFORE + sale date + 30 days AFTER
  3. “Substantially identical” has no clear IRS definition - be conservative
  4. Dividend reinvestment can trigger wash sales - turn it off during harvest season
  5. Beancount is perfect for this - plain text = audit trail = peace of mind
  6. Spouse coordination is essential - shared calendar + Fava dashboard

My Updated Workflow

Now when I spot a harvesting opportunity:

  1. :white_check_mark: Run 61-day bi-directional wash sale check
  2. :white_check_mark: Check spouse’s 401k auto-investment schedule
  3. :white_check_mark: Turn off dividend reinvestment on replacement security
  4. :white_check_mark: Execute harvest (sell VTI)
  5. :white_check_mark: Buy replacement security immediately (VOO, not SCHB)
  6. :white_check_mark: Set 31-day calendar block shared with spouse
  7. :white_check_mark: Add metadata to Beancount transactions
  8. :white_check_mark: Update Fava dashboard so spouse sees active restriction

Then 31+ days later:

  1. :white_check_mark: Run final wash sale check (verify no accidental purchases)
  2. :white_check_mark: Buy back VTI if desired
  3. :white_check_mark: Mark harvest as complete in Beancount

One More Thing: Tax Software Integration

For those using TurboTax/TaxAct: I export my Beancount capital gains to CSV and import directly into tax software. Format looks like this:

Date Acquired,Date Sold,Security,Proceeds,Cost Basis,Gain/Loss,Wash Sale Adj
2024-01-15,2025-12-15,VTI,65000,75000,-10000,10000

The “Wash Sale Adj” column = amount disallowed. In my case: $8,000 (the full loss).

This way my tax software matches my Beancount records matches my 1099-B. Triple-verified.

Thank You

Seriously, this discussion has been invaluable. I went from “I think I understand wash sales” to “I have a bulletproof system.”

If anyone wants my full Beancount wash sale tracking setup (metadata tags, queries, Python scripts), I’ll clean it up and post it to GitHub. Let me know if that would be useful!


For anyone new to tax-loss harvesting:

Don’t let my $2k mistake scare you off. Tax-loss harvesting is incredibly valuable for taxable accounts—I’ve saved tens of thousands over the years. Just:

  • Track EVERYTHING in Beancount
  • Be conservative with “substantially identical”
  • Check spouse accounts
  • Verify the 61-day window
  • Sleep soundly knowing you did it right