Earnings eroded, delinquency deteriorated and originations eased at PHH Mortgage. But year-over-year performance improved, and the mortgage servicing portfolio grew. As mortgage insurers are hit with a growing number of lawsuits and federal investigations over captive reinsurance arrangements, PHH disclosed that it terminated a mortgage reinsurance agreement at a loss.

Second-quarter mortgage loan closings came in 8 percent lower than production during the first quarter, according to earnings data released late Tuesday by PHH Corp. But fundings improved 32 percent from the second-quarter 2011.

Retail originations accounted for 86 percent of second-quarter volume, while the wholesale-correspondent channel generated 14 percent of new business.