Ambac , hit in recent quarters by losses from securities linked to risky mortgage-backed debt, had posted net losses in the three previous quarters.
But more recently investors have cheered the company as it tries to negotiate its way out of contracts tied to mortgage debt. Its shares rose 12.8 percent on Tuesday and were up another 12.1 percent at $5.30 in Wednesday premarket trading.
Ambac, which guarantees bond payments in the event of default, posted second-quarter net income of $823.1 million, or $2.80 a share, up from $173 million, or $1.67 a share, a year earlier.
The results included $2.18 a share in net investment gains and accelerated earnings from refunds.
Excluding net security gains and impairment losses, Ambac posted a loss of $1.53 a share, wider than the 65 cents analysts were expecting, according to Reuters Estimates.
Ambac said it was able to release $339.3 million from reserves it had earlier set aside for claims.
The company also recorded mark-to-market gains of $961.6 million on credit derivatives, but estimated impairment losses in this portfolio totaled $1.06 billion during the quarter, primarily due to credit deterioration and internal downgrades on several transactions.