Sun Life Financial Inc. (TSX:SLF) returned to a fourth-quarter profit, after posting losses a year earlier, as it improved the performance of its investments.

The company, which is the third-largest insurance firm in Canada, reported after stock markets closed that it earned $395 million, or 65 cents per share, in the three months ended Dec. 31, 2012.

The results compared to a loss of $525 million, or 90 cents per share, a year ago when it booked some major charges.

Operating earnings, which excludes items that the company believes are not ongoing, came in at 76 cents per share, outdoing analyst expectations of 63 cents per share, according to a poll by Thomson Reuters.

Revenues were $4.25 billion, which came in short of analyst predictions of $5.95 billion, and were lower than the $5.37 billion reported a year earlier.

“It was a transformational year for Sun Life as we significantly reduced our risk profile and made important strides in implementing our four pillar growth strategy,” president and CEO Dean Connor said in the earnings release.

For the year, Sun Life posted earnings of $1.55 billion compared to a loss of $370 million a year earlier. Revenue was down to $17.56 billion from $19.83 billion.

Toronto-based Sun Life has been shifting its focus in recent months as it continues to face low interest rates which have affected its quarterly results.

In January, the company teamed with Khazanah Nasional Berhad to purchase 98 per cent of a Malaysian life insurance company from its two current owners, which include British insurance group Aviva PLC.

It has also planned to grow its U.S. group insurance and asset management businesses after selling the more volatile variable annuity life insurance unit in December for US$1.35 billion to Delaware Life Holdings.

For the quarter, Sun Life’s Canadian business reported higher profits of $143 million from $38 million a year earlier.

The U.S. operations improved profits to $202 million from a loss of $601 million in the same period of 2011. The company’s division in Asia posted earnings of $50 million from $38 million.

A year ago, the company faced a $635 million charge on the value of its variable annuity and segregated fund insurance contracts, partially due to the insurer’s decision to exit from individual insurance products in the United States, which had caused it to suffer a deep financial loss.

One of the attractions of variable annuity products to investors is that they offer a minimum rate of return guaranteed, which can cost the insurer when markets are underperforming.

The combination of a market downturn with a substantial increase in the amount of capital required by regulators, has made variable annuities less attractive.

Sun Life employs about 16,000 people, including 7,000 in Canada, and has insurance, wealth management and mutual fund operations around the world.

Shares of the company closed up by 25 cents to $30 on the Toronto Stock Exchange before the earnings announcement.