Investments in Securities and Other Assets | INVESTMENTS IN SECURITIES The available-for-sale portfolio consisted of the following as of September 30, 2017 and December 31, 2016 (in thousands): September 30, 2017 Asset Type Amortized Cost Gross Unrealized Loss Gross Unrealized Gain Fair Value Fannie Mae Certificates Fixed Rate $ 8,543,463 $ (11,584 ) $ 59,758 $ 8,591,637 ARMs 284,260 (1,412 ) 1,355 284,203 Total Fannie Mae 8,827,723 (12,996 ) 61,113 8,875,840 Freddie Mac Certificates Fixed Rate 2,971,394 (9,150 ) 18,282 2,980,526 ARMs 204,953 (211 ) 784 205,526 Total Freddie Mac 3,176,347 (9,361 ) 19,066 3,186,052 Ginnie Mae Certificates Fixed Rate 1,614 (37 ) — 1,577 ARMs 28,668 — 390 29,058 Ginnie Mae Certificates - ARMs 30,282 (37 ) 390 30,635 Total Agency RMBS 12,034,352 (22,394 ) 80,569 12,092,527 U.S. Treasuries 1,019,028 (1,064 ) — 1,017,964 Total $ 13,053,380 $ (23,458 ) $ 80,569 $ 13,110,491 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 September 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 September 30, 2017 $ 3,669,574 $ (23,348 ) $ 24,878 $ (110 ) $ 3,694,452 $ (23,458 ) 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 September 30, 2017 and December 31, 2016 , according to their estimated remaining weighted-average maturity classifications: September 30, 2017 December 31, 2016 Fair Value Amortized Cost Fair Value Amortized Cost Less than one year $ 24,878 $ 24,988 $ — $ — Greater than one year through five years 6,801,743 6,763,508 3,765,037 3,744,614 Greater than five years through ten years 6,283,870 6,264,884 8,864,309 8,978,537 Greater than ten years — — 19,385 19,583 Total $ 13,110,491 $ 13,053,380 $ 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 September 30, 2017 and 2016 (in thousands): Three Months Ended September 30, Nine Months Ended September 30, 2017 2016 2017 2016 Available-for-sale investments, at cost $ 822,503 $ 7,041,173 $ 5,686,484 $ 13,846,416 Proceeds from sale of available-for-sale investments 817,288 7,059,328 5,595,394 13,902,132 Net realized gain (loss) on sale of available-for-sale investments $ (5,215 ) $ 18,155 (91,090 ) 55,716 Gross gain on sale of available-for-sale investments $ 220 $ 21,363 11,093 63,489 Gross (loss) on sale of available-for-sale investments (5,435 ) (3,208 ) (102,183 ) (7,773 ) Net realized gain (loss) on sale of available-for-sale investments $ (5,215 ) $ 18,155 $ (91,090 ) $ 55,716 The components of the carrying value of available-for-sale securities at September 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) September 30, 2017 December 31, 2016 Principal balance $ 12,684,568 $ 12,285,204 Unamortized premium 374,852 458,709 Unamortized discount (6,040 ) (1,179 ) Gross unrealized gains 80,569 46,906 Gross unrealized losses (23,458 ) (140,909 ) Fair value $ 13,110,491 $ 12,648,731 As of September 30, 2017 , the weighted-average coupon interest rate on the Company's Agency RMBS and U.S. Treasuries was 3.48% and 1.36% , 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 September 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 September 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. |