Under Internal Revenue Service rules, you cannot deduct losses from sales or trades of stock or securities in a wash sale.
A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you also:
* Buy substantially identical stock or securities,
* Acquire substantially identical stock or securities in a fully taxable trade, or
* Acquire a contract or option to buy substantially identical stock or securities.
For more information about wash sales, see IRS Publication 550, "Investment Income and Expenses (Including Capital Gains and Losses)." https://www.irs.gov/pub/irs-pdf/p550.pdf.
Notes about what the IRS considers Substantially Identical can be found on page 59 of IRS Publication 550, linked above.