The U.S. stock market climbed on Monday as China's currency steadied and optimism among homebuilders rose.
Investors pushed the market lower at the open, then began buying after an index of homebuilders showed optimism at its highest since the housing boom a decade ago. Gains were modest, but broad as nine of the 10 industry groups of the Standard & Poor's 500 index ended the day higher, led by health care stocks.
"This continues to be a resilient market," said Henry Smith, chief investment officer at Haverford Trust. "The averages came back."
Global news was mixed. The Chinese yuan barely changed, which was a relief to investors rattled last week by a drop of as much as 3 percent in the currency after its surprise devaluation. Oil prices, meanwhile, fell below $42 a barrel for the first time in 6-1/2 years, and investors reacted by dumping stocks of drillers and other energy-related companies.
The S&P 500 ended the day up 10.90 points, or 0.5 percent, to 2,102.44. The Dow Jones industrial average rose 67.78 points, or 0.4 percent, to 17,545.18. The Nasdaq composite climbed 43.46 points, or 0.9 percent, to 5,091.70.
The gains for the S&P 500 pushed the index to roughly where it was a week earlier, before stocks around the world tumbled on the Chinese news.
Bill Strazzullo, chief market strategist at Bell Curve Trading, said trading on Monday fits a recent pattern of investors toughing it out in the face of scary headlines.
"We've weathered Greece, we've weathered the slowdown in China, we've weather trouble in our own economy and yet we're in spitting distance of all-time highs," he said. "People are still bullish."
Investors are hoping for good results from retail earnings reports this week, including Wal-Mart and Home Depot on Tuesday, Target and Lowe's on Wednesday, and Gap on Thursday. Overall, S&P 500 earnings per share are expected to be flat in the second quarter from a year earlier, the worst results in nearly six years, according to research firm S&P Capital IQ.
In economic news, a report showed manufacturing activity in New York state contracted in August at the fastest pace since the Great Recession.
Among other companies making big moves:
— Zulily, a company that offers flash sales online, soared 49 percent after QVC-owner Liberty Interactive offered to buy it for $2.32 billion. The stock rose $6.17 to $18.74.
— Lennar jumped $1.40, or 2.7 percent, to $53.94 after the National Association of Home Builders/Wells Fargo index showed builder sentiment rose this month to the highest level since November 2005.
— Estee Lauder's stock slid the most in the S&P 500 after the company fell short of revenue forecasts. Its outlook in future quarters also disappointed. The stock dropped $6.02, or 6.8 percent, to $82.80.
In Japan, the Nikkei rose after government data showed Asia's second-biggest economy contracted 1.6 percent in the April-June quarter because of bad weather and slowing China demand. But those trends raised hopes of fresh stimulus. Prime Minister Shinzo Abe has championed a huge monetary easing program aimed at kick-starting economic growth.
In oil trading, U.S. crude fell 63 cents to close at $41.87 on the contraction in Japan, the world's third-largest oil consumer. Brent crude, a benchmark for international oils used by many U.S. refineries, fell 45 cents to close at $48.74.
In foreign exchange markets, the dollar bought 6.394 Chinese yuan and the euro was flat at $1.1081. In Japan, the dollar held steady at 124.41 yen.
Gold futures edged up $5.70 to $1,118.60 an ounce. Silver rose 8.5 cents to $15.298 an ounce. Copper slipped 3.2 cents to $2.333 a pound
Prices of U.S. government bonds rose, tugging down the yield on the 10-year Treasury note to 2.17 percent from 2.20 percent late Friday.
In other futures trading on the NYMEX:
— Wholesale gasoline fell 3.3 cents to close at $1.654 a gallon.
— Heating oil fell 0.3 cents to close at $1.555 a gallon.