Financial instruments | Financial instruments (a) Fair value of financial instruments 2019 Carrying amount Fair value Level 1 Level 2 Level 3 Long-term investments carried at fair value $ 1,294,147 $ 1,294,147 1,178,581 $ 27,072 $ 88,494 Development loans and other receivables 37,050 37,984 — 37,984 — Derivative instruments: Energy contracts designated as a cash flow hedge 65,304 65,304 — — 65,304 Energy contracts not designated as a hedge 20,384 20,384 — — 20,384 Commodity contracts for regulated operations 16 16 — 16 — Total derivative instruments 85,704 85,704 — 16 85,688 Total financial assets $ 1,416,901 $ 1,417,835 $ 1,178,581 $ 65,072 $ 174,182 Long-term debt $ 3,931,868 $ 4,284,068 $ 1,495,153 $ 2,788,915 $ — Convertible debentures 342 623 623 — — Preferred shares, Series C 13,793 15,120 — 15,120 — Derivative instruments: Energy contracts designated as a cash flow hedge 789 789 — — 789 Energy contracts not designated as a hedge 38 38 — — 38 Cross-currency swap designated as a net investment hedge 81,765 81,765 — 81,765 — Commodity contracts for regulated operations 2,072 2,072 — 2,072 — Total derivative instruments 84,664 84,664 — 83,837 827 Total financial liabilities $ 4,030,667 $ 4,384,475 $ 1,495,776 $ 2,887,872 $ 827 24. Financial instruments (continued) (a) Fair value of financial instruments (continued) 2018 Carrying amount Fair value Level 1 Level 2 Level 3 Long-term investment carried at fair value $ 814,530 $ 814,530 $ 814,530 $ — $ — Development loans and other receivables 103,696 110,019 — 110,019 — Derivative instruments (1) : Energy contracts designated as a cash flow hedge 61,838 61,838 — — 61,838 Currency forward contract not designated as a hedge 869 869 — 869 — Commodity contracts for regulatory operations 101 101 — 101 — Total derivative instruments 62,808 62,808 — 970 61,838 Total financial assets $ 981,034 $ 987,357 $ 814,530 $ 110,989 $ 61,838 Long-term debt $ 3,336,795 $ 3,356,773 $ 768,400 $ 2,588,373 $ — Convertible debentures 470 639 639 — — Preferred shares, Series C 13,418 13,703 — 13,703 — Derivative instruments: Energy contracts designated as a cash flow hedge 57 57 — — 57 Cross-currency swap designated as a net investment hedge 93,198 93,198 — 93,198 — Interest rate swaps designated as a hedge 8,473 8,473 — 8,473 — Commodity contracts for regulated operations 1,114 1,114 — 1,114 — Total derivative instruments 102,842 102,842 — 102,785 57 Total financial liabilities $ 3,453,525 $ 3,473,957 $ 769,039 $ 2,704,861 $ 57 (1) Balance of $441 associated with certain weather derivatives have been excluded, as they are accounted for based on intrinsic value rather than fair value. The Company has determined that the carrying value of its short-term financial assets and liabilities approximates fair value as of December 31, 2019 and 2018 due to the short-term maturity of these instruments. The fair value of development loans and other receivables (level 2) is determined using a discounted cash flow method, using estimated current market rates for similar instruments adjusted for estimated credit risk as determined by management. The fair value of the investment in Atlantica (level 1) is measured at the closing price on the NASDAQ stock exchange adjusted for the impact of the expected settlement under the purchase agreement pursuant to the prepayment of $53,750 (note 8(a)). 24. Financial instruments (continued) (a) Fair value of financial instruments (continued) The Company’s level 1 fair value of long-term debt is measured at the closing price on the NYSE and the Canadian over-the-counter closing price. The Company’s level 2 fair value of long-term debt at fixed interest rates and Series C preferred shares has been determined using a discounted cash flow method and current interest rates. The Company's level 2 fair value of convertible debentures has been determined as the greater of their face value and the quoted value of APUC's common shares on a converted basis. The Company’s level 2 fair value derivative instruments primarily consist of swaps, options, rights and forward physical derivatives where market data for pricing inputs are observable. Level 2 pricing inputs are obtained from various market indices and utilize discounting based on quoted interest rate curves which are observable in the marketplace. The Company’s level 3 instruments consist of energy contracts for electricity sales and the fair value of the Company's investment in AYES Canada. The significant unobservable inputs used in the fair value measurement of energy contracts are the internally developed forward market prices ranging from $13.33 to $178.65 with a weighted average of $23.66 as of December 31, 2019 . The weighted average forward market prices are developed based on the quantity of energy expected to be sold monthly and the expected forward price during that month. The change in the fair value of the energy contracts is detailed in notes 24(b)(ii) and 24(b)(iv). The significant unobservable inputs used in the fair value measurement of the Company's AYES Canada investment are the expected cash flows, the discount rates applied to these cash flows ranging from 8.75% to 9.50% with a weighted average of 9.42% , and the expected volatility of Atlantica's share price ranging from 18% to 22% as of December 31, 2019 . Significant increases (decreases) in expected cash flows or increases (decreases) in discount rate in isolation would have resulted in a significantly lower (higher) fair value measurement. (b) Derivative instruments Derivative instruments are recognized on the consolidated balance sheets as either assets or liabilities and measured at fair value at each reporting period. (i) Commodity derivatives – regulated accounting The Company uses derivative financial instruments to reduce the cash flow variability associated with the purchase price for a portion of future natural gas purchases associated with its regulated gas and electric service territories. The Company’s strategy is to minimize fluctuations in gas sale prices to regulated customers. The following are commodity volumes, in dekatherms (“dths”) associated with the above derivative contracts: 2019 Financial contracts: Swaps 2,134,739 Options 150,000 Forward contracts 2,500,000 4,784,739 The accounting for these derivative instruments is subject to guidance for rate regulated enterprises. Therefore, the fair value of these derivatives is recorded as current or long-term assets and liabilities, with offsetting positions recorded as regulatory assets and regulatory liabilities in the consolidated balance sheets. Most of the gains or losses on the settlement of these contracts are included in the calculation of the fuel and commodity costs adjustments (note 7(e)). As a result, the changes in fair value of these natural gas derivative contracts and their offsetting adjustment to regulatory assets and liabilities had no earnings impact. 24. Financial instruments (continued) (b) Derivative instruments (continued) (i) Commodity derivatives – regulated accounting (continued) The following table presents the impact of the change in the fair value of the Company’s natural gas derivative contracts had on the consolidated balance sheets: 2019 2018 Regulatory assets: Swap contracts $ 28 $ 66 Option contracts 38 — Forward contracts $ 1,830 $ — Regulatory liabilities: Swap contracts $ 743 $ 218 Option contracts — 134 Forward contracts $ — $ 1,259 (ii) Cash flow hedges The Company reduces the price risk on the expected future sale of power generation at Sandy Ridge, Senate and Minonk Wind Facilities by entering into the following long-term energy derivative contracts. Notional quantity (MW-hrs) Expiry Receive average prices (per MW-hr) Pay floating price (per MW-hr) 757,075 December 2028 35.35 PJM Western HUB 3,443,530 December 2027 25.54 PJM NI HUB 2,665,068 December 2027 36.46 ERCOT North HUB In January 2019 , the Company entered into a long-term energy derivative contract to reduce the price risk on the expected future sale of power generation at Sugar Creek. On September 30, 2019 , the Company sold the derivative contract together with 100% of its ownership interest in Sugar Creek to AAGES Sugar Creek. The novation and transfer of the derivative contract was subject to counterparty approval, which was received subsequent to year-end in Q1 2020. As a result, the hedge relationship for the Sugar Creek energy derivative was discontinued. Amounts in AOCI of $15,765 and related tax were reclassified from AOCI into earnings in 2019 (note 24(b)(iv)). During the year, the Company entered into an energy derivative contract to reduce the price risk on the expected future purchase of power on the open market at its Tinker Hydroelectric Facility with a notional quantity of 151,680 MW-hours and a price of $38.95 per MW-hr. The contract expires February 2022. The Company was party to a 10 -year forward-starting interest rate swap beginning on July 25, 2018 in order to reduce the interest rate risk related to the probable issuance on that date of a 10 -year C$135,000 bond. During 2018 , the Company amended and extended the forward-starting date of the interest rate swap to begin on March 29, 2019 . During the year, the Company settled the forward-starting interest rate swap contract as it issued C $300,000 10 -year senior unsecured notes with an interest rate of 4.60% (note 9(d)). On May 23, 2019 , the Company entered into a cross-currency swap, coterminous with the subordinated unsecured notes (note 9(e)), to effectively convert the $350,000 U.S. dollar denominated offering into Canadian dollars. The change in the carrying amount of the notes due to changes in spot exchange rates is recognized each period in the consolidated statements of operations as loss (gain) on foreign exchange. The Company designated the entire notional amount of the cross-currency fixed-for-fixed interest rate swap as a hedge of the foreign currency exposure related to cash flows for the interest and principal repayments on the notes. The gain or loss related to the fair value changes of the swap is first reported in OCI and a portion of the change is then reclassified from AOCI into earnings at each reporting date to offset the foreign exchange transaction gain or loss on the notes. 24. Financial instruments (continued) (b) Derivative instruments (continued) (ii) Cash flow hedges (continued) In September 2019 , the Company entered into a forward-starting interest rate swap in order to reduce the interest rate risk related to the quarterly interest payments between July 1, 2024 and July 1, 2029 on the subordinated unsecured notes (note 9(e)). The Company designated the entire notional amount of the three pay-variable and receive-fixed interest rate swaps as a hedge of the future quarterly variable-rate interest payments associated with the subordinated unsecured notes. The following table summarizes OCI attributable to derivative financial instruments designated as a cash flow hedge: 2019 2018 Effective portion of cash flow hedge $ 19,177 $ 1,567 Amortization of cash flow hedge (33 ) (33 ) Amounts reclassified from AOCI (8,564 ) (4,224 ) OCI attributable to shareholders of APUC $ 10,580 $ (2,690 ) The Company expects $8,704 and $2,203 of unrealized gains currently in AOCI to be reclassified, net of taxes into non-regulated energy sales and interest expense, respectively, within the next twelve months, as the underlying hedged transactions settle. (iii) Foreign exchange hedge of net investment in foreign operation The Company is exposed to currency fluctuations from its Canadian-based operations. APUC manages this risk primarily through the use of natural hedges by using Canadian long-term debt to finance its Canadian operations and a combination of foreign exchange forward contracts and spot purchases. APUC only enters into foreign exchange forward contracts with major North American financial institutions having a credit rating of A or better, thus reducing credit risk on these forward contracts. The Company’s Canadian operations are determined to have the Canadian dollar as their functional currency and are exposed to currency fluctuations from their U.S. dollar transactions. The Company designates the amounts drawn on its revolving and bank credit facilities denominated in U.S. dollars as a hedge of the foreign currency exposure of its net investment in its U.S. investments and subsidiaries. The related foreign currency transaction gain or loss designated as, and effective as, a hedge of the net investment in a foreign operation are reported in the same manner as the translation adjustment (in OCI) related to the net investment. A foreign currency gain of $35,277 for the year ended December 31, 2019 ( 2018 - loss of $28,705 ) was recorded in OCI. Concurrent with its C $150,000 , C $200,000 and C $300,000 debenture offerings in December 2012, January 2014, and January 2017, respectively, the Company entered into cross currency swaps, coterminous with the debentures, to effectively convert the Canadian dollar denominated offering into U.S. dollars. The Company designated the entire notional amount of the cross-currency fixed-for-fixed interest rate swap and related short-term U.S. dollar payables created by the monthly accruals of the swap settlement as a hedge of the foreign currency exposure of its net investment in the Renewable Energy Group's U.S. operations. The gain or loss related to the fair value changes of the swap and the related foreign currency gains and losses on the U.S. dollar accruals that are designated as, and are effective as, a hedge of the net investment in a foreign operation are reported in the same manner as the translation adjustment (in OCI) related to the net investment. A gain of $15,946 ( 2018 - loss of $ 41,244 ) was recorded in OCI in 2019 . 24. Financial instruments (continued) (b) Derivative instruments (continued) (iv) Other derivatives The Company provides energy requirements to various customers under contracts at fixed rates. While the production from the Tinker Hydroelectric Facility is expected to provide a portion of the energy required to service these customers, APUC anticipates having to purchase a portion of its energy requirements at the ISO NE spot rates to supplement self-generated energy. This risk is mitigated through the use of short-term financial forward energy purchase contracts that are classified as derivative instruments. The electricity derivative contracts are net settled fixed-for-floating swaps whereby APUC pays a fixed price and receives the floating or indexed price on a notional quantity of energy over the remainder of the contract term at an average rate, as per the following table. These contracts are not accounted for as hedges and changes in fair value are recorded in earnings as they occur. The Company is exposed to interest rate fluctuations related to certain of its floating rate debt obligations, including certain project-specific debt and its revolving credit facilities, its interest rate swaps as well as interest earned on its cash on hand. The Company is exposed to foreign exchange fluctuations related to the portion of its dividend declared and payable in U.S. dollars. This risk is mitigated through the use of currency forward contracts. For the year ended December 31, 2019 , a foreign exchange loss of $983 ( 2018 - gain of $1,115 ) was recorded in the consolidated statements of operations. These currency forward contracts are not accounted for as a hedge. For derivatives that are not designated as hedges, the changes in the fair value are immediately recognized in earnings. The effects on the consolidated statements of operations of derivative financial instruments not designated as hedges consist of the following: 2019 2018 Change in unrealized loss (gain) on derivative financial instruments: Energy derivative contracts $ (530 ) $ 77 Currency forward contract 904 (1,230 ) Total change in unrealized loss (gain) on derivative financial instruments $ 374 $ (1,153 ) Realized loss (gain) on derivative financial instruments: Energy derivative contracts 227 (73 ) Currency forward contract (147 ) 115 Total realized loss on derivative financial instruments $ 80 $ 42 Loss (gain) on derivative financial instruments not accounted for as hedges 454 (1,111 ) Discontinued hedge accounting (note 24(b)(ii)) and other (15,810 ) 632 $ (15,356 ) $ (479 ) Amounts recognized in the consolidated statements of operations consist of: Loss (gain) on derivative financial instruments $ (16,113 ) $ 636 Loss (gain) on foreign exchange 757 (1,115 ) $ (15,356 ) $ (479 ) 24. Financial instruments (continued) (c) Risk management In the normal course of business, the Company is exposed to financial risks that potentially impact its operating results. The Company employs risk management strategies with a view of mitigating these risks to the extent possible on a cost effective basis. Derivative financial instruments are used to manage certain exposures to fluctuations in exchange rates, interest rates and commodity prices. The Company does not enter into derivative financial agreements for speculative purposes. This note provides disclosures relating to the nature and extent of the Company’s exposure to risks arising from financial instruments, including credit risk and liquidity risk, and how the Company manages those risks. Credit risk Credit risk is the risk of an unexpected loss if a customer or counterparty to a financial instrument fails to meet its contractual obligations. The Company’s financial instruments that are exposed to concentrations of credit risk are primarily cash and cash equivalents, accounts receivable, notes receivable and derivative instruments. The Company limits its exposure to credit risk with respect to cash equivalents by ensuring available cash is deposited with its senior lenders, all of which have a credit rating of A or better. The Company does not consider the risk associated with the Renewable Energy Group accounts receivable to be significant as over 87% of revenue from power generation is earned from large utility customers having a credit rating of Baa2 or better by Moody's, or BBB or higher by S&P, or BBB or higher by DBRS. Revenue is generally invoiced and collected within 45 days. The remaining revenue is primarily earned by the Regulated Services Group , which consists of water and wastewater, electric and gas utilities in the United States and Canada. In this regard, the credit risk related to the Regulated Services Group accounts receivable balances of $200,594 is spread over thousands of customers. The Company has processes in place to monitor and evaluate this risk on an ongoing basis including background credit checks and security deposits from new customers. In addition, the regulators of the Regulated Services Group allow for a reasonable bad debt expense to be incorporated in the rates and therefore recovered from rate payers. As of December 31, 2019 , the Company’s maximum exposure to credit risk for these financial instruments was as follows: December 31, 2019 Canadian $ US $ Cash and cash equivalents and restricted cash $ 53,619 $ 45,989 Accounts receivable 42,987 231,006 Allowance for doubtful accounts (89 ) (4,850 ) Notes receivable 15,963 50,680 $ 112,480 $ 322,825 In addition, the Company continuously monitors the creditworthiness of the counterparties to its foreign exchange, interest rate, and energy derivative contracts prior to settlement, and assesses each counterparty’s ability to perform on the transactions set forth in the contracts. The counterparties consist primarily of financial institutions. This concentration of counterparties may impact the Company’s overall exposure to credit risk, either positively or negatively, in that the counterparties may be similarly affected by changes in economic, regulatory or other conditions. Liquidity risk Liquidity risk is the risk that the Company will not be able to meet its financial obligations as they fall due. The Company’s approach to managing liquidity risk is to ensure, to the extent possible, that it will always have sufficient liquidity to meet liabilities when due. As of December 31, 2019 , in addition to cash on hand of $62,485 , the Company had $1,047,216 available to be drawn on its senior debt facilities. Each of the Company’s revolving credit facilities contain covenants that may limit amounts available to be drawn. 24. Financial instruments (continued) (c) Risk management (continued) Liquidity risk (continued) The Company’s liabilities mature as follows: Due less than 1 year Due 2 to 3 years Due 4 to 5 years Due after 5 years Total Long-term debt obligations $ 602,028 $ 468,740 $ 600,721 $ 2,260,416 $ 3,931,905 Convertible debentures — — — — 346 346 Advances in aid of construction 1,165 — — 59,663 60,828 Interest on long-term debt 185,231 318,469 257,443 992,116 1,753,259 Purchase obligations 458,288 — — — 458,288 Environmental obligation 14,970 20,850 1,128 21,536 58,484 Derivative financial instruments: Cross-currency swap 4,149 69,099 3,851 4,666 81,765 Energy derivative and commodity contracts 1,631 909 — 359 2,899 Other obligations 39,115 2,120 2,696 109,094 153,025 Total obligations $ 1,306,577 $ 880,187 $ 865,839 $ 3,448,196 $ 6,500,799 |