Loading...

Prompting LLMs to Parse Brokerage 1099-B Wash Sale Discrepancies

Trading across multiple brokerage, retirement, and automated accounts complicates capital gains reporting. When you parse 1099-B wash sales with an LLM, you can evaluate transaction timing across institutions to find disallowed loss entries and cost-basis adjustments that individual brokers miss.

Image Description

A wash sale occurs when you sell a security at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale. Brokers flag these within their own systems (reported in Box 1g of Form 1099-B), but they have no visibility into trades you make in other brokerage accounts or an IRA.

Pre-Processing and Redacting Trade Exports

Never upload raw brokerage PDF statements showing your full name, account numbers, or Social Security numbers into a cloud LLM. Export or clean your trade history into a basic CSV file with these columns:

  • Date Acquired: The purchase date.
  • Date Sold: The sale date.
  • Ticker Symbol: The stock, bond, or fund ticker.
  • Cost Basis: The total buy price including fees.
  • Proceeds: The net sale proceeds.
  • Reported Disallowed Loss (Box 1g): The wash sale adjustment noted by that specific brokerage.

The Wash Sale Forensic Prompt

Set clear parameters for the model. Paste your sanitized transaction history into this prompt:

"You are an expert tax accounting analyst specializing in capital asset reconciliation. Below is a sanitized CSV table of realized stock transactions across two separate brokerage accounts. Review every sale that resulted in a capital loss. Determine whether a purchase of the same or substantially identical ticker occurred within the 61-day window (30 days prior to the sale date, the sale date itself, or 30 days following the sale date) across ANY of the provided accounts. Generate a table with: (1) Ticker, (2) Disallowed Loss Amount, (3) Cross-Account Trigger Event (Date and Account ID), (4) Adjusted Cost Basis to be Added to the Replacement Shares, and (5) Flagged Discrepancies where the broker’s 1099-B Box 1g failed to report the wash sale due to cross-institution trading. Present the underlying logic clearly for each flagged item. Here is the data: [PASTE SANITIZED CSV]"

Interpreting Discrepancies and Basis Adjustments

Focus on three main accounting points when reviewing the model's output:

  • Cross-account wash sales: If Account A sells an asset at a loss and Account B buys the same asset 12 days later, the model flags the loss in Account A to be added to the cost basis of the shares in Account B.
  • IRA wash sale traps: If the replacement purchase occurs inside an IRA, the disallowed loss cannot be added to the IRA's basis, permanently losing the tax deduction. The prompt flags these instances for review with an accountant.
  • Holding period carryover: The model checks whether the holding period from the original shares carries over to the replacement shares.

FAQ

Does this prompt replace tax preparation software?

No. This prompt organizes transactions and identifies possible cross-account issues before you enter figures into tax software or hand them to a CPA.

Can an LLM determine if two different ETFs are 'substantially identical'?

An LLM can compare index tracking and fund holdings, but whether two distinct ETFs are legally "substantially identical" depends on IRS rules and interpretation. Consult a tax professional on close calls.

Why didn't my broker catch the wash sale automatically?

Brokers are only required to track and report wash sales for transactions within the specific accounts they manage directly.

Key Takeaways

  • Analyzing trade data with an LLM helps find wash sales that occur across separate brokerage accounts.
  • Brokers do not share trade records; taxpayers must track cross-institution wash sales themselves.
  • Strip account numbers, names, and identifiers from trade files before processing them.
  • Wash sales triggered by purchases in an IRA permanently eliminate the tax deduction.
  • Use the output as an audit sheet to review alongside your tax preparer.

Related Reading

  • Using Local LLMs to Extract Clean Data from Trade Confirmations
  • Cleaning Unstructured Bank CSV Exports with Local Regex and Lightweight LLMs
  • How to Audit a 401(k) Fee and Expense Disclosure (404a-5) Statement

Tagsberulearning