Chevron shares had some of the biggest gains, rising 5.1%. The Dow industrials rose 1.2%, and the S&P 500 added 0.6%.