The stock market closed slightly higher on Thursday as gains for utilities and financial stocks were largely offset by losses in energy and materials companies.
Kroger jumped after reporting better-than-expected earnings that were boosted in part by lower fuel costs. Joy Global, a manufacturer of mining equipment, fell sharply after it said that the worldwide plunge in commodity prices was hurting its business.
Investors got some positive news on the global economy early in the day as the European Central Bank upgraded its growth forecast for the eurozone this year to 1.5 percent from 1 percent. ECB President Mario Draghi also said that the bank's planned 1 trillion euro ($1.1 trillion) stimulus program will start on March 9.
Even though gains for stocks have slowed this week, major indexes remain close to record levels after a strong surge in February.
Despite steady gains in recent years, stocks remain attractive because interest rates are still close to historic lows, while company earnings are inching higher, said Scott Keifer, a global investment specialist at JPMorgan Private Bank.
"Fundamentally, things are still good," he said. "We think this is an environment of global growth that's good, but not great."
The Standard & Poor's 500 index rose 2.51 points, or 0.1 percent, to 2,101.04. The Dow Jones industrial average gained 38.82 points, or 0.2 percent, to 18,135.72. The Nasdaq composite climbed 15.67 points, or 0.3 percent, to 4,982.81.
On Thursday, health care stocks got a boost from some merger news. The sector was one of the hottest for acquisitions last year, and that trend that looks set to continue in 2015.
Pharmacyclics jumped after AbbVie said it would acquire the company for about $21 billion. It's AbbVie's first attempt at a major deal since walking away from a $55 billion takeover of Shire last fall.
Pharmacyclics rose $23.74, or 10.3 percent, to $254.22, while AbbVie's stock fell $3.41, or 5.7 percent, to $56.86.
Investors also got some news on hiring.
The number of people seeking unemployment benefits rose last week to the highest level since May, though the pace of applications remains at a level consistent with steady hiring, the Labor Department said.
The government will publish its monthly jobs report Friday. Economists expect it to show that the U.S. added 240,000 jobs in February after adding 257,000 jobs in January.
Investors will also be watching for signs of wage growth. In January, average hourly wage rose 12 cents to $24.75, a jump of 0.5 percent, the sharpest since 2008.
Further signs of strength in the labor market may prompt investors to bring forward their expectations for the timing of the Federal reserve's first rate increase in almost a decade. Currently, investors expect the Federal Reserve to raise rates by October, at the latest.
In individual stock trading, Kroger jumped $4.66, or 6.7 percent, to $74.31, after it reported better results than analysts were expecting. The company attributed the strong earnings to better fuel margins and a lower inventory charge. The retailer also released a better outlook than analysts were expecting.
Joy Global, a manufacturer of mining equipment, was one of the day's biggest losers.
The stock slumped $2.19, or 5.2 percent, to $39.94 after the company said a worldwide slump in commodity prices continues to hurt its business. The decline was the biggest in the S&P 500.
In energy trading, the price of U.S. oil fell Thursday on a stronger dollar, which makes oil, which is priced in dollars around the world, more expensive to holders of foreign currency.
Benchmark U.S. crude fell 77 cents to close at $50.76 a barrel in New York. Brent crude, a benchmark for international oils used by many U.S. refineries, fell 7 cents to close at $60.48 in London.
U.S. government bond prices rose. The yield on the 10-year Treasury note fell to 2.11 percent from 2.12 percent on Wednesday. The dollar gained against the euro, pushing the currency down to $1.1018. The dollar rose to 120.14 Japanese yen.
Precious and industrial metals futures ended mostly lower. Gold fell $4.70 to $1,196.20 an ounce, silver was unchanged at $16.16 an ounce and copper edged down less than a penny to $2.65 a pound.
In other futures trading on the NYMEX:
Wholesale gasoline fell 3.9 cents to close at $1.887 a gallon.
Heating oil fell 2.4 cents to close at $1.877 a gallon.
Natural gas rose 7.2 cents to close at $2.841 per 1,000 cubic feet.