If you have some poor performing stocks (unrealized capital losses) and you want to help recognize some of those losses against capital gains (securities that were sold for more than you paid for them), then it may be a prudent time to do this. You can offset $3,000 of capital losses against your ordinary income, if your losses exceed your capital gains. Great right?? If you don't want to buy those stocks back that you sold for a loss, then there's no problem. However, many of us like the companies and want to hold them for the long-term (more than a year), but we also want to help offset our income with a recognized loss.
The government knows this, which is why they setup a "wash-sale" rule. This rule basically says that if you want to recognize a gain, then you cannot buy that stock back immediately in order to do that. There is a 30 day window before and 30 days after you sell that stock that you cannot buy it, and still recognize that loss. There are some other caveats as well.
- You cannot buy options that protect you from a gain if that security you sold goes up.
- You also cannot buy shares in companies that are similar to the stock you sold (like buying Wells Fargo when you sold Bank of America).
- You cannot buy stock in the company you sold in another account, even if it's a tax exempt retirement account.
- When buying and selling bonds, you cannot buy another bond that has the same maturity date and interest rate of the bond you sold. Even though it's a completely different bond and company.