NEW YORK (AP) — Shares of homebuilders rose Thursday as an analyst maintained an optimistic view on a recovery in the housing market.

The stocks shrugged off a decline in the broader market, as the S&P 500 slipped 1.4 percent to 1,662 in afternoon trading. Analyst Jay McCanless said around 836,000 new homes are expected to be started this year, and starts will climb over the next few years as unemployment decreases.

"We anticipate the current housing recovery should peak in 2015 with total housing starts of 1.3 to 1.4 million that year," he said. McCanless says Ryland Group Inc. and Meritage Homes Corp. are his top picks in the sector. He rates both stocks at "Buy," and also has that rating on shares of DR Horton Inc. and PulteGroup Inc. He rates shares of Beazer Homes USA Inc., KB Home, Lennar Corp. and M.D.C. Holdings Inc. "Neutral" and has an "Underperform" rating on Toll Brothers Inc. shares.

Shares of Ryland Group rose $1.29, or 3.7 percent, to $36.09 but Meritage stock slipped 39 cents to $40.67.

Elsewhere, DR Horton shares climbed 84 cents, or 4.6 percent, to $18.93 and KB Home shares added 66 cents, or 4 percent, to $17.01. Lennar shares gained $1.26, or 4 percent, to $32.92 and PulteGroup stock advanced 51 cents, or 3.4 percent, to $15.62. Toll Brothers stock traded up 72 cents, or 2.3 percent, to $31.98, while M.D.C. shares picked up $1.07, or 3.7 percent, to $30.08. Hovnanian Enterprises Inc. stock ticked up 8 cents to $5.27.