Here’s what to do if you have a loss on an investment