New twists in the Greek debt crisis led to a choppy day of trading on Tuesday, as a late turn left the stock market with a modest gain.
Greece and its creditors held talks in Brussels on Tuesday to discuss how to keep the country from falling out of the euro. Reports out late in the day said European officials considered providing Greece with emergency funding to help it avoid defaulting on its debts. Greece has little time left before its banks run out of cash.
“It's all Greece all the time,” said Burt White, chief investment officer at LPL Financial.
Major indexes drifted lower in early trading, then dropped further around midday, pushing the Standard & Poor's 500 index below a technical level watched by many traders, the index's average over the past 200 days. To many in the market it was a signal that stocks had fallen too far, so they jumped back in.
“These technical factors played a role today,” said Quincy Krosby, market strategist at Prudential Financial. “The other factor was that some of the language coming from European creditors suggested that, despite the differences, there appears to be strong political motivation to hammer out some sort of agreement with Greece.”
The Standard & Poor's 500 index rose 12.58 points, or 0.6 percent, to 2,081.34.
The Dow Jones industrial average climbed 93.33 points, or 0.5 percent, to 17,776.91, while the Nasdaq composite inched up 5.52 points, or 0.1 percent, to 4,997.46.
Major indexes in Europe finished broadly lower. Germany's DAX slid 2 percent and France's CAC-40 lost 2.3 percent. Britain's FTSE 100 dropped 1.6 percent.
The gains in the U.S. were led by utilities and makers of consumer staples, safe-play sectors investors tend to favor when they're fearful of market swings.
The basic materials sector was the only one of the 10 industries in the S&P 500 index to fall. Among individual stocks, Newmont Mining dropped $1.45, or 6.1 percent, to $22.41, the biggest decline in the index.
Mining stocks have taken a hit from plunging prices for metals as traders worry about global demand for basic materials. The price of copper has dropped 7 percent over the past two days.
White thinks that as quarterly earnings reports start to roll in over the coming weeks, investors will turn away from Greece to focus on the U.S. and its improving economy. That shift, he said, could help pull the stock market out of its recent rut.
The unofficial start to the second-quarter earnings season starts Wednesday afternoon when Alcoa turns in its results. Analysts forecast that companies in the S&P 500 will report that their overall profits dropped 4 percent in the quarter, according to S&P Capital IQ. White said he expects that those expectations will prove too pessimistic.
Markets in China extended their slump. The Shanghai Composite Index fell 1.3 percent, while Hong Kong's Hang Seng lost 1 percent. Tokyo's Nikkei 225 advanced 1.3 percent, and Seoul's Kospi lost 0.7 percent.
China's stock market has lost nearly 30 percent after hitting a peak in June. The government has responded with a slew of new emergency measures, but analysts argue that they can't keep prices up without some improvement in economic growth.
“China's leadership has doubled down on its efforts to prop up equity prices,” Mark Williams of Capital Economics wrote in a report. “There is a good chance that the market rescue efforts are seen to be a failure in a few months' time.”
In other trading on Tuesday, Horizon Pharma offered roughly $2 billion to buy Depomed, a rival pharmaceutical company, in a hostile bid. The Dublin-based company took the offer directly to shareholders after Depomed's executives reportedly refused to talk about a previous proposal. Horizon fell 68 cents, or 2 percent, to $33.86, while Depomed soared $7.98, or 39 percent, to $28.62.
U.S. government bond prices rose, pushing the yield on the 10-year Treasury note down to 2.25 percent from 2.29 percent late Monday.
Precious and industrial metals closed lower. Gold lost $20.60 to settle at $1,152.60 an ounce, silver slid eight cents to $14.95 an ounce. Copper lost 9 cents to $2.45 a pound.
The price of oil dropped slightly following news that the Energy Department increased its forecast for crude oil production in the U.S. Benchmark crude fell 20 cents to close at $52.33 a barrel on the New York Mercantile Exchange. Brent crude, the international benchmark, rose 31 cents to close at $56.85 a barrel in London.
In other futures trading on the NYMEX:
— Wholesale gasoline rose 2.5 cents to close at $1.949 a gallon.
— Heating oil rose 0.2 cent to close at $1.711 a gallon.
— Natural gas fell 4 cents to close at $2.716 per 1,000 cubic feet.