Almost the only good thing about investing in cryptocurrencies in 2018 was the tax break.

These assets have been crushed this year. Bitcoin’s price, for example, has fallen from about $15,000 to about $4,000.

The U.S. tax code provides a measure of relief by allowing investors to use such losses to offset taxes on winners, either now or...