Stocks got off to a good start Thursday and held onto their gains, carving out a modest increase for the second day in a row.
During a relatively slow week, stock investors drew encouragement from some positive news on the economy and housing. Improving earnings from Dollar Tree, Best Buy and other retailers also helped the market.
Major U.S. indexes appeared headed for a slight rise even before trading began. A survey from HSBC suggested a slowdown in China's economy was flattening, and May's reading on China's manufacturing sector was the best in five months.
"A revival in China is good for emerging markets, good for global growth and therefore good for stocks, and not so hot for bonds," said Krishna Memani, chief investment officer at Oppenheimer Funds.
Investors received more good news after the U.S. market opened. The Conference Board said its index of leading economic indicators posted a solid gain in April. The gauge, designed to predict the economy's future health, provided more evidence that growth strengthened after a severe winter slowed business.
A U.S. government report showing a rise in the number of people seeking unemployment benefits last week didn't dampen the market's rise. Nor did the latest sales data for previously occupied U.S. homes, which rose modestly on a monthly basis in April, but was down from a year earlier, according to the National Association of Realtors.
The Standard & Poor's 500 index rose 4.46 points, or 0.2 percent, to close at 1,892.49. The index is up 2.4 percent for the year.
The Dow Jones industrial average rose 10.02 points, or 0.1 percent, to end at 16,543.08. The Nasdaq composite index added 22.80 points, or 0.6 percent, to finish at 4,154.34.
The Dow and Nasdaq remain down slightly for 2014.
Small-company stocks also extended their prior-day rally, pushing the Russell 2000 index up 10.24 points, or 0.9 percent, to 1,113.87.
Major indexes have finished slightly higher in four of the last five trading days. The gains have nudged the S&P 500 index, which hit a high early last week, up 0.8 percent for this week.
Bond prices fell slightly Thursday. The yield on the 10-year Treasury note edged up to 2.55 percent from 2.54 percent late Wednesday.
Among the biggest variables influencing the markets this year have been uncertainty over when U.S. growth will accelerate and concern that China's growth is slowing.
The latest batch of economic and earnings data suggest the global economy is recovering, albeit slowly.
"I do expect us to see a continued recovery, but it's not going to be dramatic and therefore I don't look for any big dramatic moves in the market either," said Chris Gaffney, a senior market strategist at EverBank Wealth Management.
Several U.S. retailers had a good day.
Best Buy rose 87 cents, or 3.4 percent, to $26.22 after its earnings came in well ahead of what investors were looking for, while L Brands, which owns store brands such as Bath and Body Works and Victoria's Secret, rose 83 cents, or 1.5 percent, to $56.69.
A pickup in spending by shoppers at Dollar Tree helped boost the discount store operator's income in its latest quarter. Its stock gained $3.31, or 6.6 percent, to $53.31, the biggest gain in the S&P 500 index.
Sears Holdings reported a wider quarterly loss as sales slumped. Its shares were down for much of the day, but recovered by late afternoon. Sears rose $1.54, or 4.2 percent, to $38.10.
The latest home sales figures helped lift most of the major U.S. homebuilders. Beazer Homes USA led the pack, rising 90 cents, or nearly 5 percent, to $19.08. The government reports how new U.S. home sales fared in April on Friday.
Among other stocks in the news:
— China's No. 2 online retailer, JD.com, made its debut on the Nasdaq, beating Chinese rival Alibaba to American stock market. Its stock jumped $1.90, or 10 percent, to $20.90. The two other Chinese Internet firms didn't do as well. Online marketplace 58.com fell $3.44, or 8.2 percent, to $38.29, while Weibo sank $2.20, or 10.9 percent, to $18.05.
— Lorillard fell the most in the S&P 500 index following reports that the tobacco seller could tie up with Reynolds American, creating the country's second-largest producer. The stock sank $3.12, or 5 percent, to $59.51.