What is the wash sale rule?
The wash sale rule disallows a capital loss deduction if you buy a "substantially identical" security within 30 days before or after the sale that generated the loss. The disallowed loss isn't gone permanently — it gets added to the cost basis of the replacement shares, deferring the loss to a future sale. The rule applies to stocks, bonds, and options but not to cryptocurrency (currently).