Stock markets end the day up after hitting low points