This move can trim or erase a tax bill if you had to sell stocks at a loss this year