The Dow Jones industrial average ended 0.96 percent higher, with Caterpillar (>> Caterpillar Inc.) up 4.86 percent in its biggest one-day gain since October.

Oil prices edged up from 11-year lows although persistent global oversupply concerns and tepid demand for heating oil remained in what is likely to be the warmest winter on record. [O/R]

That modest improvement was enough to push the S&P energy sector <.SPNY> 1.22 percent higher. The sector has been the worst performer in 2015, falling about 24 percent so far this year. Chevron (>> Chevron Corporation) shares gained 1.15 percent.

The consumer staples index <.SPLRCS> rose 1.23 percent, with pharmacy operator CVS Health (>> CVS Health Corp) up 2.42 percent.

Some of Tuesday's gains were the result of last-minute tweaks by investment funds, said Ken Winans, president of Winans Investments in Novato, California.

In the absence of the gift of a sustained, late-year rally desired by many on Wall Street, the S&P 500 has lost 2 percent in December. It remains 1 percent lower for 2015 after hitting an all-time high in May and then plummeting in August over trouble in China's stock market.

"It would be a miracle to get the Dow and S&P to have December just be even at this point," Winans said.

Earlier on Tuesday the U.S. Commerce Department trimmed third-quarter economic growth to a 2 percent annual pace from the 2.1 percent estimated earlier.

The Dow Jones industrial average <.DJI> ended up 165.65 points at 17,417.27.

The S&P 500 <.SPX> gained 0.88 percent to 2,038.97 and the Nasdaq Composite <.IXIC> added 0.65 percent to 5,001.11.

Trading volumes are expected to be light for the rest of the week, with U.S. stock markets operating a shortened session on Thursday and closing on Friday for Christmas.

After the bell, shares of Micron Technology (>> Micron Technology, Inc.) dropped 2.9 percent after the chipmaker posted a disappointing first-quarter report.

During the trading session, Chipotle Mexican Grill (>> Chipotle Mexican Grill, Inc.) tumbled 5.25 percent after Federal authorities said they were investigating a new strain of E. coli linked to the burrito chain that markets itself as serving "food with integrity."

Ford (>> Ford Motor Company) jumped 3.42 percent after Automotive News reported that the automaker was in talks with Google to help build self-driving cars.

Advancing issues outnumbered decliners on the NYSE by 2,349 to 730. On the Nasdaq, 1,841 issues rose and 1,021 fell.

The S&P 500 index showed seven new 52-week highs and six new lows, while the Nasdaq recorded 37 new highs and 69 new lows.

Volume on the U.S. exchanges was 6.4 billion shares, compared to a 7.5 billion average over the last 20 trading days, according to Thomson Reuters data.

(Additional reporting by Abhiram Nandakumar and Ankur Banerjee in Bengaluru; Editing by Bernadette Baum and Meredith Mazzilli)

By Noel Randewich