Are transactions entirely within a Roth account ever subject to wash sales?
Transactions totally within a Roth or Traditional IRA will not incur gains or losses...or any taxable event (other than UBTI issues) until money is withdrawn. As withdrawals from Roth IRAs are TAX FREE, wash Sales are not relevent for transactions entirely within a Roth IRA (or 401k).
A wash sale occurs when an individual sells or trades a security at a loss (in a taxable account), and within 30 days before or after this sale, buys a “substantially identical” stock or security, or acquires a contract or option to do so.
A wash sale also results if an individual sells a security and a loss and it is repurchased in any other account that is owned by the taxpayer, their spouse or even a company/entity by the individual buys a substantially equivalent security. So if you sold a security at a loss in a taxable brokerage account and then re-purchased a "substantial identical" security in another account (even a Roth IRA), you will be subject to wash sale rules.
When you have a wash sale, the loss is then disallowed (via Schedule D on your tax return) and the basis on that sold stock reverts to what it was before the sale.
The tax issues that come up with Unrelated Business Taxable Income (see UBTI discussed above) typically happen when your Investemnets are in a self-directed IRA and you hold non-traditional/non-publically traded securities or securities that utilize vehicles like futures contracts.
The wash sale rule applies to the tax-deductibility of a capital loss. Since transactions in an IRA are not subject to taxation, capital losses are not reported and cannot be claimed as offsets to gains realized elsewhere. But the answer to your question is tricky. If, in fact, a purchase in a ROTH or other IRA, is matched within 31 days of a sale, at a loss, in a taxable account owned by you, the loss can be disqualified.
Occasionally, those of us who have been doing this for a long time will hear about a tax strategy that is designed to create a loss without the taxpayer giving up on a favorite holding. It goes like this. 1. Buy a "hot" stock. 2. Watch the stock fall, in spite of the purported "hotness". 3. Sell the stock to lock in the loss for tax purposes. 4. Immediately, or shortly thereafter, buy the same stock in your IRA so you can keep waiting for it to recover. As you could probably guess, the IRS is wise to this strategy and routinely disqualifies the tax loss on the basis that the wash sale has been violated. A loss is only a loss to the taxpayer who claims it when the rule is followed by that same taxpayer.
Wash sale rules apply to all of your accounts across the board including your spouse's accounts. So if you sold a position in a taxable account to claim the loss but repurchased in an IRA or Roth IRA within 30 days before or after, the deduction is disallowed. This is because the IRS's stance is that there is no "substantial change in holdings" and you were doing just to claim the loss.
If you only purchased a particular security within an IRA or Roth IRA (not is a taxable account as well), then it really doesn't matter because there are no capital gains or losses inside IRAs and only distributions matter. With an Traditional IRA, it is taxable as income, and if a Roth with the 5 year rule being met and you are over 59 1/2, then it is a tax & penalty free distribution.
One thing I would like to add in taxable accounts regarding wash sales. Many believe that if you have a wash sale, then the loss is simply lost. No true. You simply cannot offset gains on other securities or use $3,000 against income if a net loss for the year. It simply is "netted' against the same security to give you a net net number once the security is sold the 2nd time. So if you had a gain the second time, the gain would be netted against the original loss.
I tried to keep this simple and in plain English without getting too technical. But if you want to see the actual IRS stance, see their 2008 Revenue Ruling 2008-5 that specifically addresses wash sale rules & IRAs.
Hope this helps and best of luck, Dan Stewart CFA®