How Losses Can Turn into Tax Savings