Quarterly report pursuant to Section 13 or 15(d)

Schedule of Repurchase Agreements by Maturity (Details)

v3.10.0.1
Schedule of Repurchase Agreements by Maturity (Details) - USD ($)
$ in Thousands
Jun. 30, 2018
Dec. 31, 2017
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 17,205,823 $ 19,451,207
Weighted average borrowing rate 2.34% 1.69%
US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 14,522,266 $ 17,325,553
Weighted average borrowing rate 2.10% 1.53%
Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 2,326,311 $ 1,941,911
Weighted average borrowing rate 3.56% 2.98%
Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 57,246 $ 71,243
Weighted average borrowing rate 2.99% 2.15%
Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 300,000 $ 112,500
Weighted average borrowing rate 4.26% 3.78%
Maturity up to 30 days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 2,852,232 $ 4,269,464
Maturity up to 30 days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,338,208 3,634,541
Maturity up to 30 days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 505,679 613,500
Maturity up to 30 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 8,345 21,423
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,614,199 3,831,111
Maturity 30 to 59 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,084,712 3,522,256
Maturity 30 to 59 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 501,212 261,835
Maturity 30 to 59 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 28,275 47,020
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,897,423 3,458,940
Maturity 60 to 89 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 3,744,082 3,165,834
Maturity 60 to 89 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 151,313 290,628
Maturity 60 to 89 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,028 2,478
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,736,102 2,452,426
Maturity 90 to 119 Days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,517,056 2,119,490
Maturity 90 to 119 Days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 210,103 332,614
Maturity 90 to 119 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 8,943 322
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 3,805,867 5,326,766
Maturity 120 to 364 days [Member] | US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 2,838,208 4,883,432
Maturity 120 to 364 days [Member] | Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 958,004 443,334
Maturity 120 to 364 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 9,655 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 300,000 112,500
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 $ 300,000 $ 112,500