Annual report pursuant to Section 13 and 15(d)

Schedule of Repurchase Agreements by Maturity (Details)

v3.8.0.1
Schedule of Repurchase Agreements by Maturity (Details) - USD ($)
$ in Thousands
Dec. 31, 2017
Dec. 31, 2016
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 19,451,207 $ 8,865,184
Weighted average borrowing rate 1.69% 1.22%
US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 17,325,553 $ 7,336,922
Weighted average borrowing rate 1.53% 0.94%
Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 1,941,911 $ 1,426,026
Weighted average borrowing rate 2.98% 2.60%
Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 71,243 $ 102,236
Weighted average borrowing rate 2.15% 1.69%
Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 112,500 $ 0
Weighted average borrowing rate 3.78% 0.00%
Maturity up to 30 days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 4,269,464 $ 3,231,112
Maturity up to 30 days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,634,541 2,511,773
Maturity up to 30 days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 613,500 688,667
Maturity up to 30 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 21,423 30,672
Maturity up to 30 days [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity 30 to 59 Days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,831,111 2,181,392
Maturity 30 to 59 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,522,256 1,786,664
Maturity 30 to 59 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 261,835 326,471
Maturity 30 to 59 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 47,020 68,257
Maturity 30 to 59 Days [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity 60 to 89 Days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,458,940 1,128,394
Maturity 60 to 89 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,165,834 1,035,806
Maturity 60 to 89 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 290,628 89,281
Maturity 60 to 89 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,478 3,307
Maturity 60 to 89 Days [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity 90 to 119 Days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,452,426 1,444,056
Maturity 90 to 119 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,119,490 1,192,127
Maturity 90 to 119 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 332,614 251,929
Maturity 90 to 119 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 322 0
Maturity 90 to 119 Days [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity 120 to 364 days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 5,326,766 880,230
Maturity 120 to 364 days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 4,883,432 810,552
Maturity 120 to 364 days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 443,334 69,678
Maturity 120 to 364 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity 120 to 364 days [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity Over One Year [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 112,500 0
Maturity Over One Year [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity Over One Year [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity Over One Year [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 0
Maturity Over One Year [Member] | Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 112,500 $ 0