Higher costs dampened mortgage lenders' profitability, outweighing near-term gains in origination volume and per-loan revenue during the third quarter.

Independent mortgage bankers and mortgage subsidiaries of chartered banks averaged a net gain of $929 on originations during the quarter. This was down from $1,122 in the second quarter, according to the Mortgage Bankers Association.

Average company originations during the period rose slightly to $569 million from $526 million in the second quarter of 2017.

"Despite rising average production volume, production expenses grew to $8,060 per loan — the second highest level reported since the inception of our study in the third quarter of 2008," said Marina Walsh, MBA's vice president of industry analysis, in a press release.

"Production revenues remained relatively flat, with a minimal uptick in per-loan production revenues resulting from higher loan balance," she added.

Total production revenue increased to $8,990 per loan from $8,896 in the second quarter. During the third quarter a year ago, production revenue averaged $8,742 per loan.

Loan production expenses overall jumped nearly 4% to $8,060 per unit, from $7,774 in the second quarter. Expenses include commissions, compensation, occupancy, and equipment, as well as other production expenses and corporate allocations.

Those costs also were higher than they were during the third quarter last year, when lenders spent $6,969 to originate a loan. Lenders' expenses peaked in the first quarter of last year when they were $8,887 per loan.

The net gain per loan is weaker than it was during the third quarter a year ago, when the average per-loan profit was $1,773.

Profitability is under more pressure this year due to the market's shift toward purchase loans, which are more expensive to produce.