Mega private mortgage insurer Radian Group (RDN) write its second-highest quarterly volume of new insurance since its inception, fueled by a robust housing market and few loan defaults.

However, the impressive new mortgage insurance written results wasn’t enough to offset the company’s quarterly loss compared with a profit a year earlier given the significant amount of loss on investments.

Radian wrote mortgage insurance of $13.7 billion in the third quarter, up from $13.4 billion in the second quarter and also up from $10.6 billion last year.

“The high-quality business written after 2008, which represents 57% of our primary risk in force, is expected to generate attractive returns and position Radian for a return to sustained profitability,” explained Radian CEO S.A. Ibrahim.

 The primary mortgage insurance delinquency rate fell 7.8% in the quarter, down from 12.6%, signaling a decline in loan defaults.

Additionally, the total number of primary delinquent loans decreased by 17% for the quarter, and also down 31% from a year earlier.

The Home Affordable Refinance Program accounted for $1.8 billion of issuance not included in Radian’s new mortgage insurance written total for the quarter. This compares to $2.4 billion from the previous quarter and $2.7 million from the prior year.

Of the $13.7 billion of new business written in the third quarter, 71% was written with monthly premiums and 29% with single premiums.

Additionally, new mortgage insurance written continued to consist of loan with ‘excellent risk characteristics.’

The mortgage insurer reported a net loss of $12.7 million for the quarter, compared with a net profit of $14.3 million from the previous year.

The results include $7.1 million of losses on investments compared with a net gain of $84.7 million from last year.