XML 65 R51.htm IDEA: XBRL DOCUMENT
v3.7.0.1

Investment Securities - Schedule of Investment Securities (Details) - USD ($) $ in Thousands | Dec. 31, 2015 | Dec. 31, 2016
--- | --- | ---
Available-for-sale Securities [Abstract] |  |  |  |
Derivative, Notional Amount | $ 8,429,964 |  | $ 8,100,257 |
Investment Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 2,773,111 |  | 2,513,294 |
Unamortized Premium/(Discount) | 5,936 |  | 5,672 |
Available-for-sale Securities, Amortized Cost Basis | 2,779,047 |  | 2,518,966 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 6,891 |  | 6,362 |
Available-for-sale Securities, Unrealized Losses | (10,913) |  | (9,477) |
Available-for-sale Securities, Fair Value Disclosure | 2,775,025 |  | 2,515,851 |
Trading Securities [Abstract] |  |  |  |
Trading, at fair value | 491 |  | 0 |
Marketable Securities [Abstract] |  |  |  |
Marketable Securities Unpaid Principal Balance | 2,775,322 |  | 2,513,294 |
Marketable Securities, Amortized Cost | 2,781,258 |  | 2,518,966 |
Marketable Securities, Unrealized Gains | 6,891 |  | 6,362 |
Marketable Securities, Unrealized Losses | (12,633) |  | (9,477) |
Marketable Securities | 2,775,516 |  | 2,515,851 |
USDA Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-sale Securities, Fair Value Disclosure | 1,888,344 |  | 0 |
Trading Securities [Abstract] |  |  |  |
Trading, at fair value | 28,975 |  | 20,388 |
Marketable Securities [Abstract] |  |  |  |
Marketable Securities | 1,917,319 |  | 2,029,613 |
Available-for-sale Securities [Member] | Investment Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 5,936 |  | 5,672 |
Floating Interest Rate [Member] | Floating rate auction-rate certificates backed by Government guaranteed student loans |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 46,500 |  | 19,700 |
Available-for-sale Securities, Amortized Cost Basis | 46,500 |  | 19,700 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 |  | 0 |
Available-for-sale Securities, Unrealized Losses | (1,576) |  | (1,970) |
Available-for-sale Securities, Fair Value Disclosure | 44,924 |  | 17,730 |
Floating Interest Rate [Member] | Asset-backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 74,744 |  | 44,442 |
Available-for-sale Securities, Amortized Cost Basis | 74,491 |  | 44,240 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 14 |  | 1 |
Available-for-sale Securities, Unrealized Losses | (776) |  | (390) |
Available-for-sale Securities, Fair Value Disclosure | 73,729 |  | 43,851 |
Trading Securities [Abstract] |  |  |  |
Trading Securities - Amount Outstanding | 2,211 |  |  |
Trading Securities, Debt, Amortized Cost | 2,211 |  | 0 |
Trading Securities, Unrealized Gains | 0 |  |  |
Trading Securities, Unrealized Losses | (1,720) |  |  |
Trading, at fair value | 491 |  | 0 |
Floating Interest Rate [Member] | Corporate Debt Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 10,000 |  | 10,000 |
Available-for-sale Securities, Amortized Cost Basis | 10,000 |  | 10,000 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 |  | 41 |
Available-for-sale Securities, Unrealized Losses | (9) |  | 0 |
Available-for-sale Securities, Fair Value Disclosure | 9,991 |  | 10,041 |
Floating Interest Rate [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 1,353,495 |  | 1,359,700 |
Available-for-sale Securities, Amortized Cost Basis | 1,357,010 |  | 1,362,527 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 2,768 |  | 1,768 |
Available-for-sale Securities, Unrealized Losses | (4,319) |  | (3,266) |
Available-for-sale Securities, Fair Value Disclosure | 1,355,459 |  | 1,361,029 |
Floating Interest Rate [Member] | Subordinated Debt [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 70,000 |  | 70,000 |
Available-for-sale Securities, Amortized Cost Basis | 70,000 |  | 70,000 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 |  | 0 |
Available-for-sale Securities, Unrealized Losses | (3,751) |  | (3,047) |
Available-for-sale Securities, Fair Value Disclosure | 66,249 |  | 66,953 |
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Floating rate auction-rate certificates backed by Government guaranteed student loans |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 0 |  | 0 |
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Asset-backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | (253) |  | (202) |
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Corporate Debt Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 0 |  | 0 |
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 3,515 |  | 2,827 |
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Subordinated Debt [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 0 |  | 0 |
Floating Interest Rate [Member] | Trading Securities [Member] | Asset-backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 0 |  |  |
Fixed Interest Rate [Member] | Corporate Debt Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 10,000 |  |  |
Available-for-sale Securities, Amortized Cost Basis | 9,999 |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 |  |  |
Available-for-sale Securities, Unrealized Losses | (5) |  |  |
Available-for-sale Securities, Fair Value Disclosure | 9,994 |  |  |
Fixed Interest Rate [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 692 | [1] | 538 |
Available-for-sale Securities, Amortized Cost Basis | 3,809 | [1] | 3,120 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 4,095 | [1] | 4,505 |
Available-for-sale Securities, Unrealized Losses | 0 | [1] | 0 |
Available-for-sale Securities, Fair Value Disclosure | 7,904 | [1] | 7,625 | [2]
Derivative, Notional Amount | 148,500 |  | 146,100 |
Fixed Interest Rate [Member] | USDA Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 214,000 |  | 187,295 |
Available-for-sale Securities, Amortized Cost Basis | 213,975 |  | 187,401 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 12 |  | 0 |
Available-for-sale Securities, Unrealized Losses | 0 |  | (268) |
Available-for-sale Securities, Fair Value Disclosure | 213,987 |  | 187,133 |
Fixed Interest Rate [Member] | US Treasury Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 993,680 |  | 821,619 |
Available-for-sale Securities, Amortized Cost Basis | 993,263 |  | 821,978 |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 2 |  | 47 |
Available-for-sale Securities, Unrealized Losses | (477) |  | (536) |
Available-for-sale Securities, Fair Value Disclosure | 992,788 |  | 821,489 |
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | Corporate Debt Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | (1) |  |  |
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | 3,117 | [1] | 2,582 |
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | USDA Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | (25) |  | 106 |
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | US Treasury Securities [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | (417) |  | 359 |
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | Interest-Only-Strip [Member] |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |
Unamortized Premium/(Discount) | $ 7,200 |  | $ 7,000 |
[1] | Fair value includes $7.2 million of an interest-only security with a notional amount of $148.5 million.
[2] | Fair value includes $7.0 million of an interest-only security with a notional amount of $146.1 million.

X
- Definition Available-for-Sale Securities Unpaid Principal Balance + References No definition available. + Details
Name: | agm_AvailableforSaleSecuritiesUnpaidPrincipalBalance
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Marketable Securities, Amortized Cost Basis + References No definition available. + Details
Name: | agm_MarketableSecuritiesAmortizedCostBasis
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Marketable Securities, Gross Unrealized Gains + References No definition available. + Details
Name: | agm_MarketableSecuritiesGrossUnrealizedGains
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Marketable Securities, Gross Unrealized Losses + References No definition available. + Details
Name: | agm_MarketableSecuritiesGrossUnrealizedLosses
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Marketable Securities Unpaid Principal Balance + References No definition available. + Details
Name: | agm_MarketableSecuritiesUnpaidPrincipalBalance
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Trading Securities - Amount Outstanding + References No definition available. + Details
Name: | agm_TradingSecuritiesAmountOutstanding
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Aggregate notional amount specified by the derivative(s). Expressed as an absolute value. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher SEC -Name Regulation S-X (SX) -Number 210 -Article 12 -Section 13 -Sentence Column B + Details
Name: | invest_DerivativeNotionalAmount
Namespace Prefix: | invest_
Data Type: | xbrli:monetaryItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount before tax of unrealized gain in accumulated other comprehensive income (AOCI) on investments in debt securities classified as available-for-sale. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27161-111563 + Details
Name: | us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount before tax of unrealized loss in accumulated other comprehensive income (AOCI) on investments in debt securities classified as available-for-sale. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27161-111563 + Details
Name: | us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of investment in debt and equity securities categorized neither as held-to-maturity nor trading. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 25 -Paragraph 1 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=65884222&loc=d3e22054-111558 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 5 -Subparagraph (aa) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27232-111563 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 45 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=66010992&loc=d3e26610-111562 + Details
Name: | us-gaap_AvailableForSaleSecurities
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- References No definition available. + Details
Name: | us-gaap_AvailableForSaleSecuritiesAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition This item represents the cost of debt and equity securities, which are categorized neither as held-to-maturity nor trading, net of adjustments including accretion, amortization, collection of cash, previous other-than-temporary impairments recognized in earnings (less any cumulative-effect adjustments recognized, as defined), and fair value hedge accounting adjustments, if any. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.2) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_AvailableForSaleSecuritiesAmortizedCost
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount, after accumulated amortization, of debt discount (premium). + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 4 -URI http://asc.fasb.org/extlink&oid=64930785&loc=d3e28567-108399 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 1A -URI http://asc.fasb.org/extlink&oid=64930785&loc=d3e28541-108399 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 55 -Paragraph 8 -URI http://asc.fasb.org/extlink&oid=64930739&loc=d3e28878-108400 Reference 4: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=64930785&loc=d3e28551-108399 Reference 5: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 3 -URI http://asc.fasb.org/extlink&oid=64930785&loc=d3e28555-108399 + Details
Name: | us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Total debt and equity financial instruments including: (1) securities held-to-maturity, (2) trading securities, and (3) securities available-for-sale. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 5 -Subparagraph (d) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27232-111563 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27161-111563 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 942 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-03.4) -URI http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878 + Details
Name: | us-gaap_MarketableSecurities
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- References No definition available. + Details
Name: | us-gaap_MarketableSecuritiesAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of investments in debt and equity securities and other forms of securities that provide ownership interests classified as trading. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 45 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=66010992&loc=d3e26626-111562 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 942 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-03.4) -URI http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 45 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=66010992&loc=d3e26610-111562 Reference 4: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Glossary Trading Securities -URI http://asc.fasb.org/extlink&oid=6526789 + Details
Name: | us-gaap_TradingSecurities
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- References No definition available. + Details
Name: | us-gaap_TradingSecuritiesAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amortized cost of investments in debt securities classified as trading. + References No definition available. + Details
Name: | us-gaap_TradingSecuritiesDebtAmortizedCost
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of unrealized holding gain before loss recognized in the income statement for investments in trading securities. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 225 -SubTopic 10 -Section S99 -Paragraph 2 -Subparagraph (SX 210.5-03.7(c)) -URI http://asc.fasb.org/extlink&oid=63488584&loc=d3e20235-122688 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 35 -Paragraph 1 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=27723805&loc=d3e24584-111560 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 9 -Subparagraph (e) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27357-111563 + Details
Name: | us-gaap_TradingSecuritiesUnrealizedHoldingGain
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of unrealized holding loss before gain recognized in the income statement for investments in trading securities. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 35 -Paragraph 1 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=27723805&loc=d3e24584-111560 Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 225 -SubTopic 10 -Section S99 -Paragraph 2 -Subparagraph (SX 210.5-03.7(c)) -URI http://asc.fasb.org/extlink&oid=63488584&loc=d3e20235-122688 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Glossary Trading Securities -URI http://asc.fasb.org/extlink&oid=6526789 Reference 4: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 9 -Subparagraph (e) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27357-111563 + Details
Name: | us-gaap_TradingSecuritiesUnrealizedHoldingLoss
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_DebtSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_USGovernmentAgenciesDebtSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_GainLossOnInvestmentsByCategoryAxis=us-gaap_AvailableforsaleSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ProductOrServiceAxis=agm_FloatingInterestRateMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_AuctionRateSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_AssetBackedSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_CorporateDebtSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_MortgageBackedSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_SubordinatedDebtMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_GainLossOnInvestmentsByCategoryAxis=us-gaap_TradingAccountAssetsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ProductOrServiceAxis=agm_FixedInterestRateMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_USTreasurySecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_InterestOnlyStripMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |