Boosted by a healthy 34% leap in revenue, Hovnanian (HOV) surprised Wall Street on Wednesday by logging a profit in the second quarter, sending the home builder’s shares surging 20%.

Combined with a bullish analyst report on home builders, the news helped drive the sector solidly higher in morning action. 

Red Bank, N.J.-based Hovnanian said it earned $1.8 million, or 2 cents a share, last quarter, compared with a loss of $72.7 million, or 69 cents a share, a year earlier. The profit blew away forecasts from analysts for a loss of 32 cents a share.

Revenue jumped 33.9% to $341.7 million, easily trumping the Street’s view of $298.99 million.

Home building gross margins expanded to 17.4% from 14.8% the year before.

Hovnanian said net contracts soared 52% year-over-year to 1,775 homes. The company’s backlog of contracts leaped 48% to 2,298 homes with a sales value of $762.8 million. Deliveries increased 25% to 1,207 homes.

“The sales improvements we have experienced are fairly wide-based in terms of geography, price points and buyer profiles,” CEO Ara Hovnanian said in a statement. “We are encouraged that the homebuilding industry may be entering the early stages of a recovery.”

Hovnanian said April marked the company’s strongest month of sales per community of any month since the spring of 2006, excluding a September 2007 sales promotion.

Shares of Hovnanian surged on the upbeat results, recently trading up 19.41% to $2.03. The latest rally leaves them up 40% so far this year, compared with just 3% for the S&P 500.

Other home builders also enjoyed solid gains after Credit Suisse (CS) upgraded PulteGroup (PHM) and Ryland (RYL) to “outperform” from “neutral.”

Follow Matt Egan on Twitter @MattMEgan5