NEW YORK (AP) — U.S. stocks edged higher Thursday, led by gains for energy companies as the price of oil stabilized following a big drop the day before.
Oil rose as negotiations with Iran over its nuclear program hit a snag. That could mean Iranian oil will continue to be held back from the international market by sanctions.
Investors were also assessing some mixed news on company earnings.
Drugstore chain Walgreens climbed after reporting earnings that surpassed the expectations of Wall Street analysts. The company also said it would expand a cost-cutting program. Alcoa and Bed, Bath & Beyond dropped after delivering earnings reports that disappointed investors.
For the first time in years, the outlook for earnings could prove to be more of a hindrance than a help to stock investors in coming weeks.
Companies in the S&P 500 are expected to report that average earnings per share shrank by 3.1 percent in the first quarter, according to S&P Capital IQ. If the forecast proves accurate, it will be the first time since 2009, when the U.S. economy was emerging from the Great Recession, that earnings have contracted.
"If the U.S. market is going to advance this year, it's going to need to advance mostly on the back of earnings," said Russ Koesterich, chief investment strategist at BlackRock. "The guidance going forward is going to be critical for the market."
The Standard & Poor's 500 index rose 9.28 points, or 0.5 percent, to 2,091.18. The Dow Jones industrial average rose 56.22 points, or 0.3 percent, to 17,958.73. The Nasdaq composite gained 23.74 points, or 0.5 percent, to 4,974.56.
After six years of gains, U.S. stocks have made only modest advances this year. A big slump in oil prices since June last year have hit profits at energy companies and a surge in the U.S. dollar is hurting multi-national corporations that have a lot of sales overseas. Investors are also unsettled by the prospect of the Federal Reserve's first interest rate increase after more than six years of near-zero rates.
While U.S. stocks have struggled to gain traction this year, markets in Europe have surged.
On Thursday, the Stoxx Europe 600, an index that tracks large and medium-sized companies in Europe, closed at a record 409.15, surpassing the previous record of 405.50 set in March, 2000 during the technology boom. Stocks in the region are getting a boost from a combination of European Central Bank stimulus, a weaker euro and low oil prices.
The index is up almost 20 percent this year. By contrast, the S&P 500 index is up 1.6 percent, so far.
Walgreens was one of the day's biggest gainers on the U.S. market.
The company's stock jumped $4.94, or 5.6 percent, to $92.62 after it earnings surpassed analysts' expectations. The drugstore chain said it will shutter about 200 U.S. stores as part of an expanded cost reduction push.
Alcoa was among the losers.
The company posted a first-quarter profit that beat Wall Street expectations, but its revenue fell short.
Alcoa is striving to transform itself from an aluminum maker into a supplier for the auto and aerospace industries, making it less sensitive to swings in commodity prices. Analysts were disappointed by the outlook for the company's rolled metal products, which include sheets used for drinks and food cans. Alcoa's stock dropped 46 cents, or 3.4 percent, to $13.21.
Bed Bath & Beyond also slumped after reporting earnings.
The results for the housewares retailer fell short of the expectations of Wall Street analysts. Its earnings outlook was also less than forecast. Wedbush analyst Seth Basham described the outlook as "somber" and said the company's profitability was being threatened more and more by online competition.
The stock dropped $4.22, or 5.4 percent, to $73.46.
In energy trading, benchmark U.S. crude rose 37 cents to close at $50.79 a barrel in New York. Brent crude, a benchmark for international oils used by many U.S. refineries, rose $1.02 to close at $56.57 in London.
U.S. government bond prices fell. The yield on the benchmark 10-year Treasury note edged up to 1.96 percent. The euro fell to $1.0661 versus $1.0797 on Wednesday. The dollar rose to 120.35 yen from 120.15 yen the day before.
Gold fell $9.50 to $1,193.60 an ounce, silver fell 28 cents to $16.18 an ounce and copper edged down less than a penny to $2.73 a pound.
In other energy trading on the NYMEX:
— Wholesale gasoline rose 2 cents to close at $1.759 a gallon.
— Heating oil fell 2.9 cents to close at $1.727 a gallon.
— Natural gas fell 9.1 cents to close at $2.528 per 1,000 cubic feet, the lowest since June of 2012.
AP Business Writer Carlo Piovano contributed to this report from London.