A late rally led by energy companies pushed U.S. stock indexes higher Monday after the market flitted between small gains and losses for most of the day.
Stocks opened higher, then moved down, then back up as investors seemed unable to make up their minds. A pair of weak reports on the U.S. economy fed the uncertainty. Oil prices ended up surging for a third straight day, and stocks of big producers jumped. All 10 industry sectors in the Standard and Poor's 500 index rose.
Exxon Mobil rose 2.5 percent after reporting better-than-expected earnings. Chevron jumped 3.4 percent. Both companies are members of the Dow Jones industrial average.
The market got a lift in early trading after European markets climbed following reassuring comments from France on Greece's efforts to ease the terms of its financial rescue program.
At mid-morning Eastern time, a closely watched monthly report revealed that U.S. manufacturing expanded last month at the slowest pace in a year. Also, the Commerce Department reported that consumer spending edged lower in December as vehicle sales slowed and more Americans chose to save rather than spend.
The difference between the highest and lowest levels in the S&P 500 index was 2 percent for the day, more than twice the average move over the past two years.
“The market still hasn't found a comfort zone,” said Howard Silverblatt, senior index analyst at S&P Dow Jones Indices. “Volatility was so low for so long, we got used to it.”
The S&P 500 rose 25.86 points, or 1.3 percent, to 2,020.85. The Dow added 196.09 points, or 1.1 percent, to 17,361.04. The Nasdaq composite rose 41.45 points, or 0.9 percent, to 4,676.69
The price of benchmark U.S. oil has fallen more than 50 percent in the past seven months, threatening the profits of energy companies and unsettling investors.
Investors are also on edge after a Greek election that put the anti-austerity Syriza party into power. Also, prices are falling in Europe and China's economy, the world's second-largest, is slowing.
Adding to the concerns: A report Friday showing the U.S. economy grew at 2.6 percent annual rate in the fourth quarter, nearly half as fast as in the previous quarter and less than economists had expected.
“The U.S. has been able to chug along despite what's going on in the rest of the world,” market strategist Bill Strazzullo of Bell Curve Trading said after the factory report came out. “But now it looks like there is a bit of contagion.”
U.S. crude oil rose $1.33 to close at $49.57 a barrel in New York, its highest level in nearly a month. Traders bet that oil has bottomed out despite signs of rising inventories and a refinery strike that may shrink crude consumption. Brent crude, a benchmark for international oils used by many U.S. refineries, rose $1.76 to close at $54.75 a barrel in London.
Energy companies rose 3 percent, the biggest gain among the 10 sectors in the S&P 500. Among the big winners, Denbury Resources jumped 12 percent and Chesapeake Energy rose 7 percent.
Investors will turn their attention next to several big companies reporting this week, including United Parcel Service and Disney on Tuesday and General Motors on Wednesday.
With about half the companies in the S&P 500 index already out with their results, earnings for companies in the index are expected to have risen 2.2 percent in the fourth quarter, according to FactSet, a financial data provider. That is one of the smallest gains since the economic recovery began nearly six years ago.
The dollar rose to 117.60 yen from 117.43 yen Friday. The euro strengthened to $1.1344 from $1.1285.
U.S. government bond prices fell. The yield on the 10-year Treasury note rose to 1.67 percent. Gold edged down $2.30 to $1,276.90 an ounce, silver fell four cents to $17.25 an ounce and copper was flat at $2.49 a pound.
In other trading of energy futures on the NYMEX:
— Wholesale gasoline rose 6.6 cents to close at $1.545 a gallon.
— Heating oil rose 5.7 cents to close at $1.758 a gallon.