With capital gains, you pay taxes every time you win and get to write off $3,000 of losses if you have other income (like from interest).
So over 3 years if you make $250K and lose $4 million, you pay about $75K in taxes on a $3.5 million loss.
Yes I am aware of that as I was subject to it once when I lost $150,000 in a motorcycle shop that I once owned was only going to be able to write off $21,000 (3,000 over 7 yrs). That in my opinion is entirely unfair.
Fortunatly I was starting a new business and was able by keeping the other corporation active, and was able to transfer the losses to the new corp as management fees over a few years. But most people are not in that kind of position.