KB Home  (KBH - Get Report)  was upgraded to outperform from sector perform at RBC Capital Markets and the firm increased its price target on the homebuilder by $5 to $30.

KB Home shares rose 2.5% to $27.47 in trading Thursday.

Analyst Mike Dahl cited an improvement in the company's pricing dynamics, saying that more pricing power will lead to better margins in the second half of the year for KB Home.

The stock gained Monday, against the trend, following an upgrade from Barclays analyst Matthew Bouley. The analyst said the stock's multiple does not yet reflect a stabilizing housing market.

Housing starts in April in the U.S. rose 5.7%, more than expected, to a seasonally adjusted annual rate of 1.235 million units last month, the Commerce Department said. Data for March was revised up to show homebuilding rising to a pace of 1.168 million units, instead of falling to a rate of 1.139 million units as previously reported.

Homebuilder stocks have been rising, with the SPDR S&P Homebuilders ETF  (XHB - Get Report)  up 22% year to date. KB Home has gained 38% so far in 2019.