Investments in Securities and Other Assets | INVESTMENTS IN SECURITIES The available-for-sale portfolio consisted of the following as of June 30, 2017 and December 31, 2016 (in thousands): June 30, 2017 Asset Type Amortized Cost Gross Unrealized Loss Gross Unrealized Gain Fair Value Fannie Mae Certificates Fixed Rate $ 8,986,881 $ (21,649 ) $ 41,581 $ 9,006,813 ARMs 243,346 (1,303 ) 1,413 243,456 Total Fannie Mae 9,230,227 (22,952 ) 42,994 9,250,269 Freddie Mac Certificates Fixed Rate 2,355,189 (11,091 ) 11,281 2,355,379 ARMs 67,314 (147 ) 482 67,649 Total Freddie Mac 2,422,503 (11,238 ) 11,763 2,423,028 Ginnie Mae Certificates Fixed Rate 1,745 (51 ) ā 1,694 ARMs 30,304 ā 401 30,705 Ginnie Mae Certificates - ARMs 32,049 (51 ) 401 32,399 Total Agency RMBS 11,684,779 (34,241 ) 55,158 11,705,696 U.S. Treasuries 24,984 (143 ) ā 24,841 Total $ 11,709,763 $ (34,384 ) $ 55,158 $ 11,730,537 December 31, 2016 Asset Type Amortized Cost Gross Unrealized Loss Gross Unrealized Gain Fair Value Fannie Mae Certificates Fixed Rate $ 9,505,262 $ (81,783 ) $ 36,622 $ 9,460,101 ARMs 301,029 (2,668 ) 1,571 299,932 Total Fannie Mae 9,806,291 (84,451 ) 38,193 9,760,033 Freddie Mac Certificates Fixed Rate 2,799,604 (55,624 ) 7,659 2,751,639 ARMs 50,641 (514 ) 606 50,733 Total Freddie Mac 2,850,245 (56,138 ) 8,265 2,802,372 Ginnie Mae Certificates Fixed Rate 1,856 (54 ) ā 1,802 ARMs 34,390 ā 448 34,838 Total Ginnie Mae 36,246 (54 ) 448 36,640 Total Agency RMBS 12,692,782 (140,643 ) 46,906 12,599,045 U.S. Treasuries 49,952 (266 ) ā 49,686 Total $ 12,742,734 $ (140,909 ) $ 46,906 $ 12,648,731 The following table presents the gross unrealized loss and fair values of our available-for-sale investments by length of time that such securities have been in a continuous unrealized loss position as of June 30, 2017 and December 31, 2016 (in thousands): Unrealized loss positions Less than 12 Months Greater than 12 months Total As of Fair value Unrealized loss Fair value Unrealized loss Fair value Unrealized loss June 30, 2017 $ 4,711,452 $ (34,384 ) $ ā $ ā $ 4,711,452 $ (34,384 ) December 31, 2016 9,264,265 (140,909 ) ā ā 9,264,265 (140,909 ) The following table summarizes the Companyās available-for-sale investments as of June 30, 2017 and December 31, 2016 , according to their estimated remaining weighted-average maturity classifications: June 30, 2017 December 31, 2016 Fair Value Amortized Cost Fair Value Amortized Cost Less than one year $ 24,841 $ 24,984 $ ā $ ā Greater than one year through five years 6,877,266 6,849,276 3,765,037 3,744,614 Greater than five years through ten years 4,828,430 4,835,503 8,864,309 8,978,537 Greater than ten years ā ā 19,385 19,583 Total $ 11,730,537 $ 11,709,763 $ 12,648,731 $ 12,742,734 The following table summarizes our net realized gain (loss) from the sale of available-for-sale investments for the three months ended June 30, 2017 and 2016 (in thousands): Three Months Ended June 30, Six Months Ended June 30, 2017 2016 2017 2016 Available-for-sale investments, at cost $ 1,265,490 $ 5,408,055 $ 4,863,982 $ 6,805,243 Proceeds from sale of available-for-sale investments 1,245,659 5,444,414 4,778,107 6,842,804 Net realized gain (loss) on sale of available-for-sale investments $ (19,831 ) $ 36,359 (85,875 ) 37,561 Gross gain on sale of available-for-sale investments $ 2,270 $ 36,743 10,873 42,126 Gross (loss) on sale of available-for-sale investments (22,101 ) (384 ) (96,748 ) (4,565 ) Net realized gain (loss) on sale of available-for-sale investments $ (19,831 ) $ 36,359 $ (85,875 ) $ 37,561 The components of the carrying value of available-for-sale securities at June 30, 2017 and December 31, 2016 are presented below. A premium purchase price is generally due to the average coupon interest rates on these investments being higher than prevailing market rates; similarly, a discount purchase price is generally due to the average coupon interest rate on these investments being lower than prevailing market rates. (in thousands) June 30, 2017 December 31, 2016 Principal balance $ 11,341,310 $ 12,285,204 Unamortized premium 368,542 458,709 Unamortized discount (89 ) (1,179 ) Gross unrealized gains 55,158 46,906 Gross unrealized losses (34,384 ) (140,909 ) Fair value $ 11,730,537 $ 12,648,731 As of June 30, 2017 , the weighted-average coupon interest rate on the Company's Agency RMBS and U.S. Treasuries was 3.46% and 0.63% , respectively. As of December 31, 2016 , the weighted-average coupon interest rate on the Company's Agency RMBS and U.S. Treasuries was 3.37% and 0.63% , respectively. Actual maturities of Agency RMBS are generally shorter than their stated contractual maturities (which range up to 30 years), because they are affected by the contractual lives of the underlying mortgages, periodic payments and principal prepayments. Credit Risk The Company believes it has minimal exposure to credit losses on its Debt Securities at June 30, 2017 and December 31, 2016 . Principal and interest payments on Agency RMBS are guaranteed by Freddie Mac and Fannie Mae, while principal and interest payments on Ginnie Mae RMBS and U.S. Treasuries are backed by the full faith and credit of the U.S. government. Since September 2008, both Freddie Mac and Fannie Mae have operated in the conservatorship of the U.S. government. As of June 30, 2017 , S&P maintained its AA+ rating for the U.S. government, while Fitch and Moody's rated the U.S. government AAA and Aaa, respectively. Since Fannie Mae and Freddie Mac are in U.S. government conservatorship, the implied credit ratings of Agency RMBS are similarly rated. |