The wash sale rule can be avoided by instead replacing a security with one that is similar, but not substantially identical to, the security that has been sold.
Example of the Wash Sale Rule
An investor buys 1,000 shares of Higgins Electric on October 1 for $25,000. On October 15, the value of the 1,000 shares has dropped to $20,000, so the investor sells all of the shares to realize a loss of $5,000 on her tax return. On October 28, she repurchases the 1,000 shares. In this case, the initial loss cannot be counted as a tax loss, since the shares were repurchased within such a short period of time.