Quarterly report pursuant to Section 13 or 15(d)

Schedule of Repurchase Agreements by Maturity (Details)

v3.8.0.1
Schedule of Repurchase Agreements by Maturity (Details) - USD ($)
$ in Thousands
Mar. 31, 2018
Dec. 31, 2017
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 19,148,679 $ 19,451,207
Weighted average borrowing rate 1.96% 1.69%
US Government Agencies Debt Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 16,806,544 $ 17,325,553
Weighted average borrowing rate 1.78% 1.53%
Mortgage-backed Securities, Issued by Private Enterprises [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 2,031,011 $ 1,941,911
Weighted average borrowing rate 3.20% 2.98%
Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 61,124 $ 71,243
Weighted average borrowing rate 2.63% 2.15%
Servicing Contracts [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 250,000 $ 112,500
Weighted average borrowing rate 3.94% 3.78%
Maturity up to 30 days [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements $ 4,027,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 3,320,225 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 687,287 613,500
Maturity up to 30 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 19,720 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,901,328 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,471,788 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 413,786 261,835
Maturity 30 to 59 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 15,754 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,102,308 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 2,808,509 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 293,799 290,628
Maturity 60 to 89 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 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,111,798 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 1,925,898 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 185,900 332,614
Maturity 90 to 119 Days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 0 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 5,756,013 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 5,280,124 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 450,239 443,334
Maturity 120 to 364 days [Member] | Inverse Interest-Only Securities [Member]    
Assets Sold under Agreements to Repurchase [Line Items]    
Repurchase agreements 25,650 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 250,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 $ 250,000 $ 112,500