Freddie Mac's net income jumped to $4.8 billion in the fourth quarter, more than double what it earned a quarter earlier, while yearly earnings were also higher, the government-sponsored enterprise announced Thursday.

The solid earnings were driven primarily by market-related gains resulting from higher longer-term interest rates, Freddie said. Executives said the performance showed that Freddie, whose 2016 earnings rose 22% to $7.8 billion, was a "transformed company."

The loan guarantee business is "growing and flourishing as new products and capabilities are helping customers do business with us," said Donald Layton, the CEO of Freddie, in a conference call with reporters.

The enterprise also benefited from higher single-family and multifamily guarantee fee income in 2016. Single-family loan purchases totaled $393 billion in 2016, up 12% from 2015, primarily driven by refinancings. Freddie also purchased a "record" $56.8 billion in multifamily loans during the year, a 20% increase from 2015.

Overall, the single-family mortgage business generated $6.1 billion in fee income in 2016, up from $5.2 billion in 2015, while the multifamily business generated $1 billion in guarantee fee income in 2016, nearly unchanged from 2015.

The GSE also benefited from a big swing in derivative values, posting a $274 million loss for all of 2016 compared to a $2.7 billion loss in 2015.