THE HERSHEY COMPANY NOTES TO CONSOLIDATED FINANCIAL STATEMENTS—(Continued) (amounts in thousands, except share data or if otherwise indicated) 6. FAIR VALUE MEASUREMENTS Table of Contents Accounting guidance on fair value measurements requires that financial assets and liabilities be classified and disclosed in one of the following categories of the fair value hierarchy: Level 1  – Based on unadjusted quoted prices for identical assets or liabilities in an active market. Level 2  – Based on observable market-based inputs or unobservable inputs that are corroborated by market data. Level 3  – Based on unobservable inputs that reflect the entity's own assumptions about the assumptions that a market participant would use in pricing the asset or liability. We did not have any Level 3 financial assets or liabilities, nor were there any transfers between levels during the periods presented. The following table presents assets and liabilities that were measured at fair value in the Consolidated Balance Sheets on a recurring basis as of December 31, 2020 and 2019: (1) The fair value of foreign currency forward exchange contracts is the difference between the contract and current market foreign currency exchange rates at the end of the period. We estimate the fair value of foreign currency forward exchange contracts on a quarterly basis by obtaining market quotes of spot and forward rates for contracts with similar terms, adjusted where necessary for maturity differences. (2) The fair value of interest rate swap agreements represents the difference in the present value of cash flows calculated at the contracted interest rates and at current market interest rates at the end of the period. We calculate the fair value of interest rate swap agreements quarterly based on the quoted market price for the same or similar financial instruments. (3) The fair value of deferred compensation derivatives is based on quoted prices for market interest rates and a broad market equity index. (4) The fair value of commodities futures and options contracts is based on quoted market prices. The Hershey Company | 2020 Form 10-K | Page 70 Assets (Liabilities) Level 1 Level 2 Level 3 Total December 31, 2020: Derivative Instruments: Assets: Foreign exchange contracts (1) $ —  $ 2,564  $ —  $ 2,564  Deferred compensation derivatives (3) —  3,630  —  3,630  Commodities futures and options (4) 3,299  —  —  3,299  Liabilities: Foreign exchange contracts (1) —  5,615  —  5,615  Commodities futures and options (4) 1,648  —  —  1,648  December 31, 2019: Assets: Foreign exchange contracts (1) $ —  $ 2,731  $ —  $ 2,731  Interest rate swap agreements (2) —  555  —  555  Deferred compensation derivatives (3) —  2,557  —  2,557  Commodities futures and options (4) 9,080  —  —  9,080  Liabilities: Foreign exchange contracts (1) —  1,779  —  1,779  Commodities futures and options (4) 626  —  —  626 