Section 1091 of IRC defines wash sales. A wash sale occurs when you sell or trade stock or securities at a loss, and within 30 days before or after the sale you:
Broker-issued Form 1099-Bs for securities provide cost-basis reporting information, but they don’t provide taxpayers everything they need for tax reporting if the taxpayer has multiple trading accounts or trades equities and equity options.
Brokers calculate wash sales based on identical positions (an exact symbol only) per separate brokerage account. But the wash sale loss rules for taxpayers, Section 1091, requires taxpayers to calculate wash sales based on substantially identical positions (between equities and equity options and equity options at different exercise dates) across all their individual accounts including IRAs — even Roth IRAs.
The best accounting solution for generating a correct and compliant Form 8949 is trade accounting software that’s compliant with Section 1091. Don’t just rely on a Form 1099-B (exception: if there is only one brokerage account, the trading is only in equities, not equity options and there are no cost-basis adjustments including wash sale losses).
Many tax preparers and taxpayers continue to disregard Section 1091 rules, even after acknowledging differences with broker 1099-B rules.