XML 66 R52.htm IDEA: XBRL DOCUMENT
v3.8.0.1

Investment Securities - Schedule of Investment Securities (Details) $ in Thousands | Dec. 31, 2017 USD ($) position | Dec. 31, 2016 USD ($) position
--- | --- | ---
Schedule of Available-for-sale and Trading Securities [Line Items] |  |
Available-for-sale, Securities in Unrealized Loss Positions, Qualitative Disclosure, Number of Positions | position | 91 | 97
Available-for-sale Securities [Abstract] |  |
Derivative, Notional Amount | $ 8,860,296 | $ 8,100,257
Investment Securities [Member] |  |
Schedule of Available-for-sale and Trading Securities [Line Items] |  |
Available-for-sale, Securities in Unrealized Loss Positions, Qualitative Disclosure, Number of Positions, Greater than or Equal to One Year | position | 51 | 36
Available-for-sale securities in a loss position for more than 12 months, qualitative disclosure, percent of amortized cost | 99.50% |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance | $ 2,214,588 | $ 2,513,294
Unamortized Premium/(Discount) | 2,365 | 5,672
Available-for-sale Securities, Amortized Cost Basis | 2,216,953 | 2,518,966
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 4,467 | 6,362
Available-for-sale Securities, Unrealized Losses | (6,015) | (9,477)
Available-for-sale Securities, Fair Value Disclosure | 2,215,405 | 2,515,851
Marketable Securities [Abstract] |  |
Marketable Securities Unpaid Principal Balance | 2,259,620 | 2,513,294
Marketable Securities, Amortized Cost | 2,261,985 | 2,518,966
Marketable Securities, Unrealized Gains | 4,999 | 6,362
Marketable Securities, Unrealized Losses | (6,015) | (9,477)
Marketable Securities | 2,260,969 |
Marketable Securities | 2,260,437 | 2,515,851
USDA Securities [Member] |  |
Marketable Securities [Abstract] |  |
Marketable Securities | 2,131,365 | 2,029,613
Available-for-sale Securities [Member] | Investment Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | 2,365 | 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 | 19,700 | 19,700
Available-for-sale Securities, Amortized Cost Basis | 19,700 | 19,700
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 | 0
Available-for-sale Securities, Unrealized Losses | (886) | (1,970)
Available-for-sale Securities, Fair Value Disclosure | 18,814 | 17,730
Floating Interest Rate [Member] | Asset-backed Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance | 34,462 | 44,442
Available-for-sale Securities, Amortized Cost Basis | 34,308 | 44,240
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 22 | 1
Available-for-sale Securities, Unrealized Losses | (120) | (390)
Available-for-sale Securities, Fair Value Disclosure | 34,210 | 43,851
Floating 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 |  | 10,000
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 41
Available-for-sale Securities, Unrealized Losses |  | 0
Available-for-sale Securities, Fair Value Disclosure |  | 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,289,123 | 1,359,700
Available-for-sale Securities, Amortized Cost Basis | 1,291,340 | 1,362,527
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 2,215 | 1,768
Available-for-sale Securities, Unrealized Losses | (3,368) | (3,266)
Available-for-sale Securities, Fair Value Disclosure | 1,290,187 | 1,361,029
Floating Interest Rate [Member] | Subordinated Debt [Member] |  |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance |  | 70,000
Available-for-sale Securities, Amortized Cost Basis |  | 70,000
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 0
Available-for-sale Securities, Unrealized Losses |  | (3,047)
Available-for-sale Securities, Fair Value Disclosure |  | 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) | (154) | (202)
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Corporate Debt Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) |  | 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) | 2,217 | 2,827
Floating Interest Rate [Member] | Available-for-sale Securities [Member] | Subordinated Debt [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) |  | 0
Fixed Interest Rate [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance | 451 | 538
Available-for-sale Securities, Amortized Cost Basis | 2,589 | 3,120
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 2,230 | 4,505
Available-for-sale Securities, Unrealized Losses | 0 | 0
Available-for-sale Securities, Fair Value Disclosure | 4,819 | 7,625
Derivative, Notional Amount | 143,700 | 146,100
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 45,032 |
Held to Maturity; Unrealized Holding Gains | 532 |
Held-to-maturity Securities, Accumulated Unrecognized Holding Loss | 0 |
Held-to-maturity Securities, Fair Value | 45,564 |
Held-to-Maturity Unpaid Principal Balance | 45,032 |
Fixed Interest Rate [Member] | USDA Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance | 100,000 | 187,295
Available-for-sale Securities, Amortized Cost Basis | 100,000 | 187,401
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 | 0
Available-for-sale Securities, Unrealized Losses | (49) | (268)
Available-for-sale Securities, Fair Value Disclosure | 99,951 | 187,133
Fixed Interest Rate [Member] | US Treasury Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Available-for-Sale Securities Unpaid Principal Balance | 770,852 | 821,619
Available-for-sale Securities, Amortized Cost Basis | 769,016 | 821,978
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 0 | 47
Available-for-sale Securities, Unrealized Losses | (1,592) | (536)
Available-for-sale Securities, Fair Value Disclosure | 767,424 | 821,489
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | 2,138 | 2,582
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | USDA Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | 0 | 106
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | US Treasury Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | (1,836) | 359
Fixed Interest Rate [Member] | Available-for-sale Securities [Member] | Interest-Only-Strip [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | 4,300 | $ 7,000
Fixed Interest Rate [Member] | Held-to-maturity Securities [Member] | Government/GSE Guaranteed Mortgage Backed Securities [Member] |  |
Available-for-sale Securities [Abstract] |  |
Unamortized Premium/(Discount) | $ 0 |

X
- Definition Available-for-sale securities in a loss position for more than 12 months, qualitative disclosure, percent of amortized cost + References No definition available. + Details
Name: | agm_AvailableForSaleSecuritiesInLossPositionForMoreThan12MonthsQualitativeDisclosurePercentOfAmortizedCost
Namespace Prefix: | agm_
Data Type: | num:percentItemType
Balance Type: | na
Period Type: | instant

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 Held-to-Maturity Unpaid Principal Balance + References No definition available. + Details
Name: | agm_HeldtoMaturityUnpaidPrincipalBalance
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 Schedule of Available-for-sale and Trading Securities [Line Items] + References No definition available. + Details
Name: | agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems
Namespace Prefix: | agm_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

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=82897076&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=82897076&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=75030427&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=82897076&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=82896770&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 of debt and equity financial instruments classified as either held-to-maturity or available-for-sale. + References No definition available. + Details
Name: | us-gaap_AvailableForSaleSecuritiesAndHeldToMaturitySecurities
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Number of investment positions in available-for-sale investments in a continuous unrealized loss position for which an other-than-temporary impairment (OTTI) has not been recognized in the income statement. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 6 -Subparagraph (b)(3) -URI http://asc.fasb.org/extlink&oid=82897076&loc=d3e27290-111563 + Details
Name: | us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | instant

X
- Definition Number of investment positions in available-for-sale investments that have been in a continuous unrealized loss position for greater than or equal to a year for which an other-than-temporary impairment (OTTI) has not been recognized in the income statement. + References No definition available. + Details
Name: | us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear
Namespace Prefix: | us-gaap_
Data Type: | xbrli:integerItemType
Balance Type: | na
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 Amount of accumulated unrealized gain on investments in debt securities classified as held-to-maturity. + 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 (b) -URI http://asc.fasb.org/extlink&oid=82897076&loc=d3e27232-111563 + Details
Name: | us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of accumulated unrealized loss on investments in debt securities classified as held-to-maturity. + 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 (c) -URI http://asc.fasb.org/extlink&oid=82897076&loc=d3e27232-111563 + Details
Name: | us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount before other than temporary impairment (OTTI) accretion, of investments in debt securities classified as held-to-maturity. + References No definition available. + Details
Name: | us-gaap_HeldToMaturitySecuritiesAmortizedCostBeforeOtherThanTemporaryImpairment
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Fair value of investments in debt securities classified as held-to-maturity. + 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 (aa) -URI http://asc.fasb.org/extlink&oid=82897076&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 5 -Subparagraph (f) -URI http://asc.fasb.org/extlink&oid=82897076&loc=d3e27232-111563 Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -SubTopic 10 -Section 50 -Paragraph 5 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=82897076&loc=d3e27232-111563 + Details
Name: | us-gaap_HeldToMaturitySecuritiesFairValue
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=82897076&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=82897076&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
- 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_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: |

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