The IRS defines a wash sale as a sale of stock or securities at a loss within 30 days before or after you buy or acquire in a fully taxable trade, or acquire a contract or option to buy, substantially identical stock or securities.
A wash sale occurs if you realize a loss on the sale of the security and then buy a "substantially identical" replacement within the 61-day period, and the loss is deferred until the replacement shares are sold. In addition, the holding period of the original shares is added to the holding period of the newly acquired shares or securities, and constitutes the "Holding Period Date" for wash sales.
Please note: The wash sale period is counted from the date in which you realize the loss and is not limited to the lot of shares being closed.
For additional information on: Wash Sales, please visit the MEXEM website.