Let's say I buy some stock. Two weeks later it pays a dividend which is reinvested in fractional shares of the stock. The next day I sell all shares at a loss. Would this be considered a wash sale? This page suggests not, but I've found sources that say otherwise. If I had dividend reinvestment enabled but want to sell multiple positions soon, how can I avoid wash sale rules (other than not selling at a loss)?
You sold all shares? The potential wash sale effect goes away after 30 days from the dividend date. Selling all shares of a stock where a wash existed effectively negates the wash and you can take the loss.
I was not able to find any authority for the opinion you suggest. Wash sale rules should, IMHO, apply.
According to the regulations, you attribute the newly purchased shares to the oldest sold shares for the purposes of the calculation of the disallowed loss and cost basis.
(c) Where the amount of stock or securities acquired within the 61-day period is less than the amount of stock or securities sold or otherwise disposed of, then the particular shares of stock or securities the loss from the sale or other disposition of which is not deductible shall be those with which the stock or securities acquired are matched in accordance with the following rule: The stock or securities acquired will be matched in accordance with the order of their acquisition (beginning with the earliest acquisition) with an equal number of the shares of stock or securities sold or otherwise disposed of.
You can resort to the claim that you have not, in fact, entered into the contract within 30 days, but when you gave the instructions to reinvest dividends. I don't know if such a claim will hold, but to me it sounds reasonable. This is similar to the rules re short sales (in (g) there). In this case, wash sale rules will not apply (unless you instructed to reinvest dividends within the 30 days prior to the sale). But I'd ask a tax professional if such a claim would hold, talk to a EA/CPA licensed in your state.