(Reuters) - Mortgage insurer MGIC Investment Corp
Milwaukee, Wisconsin-based MGIC posted a net profit of $12.4 million, or 4 cents per share, in the second quarter, compared with a loss of $273.9 million, or $1.36 per share, a year earlier.
MGIC, along with the rest of the mortgage insurance industry, is still recovering after selling billions of dollars of policies at low prices during the housing boom.
The companies were stuck with huge losses when the market crashed, driving some to bankruptcy.
Excluding realized gains, MGIC's quarterly net profit was 3 cents per share. Analysts on average were expecting a loss of 15 cents per share, according to Thomson Reuters I/B/E/S.
Net premiums earned fell 2 percent to $237.8 million.
Mortgage insurance protects lenders in cases where homebuyers fall behind in their mortgage payments. MGIC's rivals include Radian Group Inc
Five years after the market meltdown, profit on new insurance are increasingly offsetting legacy losses.
New insurance written in the second quarter was $8 billion, up a third from $5.9 billion a year earlier.
MGIC's insurance losses incurred in the second quarter more than halved to $196.3 million, reflecting fewer new delinquencies reported during the quarter.
MGIC shares closed at $6.67 on the New York Stock Exchange on Monday. They have risen about a third in last three months, outperforming the broader S&P 500 Index <.INX>, which has risen about 9 percent in the same period.
(Reporting by Ashutosh Pandey in Bangalore; Editing by Robin Paxton)