PHH Corp. will exit the private-label mortgage origination business entirely by the first quarter of 2018, the company announced in its third-quarter earnings. It is taking this action after losing Merrill Lynch as a client.

Furthermore, the company is selling its $14.8 billion Ginnie Mae mortgage servicing rights portfolio to Lakeview Loan Servicing at a slight premium to book value, with expected proceeds of $122 million, the company said in its third-quarter earnings release. This portfolio has a fair market value of $104 million.

PHH lost $27 million during the quarter, which included a $13 million negative fair value adjustment to its mortgage servicing rights portfolio. This is an improvement over a $50 million loss posted for the third quarter of 2015.

In addition, PHH is considering "additional sales of our remaining MSR portfolio and to evaluate the best course of action for our real estate and servicing platforms, which we expect to complete by the end of January 2017," President and CEO Glen Messina said in a press release.

PHH's loss is because of a continued reduction in origination volume from Merrill Lynch, which is moving the business to its parent company, Bank of America, plus lower revenue and higher expenses related to its owned-servicing asset.

The private-label origination business accounted for 78% of PHH's closed loan volume of $28.3 billion for the first nine months of the year.

The origination business had a $22 million profit, compared with a $10 million loss for the third quarter of 2015. The exit from third-party originations during the second quarter was a net positive as PHH had a lower cost to acquire loans, which in turn improved its gain on loans held for sale.

PHH's servicing business lost $52 million, an improvement over the $77 million loss one year ago. The company saw a $9 million increase in net revenue and a $16 million decrease in total expenses. As of Sept. 30, it serviced $227.9 million. However by the end of the fourth quarter, it will lose 47% of its subservicing (based on dollar volume) as both HSBC and Merrill Lynch remove their servicing business.

PHH took an $11 million provision for its legal reserves during the quarter. It is working on a settlement with the New York Department of Financial Services based on findings from the Multistate Mortgage Committee regulatory examination.

An agreement in principal has been reached with NYDFS, but the agency has not executed the final consent order, PHH said.

As for the financial effects of PHH's legal victory over the Consumer Financial Protection Bureau, there was no impact to PHH's results as its recorded reserves were substantially less than the $109 million fine CFPB Director Richard Cordray was looking to impose.