XML 57 R47.htm IDEA: XBRL DOCUMENT
v3.23.3

Financial Derivatives - Schedule of Net Income/(Expense) Recognized (Details) - USD ($) $ in Thousands | 3 Months Ended | 9 Months Ended
--- | --- | ---
Sep. 30, 2023 | Sep. 30, 2022 | Sep. 30, 2023 | Sep. 30, 2022
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Investments and cash equivalents | $ 79,947 | $ 21,581 | $ 209,429 | $ 38,497
Interest Income Farmer Mac Guaranteed Securities and USDA Securities | 161,351 | 74,695 | 442,649 | 169,231
Interest Income Loans | 140,513 | 97,514 | 388,837 | 241,393
Total interest expense | (294,168) | (125,937) | (795,537) | (251,816)
Gains on financial derivatives | 2,671 | 772 | 4,763 | 21,551
Total | 90,314 | 68,625 | 250,141 | 218,856
Interest expense on interest rate swaps | 9,505 | 4,192 | 20,731 | 33,272
Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (265,777) | (159,661) | (313,047) | (488,481)
Gains/(losses) on fair value hedging relationships | 3,210 | (625) | (1,796) | 5,953
Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | (14) | (15) | (41) | (43)
Interest settlements reclassified from AOCI into net income on derivatives | 5,569 | 1,072 | 15,051 | (2,094)
Recognized on hedged items | (8,287) | (4,046) | (23,325) | (6,654)
Expense recognized on cash flow hedges | (2,732) | (2,989) | (8,315) | (8,791)
Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (20,127) | 19,974 | (38,049) | 76,840
Premium/discount amortization recognized on hedged items | (109) | (608) | (738) | (2,294)
No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 2,671 | 772 | 4,763 | 21,551
Interest Income Investments and Cash Equivalents | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (41,944) | (52,308) | (46,485) | (108,002)
Gains/(losses) on fair value hedging relationships | 107 | (2,935) | (763) | (1,067)
Interest Income Investments and Cash Equivalents | Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest settlements reclassified from AOCI into net income on derivatives | 0 | 0 | 0 | 0
Recognized on hedged items | 0 | 0 | 0 | 0
Expense recognized on cash flow hedges | 0 | 0 | 0 | 0
Interest Income Investments and Cash Equivalents | Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | 9,006 | 4,617 | 23,865 | 10,433
Premium/discount amortization recognized on hedged items | 623 | (59) | 1,399 | (816)
Interest Income Investments and Cash Equivalents | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest Income Farmer Mac Guaranteed Securities and USDA Securities | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (107,965) | (204,765) | (116,591) | (564,679)
Gains/(losses) on fair value hedging relationships | 2,231 | (2,901) | 676 | (782)
Interest Income Farmer Mac Guaranteed Securities and USDA Securities | Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest settlements reclassified from AOCI into net income on derivatives | 0 | 0 | 0 | 0
Recognized on hedged items | 0 | 0 | 0 | 0
Expense recognized on cash flow hedges | 0 | 0 | 0 | 0
Interest Income Farmer Mac Guaranteed Securities and USDA Securities | Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | 46,303 | 35,763 | 133,995 | 102,123
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest Income Farmer Mac Guaranteed Securities and USDA Securities | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest Income Loans | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (105,403) | (100,490) | (97,827) | (337,443)
Gains/(losses) on fair value hedging relationships | 1,862 | 5,193 | (481) | 9,591
Interest Income Loans | Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest settlements reclassified from AOCI into net income on derivatives | 0 | 0 | 0 | 0
Recognized on hedged items | 0 | 0 | 0 | 0
Expense recognized on cash flow hedges | 0 | 0 | 0 | 0
Interest Income Loans | Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | 16,089 | 14,857 | 47,144 | 41,146
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest Income Loans | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Total Interest Expense | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (10,465) | 197,902 | (52,144) | 521,643
Gains/(losses) on fair value hedging relationships | (990) | 18 | (1,228) | (1,789)
Total Interest Expense | Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | (14) | (15) | (41) | (43)
Interest settlements reclassified from AOCI into net income on derivatives | 5,569 | 1,072 | 15,051 | (2,094)
Recognized on hedged items | (8,287) | (4,046) | (23,325) | (6,654)
Expense recognized on cash flow hedges | (2,732) | (2,989) | (8,315) | (8,791)
Total Interest Expense | Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | (91,525) | (35,263) | (243,053) | (76,862)
Premium/discount amortization recognized on hedged items | (732) | (549) | (2,137) | (1,478)
Total Interest Expense | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Gains on financial derivatives | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | 0 | 0 | 0 | 0
Gains/(losses) on fair value hedging relationships | 0 | 0 | 0 | 0
Gains on financial derivatives | Cash flow hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Interest settlements reclassified from AOCI into net income on derivatives | 0 | 0 | 0 | 0
Recognized on hedged items | 0 | 0 | 0 | 0
Expense recognized on cash flow hedges | 0 | 0 | 0 | 0
Gains on financial derivatives | Designated as hedge | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on hedged items | 0 | 0 | 0 | 0
Premium/discount amortization recognized on hedged items | 0 | 0 | 0 | 0
Gains on financial derivatives | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 2,671 | 772 | 4,763 | 21,551
Interest Rate Swap | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | (24,907) | (20,235) | (82,758) | (52,622)
Income/(expense) related to interest settlements on fair value hedging relationships | (45,143) | (869) | (121,545) | 21,924
Recognized on derivatives | 268,987 | 159,036 | 311,251 | 494,434
Interest Rate Swap | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 2,772 | 5,054 | 5,263 | 10,954
Interest expense on interest rate swaps | (805) | (2,613) | (3,999) | (5,496)
Interest Rate Swap | Interest Income Investments and Cash Equivalents | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | 9,950 | 957 | 24,952 | (1,536)
Income/(expense) related to interest settlements on fair value hedging relationships | 19,579 | 5,515 | 50,216 | 8,081
Recognized on derivatives | 42,051 | 49,373 | 45,722 | 106,935
Interest Rate Swap | Interest Income Investments and Cash Equivalents | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest expense on interest rate swaps | 0 | 0 | 0 | 0
Interest Rate Swap | Interest Income Farmer Mac Guaranteed Securities and USDA Securities | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | 40,114 | (350) | 104,023 | (37,687)
Income/(expense) related to interest settlements on fair value hedging relationships | 86,417 | 35,413 | 238,018 | 64,436
Recognized on derivatives | 110,196 | 201,864 | 117,267 | 563,897
Interest Rate Swap | Interest Income Farmer Mac Guaranteed Securities and USDA Securities | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest expense on interest rate swaps | 0 | 0 | 0 | 0
Interest Rate Swap | Interest Income Loans | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | 17,692 | 1,837 | 46,625 | (9,568)
Income/(expense) related to interest settlements on fair value hedging relationships | 33,781 | 16,694 | 93,769 | 31,578
Recognized on derivatives | 107,265 | 105,683 | 97,346 | 347,034
Interest Rate Swap | Interest Income Loans | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest expense on interest rate swaps | 0 | 0 | 0 | 0
Interest Rate Swap | Total Interest Expense | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | (92,663) | (22,679) | (258,358) | (3,831)
Income/(expense) related to interest settlements on fair value hedging relationships | (184,920) | (58,491) | (503,548) | (82,171)
Recognized on derivatives | 9,475 | (197,884) | 50,916 | (523,432)
Interest Rate Swap | Total Interest Expense | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Interest expense on interest rate swaps | 0 | 0 | 0 | 0
Interest Rate Swap | Gains on financial derivatives | Fair value hedges: |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Recognized on derivatives | 0 | 0 | 0 | 0
Income/(expense) related to interest settlements on fair value hedging relationships | 0 | 0 | 0 | 0
Recognized on derivatives | 0 | 0 | 0 | 0
Interest Rate Swap | Gains on financial derivatives | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 2,772 | 5,054 | 5,263 | 10,954
Interest expense on interest rate swaps | (805) | (2,613) | (3,999) | (5,496)
Treasury futures | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 704 | (1,669) | 3,499 | 16,093
Treasury futures | Interest Income Investments and Cash Equivalents | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Treasury futures | Interest Income Farmer Mac Guaranteed Securities and USDA Securities | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Treasury futures | Interest Income Loans | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Treasury futures | Total Interest Expense | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | 0 | 0 | 0 | 0
Treasury futures | Gains on financial derivatives | No hedge designation |  |  |  |
Derivative Instruments, Gain (Loss) [Line Items] |  |  |  |
Gains on financial derivatives | $ 704 | $ (1,669) | $ 3,499 | $ 16,093

X
- Definition Derivative Net Hedge Ineffectiveness Gain Loss Component Recognized On Hedged Item + References No definition available. + Details
Name: | agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Derivative Net Interest Settlements (Interest Accruals) + References No definition available. + Details
Name: | agm_DerivativeNetInterestSettlements
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Hedged Item Net Interest Settlements (Interest Accruals) + References No definition available. + Details
Name: | agm_HedgedItemNetInterestSettlements
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Income_Expense related to interest settlements on fair value hedges + References No definition available. + Details
Name: | agm_Income_Expenserelatedtointerestsettlementsonfairvaluehedges
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Premium (Discount), Recognized on Hedged Instrument + References No definition available. + Details
Name: | agm_PremiumDiscountRecognizedOnHedgedInstrument
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Total Amounts of Line Items Presented in the Consolidated Statement of Income + References No definition available. + Details
Name: | agm_TotalAmountsOfLineItemsPresentedInTheConsolidatedStatementOfIncome
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of gain (loss) from the increase (decrease) in fair value of derivative and nonderivative instruments designated as fair value hedging instruments recognized in the income statement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 815 -SubTopic 25 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (a)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480238/815-25-50-1 + Details
Name: | us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of the increase (decrease) in fair value of the hedged item in a fair value hedge recognized in the income statement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 815 -SubTopic 25 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (a)(1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480238/815-25-50-1 + Details
Name: | us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 815 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 4E -Publisher FASB -URI https://asc.fasb.org//1943274/2147480434/815-10-50-4E + Details
Name: | us-gaap_DerivativeInstrumentsGainLossLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Aggregate net gain (loss) on all derivative instruments recognized in earnings during the period, before tax effects. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 4A -Subparagraph (b) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480434/815-10-50-4A + Details
Name: | us-gaap_GainLossOnDerivativeInstrumentsNetPretax
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Total amount of gain (loss) derived from fair value hedges recognized in earnings in the period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 815 -SubTopic 10 -Section 50 -Paragraph 4C -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480434/815-10-50-4C + Details
Name: | us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of operating dividend and interest income, including amortization and accretion of premiums and discounts, on securities. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 946 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.6-07(1)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483575/946-220-S99-1 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 946 -SubTopic 320 -Name Accounting Standards Codification -Section S99 -Paragraph 6 -Subparagraph (SX 210.12-14(Column E)(Footnote 4)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480032/946-320-S99-6 + Details
Name: | us-gaap_InterestAndDividendIncomeSecurities
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition The aggregate interest and fee income generated by: (1) loans the Entity has positive intent and ability to hold for the foreseeable future, or until maturity or payoff, including commercial and consumer loans, whether domestic or foreign, which may consist of: (a) industrial and agricultural; (b) real estate; and (c) real estate construction loans; (d) trade financing; (e) lease financing; (f) home equity lines-of-credit; (g) automobile and other vehicle loans; and (h) credit card and other revolving-type loans and (2) loans and leases held-for-sale which may include mortgage loans, direct financing, and sales-type leases. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 942 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-04.1) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483589/942-220-S99-1 + Details
Name: | us-gaap_InterestAndFeeIncomeLoansAndLeases
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of the cost of borrowed funds accounted for as interest expense. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 946 -SubTopic 830 -Name Accounting Standards Codification -Section 55 -Paragraph 10 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480167/946-830-55-10 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 946 -SubTopic 220 -Name Accounting Standards Codification -Section 45 -Paragraph 3 -Subparagraph (i) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483581/946-220-45-3 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 946 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.6-07(3)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483575/946-220-S99-1 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 280 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 22 -Subparagraph (d) -Publisher FASB -URI https://asc.fasb.org//1943274/2147482810/280-10-50-22 Reference 5: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 835 -SubTopic 30 -Section 45 -Paragraph 3 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482925/835-30-45-3 Reference 6: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 942 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-04.9) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483589/942-220-S99-1 Reference 7: http://www.xbrl.org/2003/role/disclosureRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 2 -Subparagraph (210.5-03(11)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483621/220-10-S99-2 Reference 8: http://www.xbrl.org/2003/role/disclosureRef -Topic 835 -SubTopic 20 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483013/835-20-50-1 + Details
Name: | us-gaap_InterestExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Amount of operating interest income, including, but not limited to, amortization and accretion of premiums and discounts on securities. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 946 -SubTopic 320 -Name Accounting Standards Codification -Section S99 -Paragraph 6 -Subparagraph (SX 210.12-14(Column E)(1)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480032/946-320-S99-6 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 946 -SubTopic 320 -Name Accounting Standards Codification -Section S99 -Paragraph 6 -Subparagraph (SX 210.12-14(Column E)(Footnote 4)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480032/946-320-S99-6 Reference 3: http://www.xbrl.org/2003/role/exampleRef -Topic 946 -SubTopic 830 -Name Accounting Standards Codification -Section 55 -Paragraph 10 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480167/946-830-55-10 Reference 4: http://www.xbrl.org/2003/role/exampleRef -Topic 946 -SubTopic 830 -Name Accounting Standards Codification -Section 45 -Paragraph 39 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480228/946-830-45-39 Reference 5: http://www.xbrl.org/2003/role/disclosureRef -Topic 946 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.6-07(1)(b)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483575/946-220-S99-1 Reference 6: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 946 -SubTopic 320 -Name Accounting Standards Codification -Section S99 -Paragraph 6 -Subparagraph (SX 210.12-14(Column E)(Footnote 6)(a)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480032/946-320-S99-6 Reference 7: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 2 -Subparagraph (SX 210.5-03.1(e)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483621/220-10-S99-2 + Details
Name: | us-gaap_InterestIncomeOperating
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition The total amount of noninterest income which may be derived from: (1) fees and commissions; (2) premiums earned; (3) insurance policy charges; (4) the sale or disposal of assets; and (5) other sources not otherwise specified. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 942 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-04.13) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483589/942-220-S99-1 + Details
Name: | us-gaap_NoninterestIncome
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount, after tax, of reclassification of gain (loss) from accumulated other comprehensive income (AOCI) for derivative instrument designated and qualifying as cash flow hedge included in assessment of hedge effectiveness. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 11 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482790/220-10-45-11 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 15 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482790/220-10-45-15 + Details
Name: | us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Amount before tax of reclassification adjustments of other comprehensive income (loss). + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section 45 -Paragraph 14A -Publisher FASB -URI https://asc.fasb.org//1943274/2147482790/220-10-45-14A Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 5 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482765/220-10-50-5 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 830 -SubTopic 30 -Name Accounting Standards Codification -Section 50 -Paragraph 1 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481674/830-30-50-1 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 830 -SubTopic 30 -Name Accounting Standards Codification -Section 45 -Paragraph 17 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481694/830-30-45-17 Reference 5: http://www.xbrl.org/2003/role/disclosureRef -Topic 830 -SubTopic 30 -Name Accounting Standards Codification -Section 45 -Paragraph 20 -Subparagraph (d) -Publisher FASB -URI https://asc.fasb.org//1943274/2147481694/830-30-45-20 Reference 6: http://www.xbrl.org/2003/role/disclosureRef -Topic 944 -SubTopic 220 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.7-04(19)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483586/944-220-S99-1 Reference 7: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 220 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 4 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482765/220-10-50-4 + Details
Name: | us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Details
Name: | us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis=us-gaap_FairValueHedgingMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis=us-gaap_CashFlowHedgingMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_HedgingDesignationAxis=us-gaap_DesignatedAsHedgingInstrumentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_HedgingDesignationAxis=us-gaap_NondesignatedMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=agm_InterestRevenueExpenseNetMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_InterestIncomeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_LoansAndFinanceReceivablesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_InterestExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_GainLossOnDerivativeInstrumentsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DerivativeInstrumentRiskAxis=us-gaap_InterestRateSwapMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DerivativeInstrumentRiskAxis=us-gaap_FutureMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |