The wash-sale rule is an IRS policy that prohibits a taxpayer from deducting a tax deduction for securities sold in a wash sale. A wash sale happens when an individual sells or trades an asset at a loss and then buys a “substantially similar” stock or security, or gets a contract or option to do so, within 30 days before or after the sale.
When an individual sells a security and his or her spouse or a corporation owned by the individual buys nearly comparable security, the transaction is known as a wash sale.