XML 70 R56.htm IDEA: XBRL DOCUMENT
v3.7.0.1

Farmer Mac Guaranteed Securities and USDA Guaranteed Securities - Farmer Mac Guaranteed Securities and USDA Securities (Details) - USD ($) $ in Thousands |  |  | 3 Months Ended | 12 Months Ended |  |
--- | --- | --- | --- | --- | --- | ---
Dec. 31, 2016 | Dec. 31, 2015 | Dec. 31, 2014 | Mar. 31, 2014 | Dec. 31, 2016 | Dec. 31, 2015 | Dec. 31, 2014 | Oct. 01, 2016 | Jan. 02, 2014
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Transfer of USDA Guaranteed Securities- Available-for-sale to Held-to-maturity; Unrealized holding gains |  |  |  |  |  |  |  |  |  | $ 73,100 |
Trading Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Transfer of Farmer Mac Guaranteed Securities - Available-for-sale to Held-to-maturity; Unrealized holding gains |  |  |  |  |  |  |  |  |  | 700 | $ 22,300
Transfer of Farmer Mac Guaranteed Securities and USDA Guaranteed Securities - Available-for-sale to Held-to-maturity; Unrealized holding gains |  |  |  |  |  |  |  |  |  | $ 73,800 |
Farmer Mac Guaranteed Securities and USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | $ 71,952 |  |  |  | $ 71,952 |  |  |  |  |  |
Held-to-Maturity Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Unpaid Principal Balance | 3,086,504 |  |  |  | 3,086,504 |  |  |  |  |  |
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 3,158,456 |  |  |  | 3,158,456 |  |  |  |  |  |
Held to Maturity; Unrealized Holding Gains | 7,192 |  |  |  | 7,192 |  |  |  |  |  |
Held to Maturity - Unrealized Holding Loss | (99,004) |  |  |  | (99,004) |  |  |  |  |  |
Held-to-maturity Securities, Fair Value | 3,066,644 |  |  |  | 3,066,644 |  |  |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance |  | $ 6,045,828 |  |  |  |  | $ 6,045,828 |  |  |  |
Available-for-sale Securities, Amortized Cost Basis | 4,888,904 | 6,047,385 |  |  | 4,888,904 |  | 6,047,385 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 64,131 |  |  |  |  | 64,131 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Loss, before Tax |  | 70,567 |  |  |  |  | 70,567 |  |  |  |
Available-for-sale, at fair value | 4,853,685 | 6,040,949 |  |  | 4,853,685 |  | 6,040,949 |  |  |  |
Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | (1,833) |  |  |  | (1,833) |  |  |  |  |  |
Held-to-Maturity Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Unpaid Principal Balance | 1,151,064 |  |  |  | 1,151,064 |  |  |  |  |  |
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 1,149,231 |  |  |  | 1,149,231 |  |  |  |  |  |
Held to Maturity; Unrealized Holding Gains | 7,192 |  |  |  | 7,192 |  |  |  |  |  |
Held to Maturity - Unrealized Holding Loss | (3,414) |  |  |  | (3,414) |  |  |  |  |  |
Held-to-maturity Securities, Fair Value | 1,153,009 |  |  |  | 1,153,009 |  |  |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance |  | 4,196,506 |  |  |  |  | 4,196,506 |  |  |  |
Available-for-sale Securities, Amortized Cost Basis |  | 4,196,173 |  |  |  |  | 4,196,173 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 26,971 |  |  |  |  | 26,971 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Loss, before Tax |  | 70,539 |  |  |  |  | 70,539 |  |  |  |
Available-for-sale, at fair value |  | 4,152,605 |  |  |  |  | 4,152,605 |  |  |  |
USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-sale, at fair value | 0 | 1,888,344 |  |  | 0 |  | 1,888,344 |  |  |  |
Trading Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Trading, at fair value | 20,388 | 28,975 |  |  | 20,388 |  | 28,975 |  |  |  |
Available-for-sale Securities [Member] | Farmer Mac Guaranteed Securities and USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) |  | 1,557 |  |  |  |  | 1,557 |  |  |  |
Available-for-sale Securities [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) |  | (333) |  |  |  |  | (333) |  |  |  |
Institutional Credit [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Unpaid Principal Balance | 1,115,465 | 1,274,431 |  |  | 1,115,465 |  | 1,274,431 |  |  |  |
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 1,113,189 | 1,274,016 |  |  | 1,113,189 |  | 1,274,016 |  |  |  |
Held to Maturity; Unrealized Holding Gains | 7,187 | 7,801 |  |  | 7,187 |  | 7,801 |  |  |  |
Held to Maturity - Unrealized Holding Loss | (3,175) | 0 |  |  | (3,175) |  | 0 |  |  |  |
Held-to-maturity Securities, Fair Value | 1,117,201 | 1,281,817 |  |  | 1,117,201 |  | 1,281,817 |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance | 4,889,007 | 4,164,952 |  |  | 4,889,007 |  | 4,164,952 |  |  |  |
Available-for-sale Securities, Amortized Cost Basis | 4,888,904 | 4,164,952 |  |  | 4,888,904 |  | 4,164,952 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax | 28,715 | 26,831 |  |  | 28,715 |  | 26,831 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Loss, before Tax | 63,934 | 70,539 |  |  | 63,934 |  | 70,539 |  |  |  |
Available-for-sale, at fair value | 4,853,685 | 4,121,244 |  |  | 4,853,685 |  | 4,121,244 |  |  |  |
Institutional Credit [Member] | Held-to-maturity Securities [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | (2,276) | (415) |  |  | (2,276) |  | (415) |  |  |  |
Institutional Credit [Member] | Available-for-sale Securities [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | (103) | 0 |  |  | (103) |  | 0 |  |  |  |
USDA Guarantees [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | 400 | (200) |  |  | 400 |  | (200) |  |  |  |
USDA Guarantees [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Unpaid Principal Balance | 35,599 |  |  |  | 35,599 |  |  |  |  |  |
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 36,042 |  |  |  | 36,042 |  |  |  |  |  |
Held to Maturity; Unrealized Holding Gains | 5 |  |  |  | 5 |  |  |  |  |  |
Held to Maturity - Unrealized Holding Loss | (239) |  |  |  | (239) |  |  |  |  |  |
Held-to-maturity Securities, Fair Value | 35,808 |  |  |  | 35,808 |  |  |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance |  | 31,554 |  |  |  |  | 31,554 |  |  |  |
Available-for-sale Securities, Amortized Cost Basis |  | 31,221 |  |  |  |  | 31,221 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 140 |  |  |  |  | 140 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Loss, before Tax |  | 0 |  |  |  |  | 0 |  |  |  |
Available-for-sale, at fair value |  | 31,361 |  |  |  |  | 31,361 |  |  |  |
USDA Guarantees [Member] | USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | 73,785 |  |  |  | 73,785 |  |  |  |  |  |
Held-to-Maturity Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Held-to-Maturity Unpaid Principal Balance | 1,935,440 |  |  |  | 1,935,440 |  |  |  |  |  |
Held-to-maturity Securities, Amortized Cost before Other than Temporary Impairment | 2,009,225 |  |  |  | 2,009,225 |  |  |  |  |  |
Held to Maturity; Unrealized Holding Gains | 0 |  |  |  | 0 |  |  |  |  |  |
Held to Maturity - Unrealized Holding Loss | (95,590) |  |  |  | (95,590) |  |  |  |  |  |
Held-to-maturity Securities, Fair Value | 1,913,635 |  |  |  | 1,913,635 |  |  |  |  |  |
Available-for-sale Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Available-for-Sale Securities Unpaid Principal Balance |  | 1,849,322 |  |  |  |  | 1,849,322 |  |  |  |
Available-for-sale Securities, Amortized Cost Basis |  | 1,851,212 |  |  |  |  | 1,851,212 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Gain, before Tax |  | 37,160 |  |  |  |  | 37,160 |  |  |  |
Available-for-sale Debt Securities, Accumulated Gross Unrealized Loss, before Tax |  | 28 |  |  |  |  | 28 |  |  |  |
Available-for-sale, at fair value |  | 1,888,344 |  |  |  |  | 1,888,344 |  |  |  |
Trading Securities [Abstract] |  |  |  |  |  |  |  |  |  |  |
Trading Securities Unpaid Principal Balance | 19,360 | 27,129 |  |  | 19,360 |  | 27,129 |  |  |  |
Trading Securities, Debt, Amortized Cost | 20,737 | 29,063 |  |  | 20,737 |  | 29,063 |  |  |  |
Trading Securities, Unrealized Gains | 41 | 125 |  |  |  |  |  |  |  |  |
Trading Securities, Unrealized Holding Loss | 390 | 213 |  |  |  |  |  |  |  |  |
Trading, at fair value | 20,388 | 28,975 |  |  | 20,388 |  | 28,975 |  |  |  |
USDA Guarantees [Member] | Available-for-sale Securities [Member] | Farmer Mac Guaranteed Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | 443 | (333) |  |  | 443 |  | (333) |  |  |  |
USDA Guarantees [Member] | Available-for-sale Securities [Member] | USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) |  | 1,890 |  |  |  |  | 1,890 |  |  |  |
USDA Guarantees [Member] | Trading Securities [Member] | USDA Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Unamortized Premium/(Discount) | $ 1,377 | $ 1,934 |  |  | 1,377 |  | 1,934 |  |  |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  |  |  | 2,013,151 |  |  | $ 1,632,786 |  |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] | Farmer Mac Guaranteed Securities [Member] | Available-for-sale Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  |  |  | 32,824 |  | $ 0 | 1,632,786 |  |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] | Farmer Mac Guaranteed Securities [Member] | USDA Guarantee [Member] | Available-for-sale Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  |  |  | 2,000,000 |  |  |  |  |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] | Farmer Mac Guaranteed Securities [Member] | Farmer Mac Guaranteed Securities [Member] | Available-for-sale Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  |  |  | 32,800 |  |  |  |  |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] | Farmer Mac Guaranteed Securities [Member] | Institutional Credit [Member] | Available-for-sale Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  | $ 0 | $ 1,600,000 | 0 |  |  | 1,632,786 | [1] |  |
Fair Value, Inputs, Level 3 [Member] | Fair Value, Measurements, Recurring [Member] | Farmer Mac Guaranteed Securities [Member] | USDA Guarantees [Member] | Available-for-sale Securities [Member] |  |  |  |  |  |  |  |  |  |  |
Schedule of Held-to-Maturity, Available-for-sale, and Trading Securities [Line Items] |  |  |  |  |  |  |  |  |  |  |
Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3 |  |  |  |  | $ 32,824 | [2] |  | $ 0 |  |  |
[1] | Includes $1.6 billion of AgVantage securities transferred from available-for-sale to held-to-maturity on January 1, 2014 and $20.7 million of AgVantage securities purchased during 2014 transferred from available-for-sale to held-to-maturity.
[2] | Includes $32.8 million of Farmer Mac Guaranteed USDA Securities and $2.0 billion of USDA Securities transferred from available-for-sale to held-to-maturity on October 1, 2016.

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 [Line Items] for Schedule of held to maturity, available for sale, and trading securities which includes, but is not limited to changes in the cost basis and fair value, fair value and gross unrealized gain (loss), fair values by type of security, contractual maturity and classification, amortized cost basis and other related disclosures + References No definition available. + Details
Name: | agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems
Namespace Prefix: | agm_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

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

X
- Definition Transfer of Farmer Mac Guaranteed Securities - Available-for-sale to Held-to-maturity; Unrealized holding gains + References No definition available. + Details
Name: | agm_TransferofFarmerMacGuaranteedSecuritiesAvailableforsaletoHeldtomaturityUnrealizedholdinggains
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Transfer of Farmer Mac Guaranteed Securities and USDA Guaranteed Securities - Available-for-sale to Held-to-maturity; Unrealized holding gains + References No definition available. + Details
Name: | agm_TransferofFarmerMacGuaranteedSecuritiesandUSDAGuaranteedSecuritiesAvailableforsaletoHeldtomaturityUnrealizedholdinggains
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Transfer of USDA Guaranteed Securities- Available-for-sale to Held-to-maturity; Unrealized holding gains + References No definition available. + Details
Name: | agm_TransferofUSDAGuaranteedSecuritiesAvailableforsaletoHeldtomaturityUnrealizedholdinggains
Namespace Prefix: | agm_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
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 Amount of transfers of financial instrument classified as an asset out of level 3 of the fair value hierarchy. + References Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 820 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (c)(3) -URI http://asc.fasb.org/extlink&oid=66048111&loc=d3e19207-110258 + Details
Name: | us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetTransfersOutOfLevel3
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

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

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=73527792&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=73527792&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=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 5 -Subparagraph (f) -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 50 -Paragraph 5 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=73527792&loc=d3e27232-111563 + Details
Name: | us-gaap_HeldToMaturitySecuritiesFairValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

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_USTreasuryAndGovernmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis=us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember
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_StatementBusinessSegmentsAxis=agm_InstitutionalCreditMemberMember
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: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=agm_USDAGuaranteesMember
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_FairValueByFairValueHierarchyLevelAxis=us-gaap_FairValueInputsLevel3Member
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByMeasurementFrequencyAxis=us-gaap_FairValueMeasurementsRecurringMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByAssetClassAxis=us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=agm_UsdaGuaranteeMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=agm_FarmerMacGuaranteedSecuritiesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |