After enduring years of losses, Federal Home Loan Mortgage Corp (OTC:FMCC) reported a $2.9 billion third quarter profit on Tuesday. This compares to the $4.4 billion loss from the previous year.

Also, with the quarterly profit, it represents the fourth straight quarterly rise for the company, after a $3 billion net income in the second quarter. Some of this has been attributed to the stabilization of home prices, a greater demand for homes with the low inventory available, along with the Federal National Mortgage Association (OTC:FNMA) raising standards for mortgage credits in the last four years.

freddie mac

Freddie said on Tuesday that through the month of September, home prices increased 4.3% from the previous year. This is the greatest  year-over-year rise in six years.

The increasing home prices are giving Freddie’s bottom lines a jump, as the company now incurs less losses on homes that enter the foreclosure process. According to the Wall Street Journal, in the third quarter, Freddie lost approximately 36 cents for every $1 of debt on foreclosed homes, as compared to 42 cents in the previous year. This rise was especially notable in challenged Arizona, where the company had lost 36 cents on every $1 it had foreclosed on; this compared to last year’s 49 cents.

In a statement by Donald Layton, chief executive of Freddie Mac, he said via the Wall Street Journal that the company’s improved performance “was driven by favorable market conditions, including the continued improvement in the housing market, as well as our ongoing efforts to minimize losses on our legacy book.”

Also on Tuesday, the company said that it will pay the U.S. Treasury a $1.8 billion dividend payment. The agency took over siblings  Freddie and Fannie four years ago through a conservatorship. Now, with its payment to the Treasury, it is the second consecutive straight quarter that Freddie didn’t need any government assistance, reported the Wall Street Journal.

In addition, through September 30, Freddie Mac has paid $21.9 billion in cash dividends. This represents 31 percent of its total draws received from the agency, according to Reuters.

Beginning in 2013, the Treasury will take as a dividend payment, the entirety of the companies’ profits. Currently, the companies pay a 10% dividend on the senior preferred shares that the government had taken over as it bailed out the two. Even in quarters that included losses, the companies still made the payments.

The dividend payments come after the two companies took $187 billion in aid from the U.S. Treasury, giving back $47 billion of dividends; taxpayers were hit with a $140 billion loss.

As for Fannie, it had not reported its third-quarter numbers, but in the second quarter it saw a $5.1 billion profit.