Selling these underperformers can offset investors’ capital gains taxes into year-end