Hovnanian’s headquarters, on Maple Avenue in Red Bank. (File photo. Click to enlarge)

After going one-for-22, Red Bank-based national homebuilder Hovnanian Enterprises racked up a second consecutive net gain in its most recent fiscal quarter, the company announced Thursday.

In posting a profit of $34.7 million in the quarter ended July 31, compared with a prior-year loss of $50.9 million, Hovnanian “recorded double-digit revenue growth and a jump in contracts, the latest sign of improvement in the housing market,” the Wall Street Journal reports.

Bloomberg News called it an “unexpected profit” that was driven also by tax benefits.

From Bloomberg:

Wall Street had been expecting a loss of 14 cents a share, according to the average estimate of 10 analysts in a Bloomberg survey.

Hovnanian has been purchasing land at distressed prices in an attempt to increase profit margins.

The “strategy of opening new, better-located communities is driving sales and generating greater operating leverage,” David Goldberg, an analyst with UBS, said in a note to clients.

Hovnanian had reported net losses in 21 of its last 22 quarters before eking out a $1.8 million profit in the second fiscal quarter of this year, ending in April.