You can only write off a small amount per year in losses, so if your loss is big, I'd wait to do it until you have a big year of gains so you can limit tax exposure.