Freddie Mac on Wednesday wrote down the value of those investments by $ 1 billion and set aside $ 2.5 billion for losses from soaring delinquencies and foreclosures while posting a loss of $ 821 million for the quarter .