NEW YORK — The U.S. stock market climbed 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½ 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.39 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 global stocks tumbled.
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.



