Financial Instruments and Off-Balance Sheet Risk | Financial Instruments and Off-Balance Sheet Risk As of September 30, 2017 and December 31, 2016 , the carrying amounts of cash, cash equivalents and accounts receivable approximated fair value because of the short maturity of these instruments. As of September 30, 2017 and December 31, 2016 , the carrying value of the Partnership’s margin deposits with brokers approximates fair value and consists of initial margin with futures transaction brokers, along with variation margin, which is paid or received on a daily basis, and is included in other current assets. As of September 30, 2017 and December 31, 2016 , the carrying value of the Partnership’s debt approximated fair value due to the variable interest nature of these instruments. Derivative Instruments The Partnership utilizes derivative instruments consisting of futures contracts, forward contracts, swaps, options and other derivatives individually or in combination, to mitigate its exposure to fluctuations in prices of refined petroleum products and natural gas. The use of these derivative instruments within the Partnership's risk management policy may generate gains or losses from changes in market prices. The Partnership enters into futures and over-the-counter (“OTC”) transactions either on regulated exchanges or in the OTC market. Futures contracts are exchange-traded contractual commitments to either receive or deliver a standard amount or value of a commodity at a specified future date and price, with some futures contracts based on cash settlement rather than a delivery requirement. Futures exchanges typically require margin deposits as security. OTC contracts, which may or may not require margin deposits as security, involve parties that have agreed either to exchange cash payments or deliver or receive the underlying commodity at a specified future date and price. The Partnership posts initial margin with futures transaction brokers, along with variation margin, which is paid or received on a daily basis, and is included in other current assets. In addition, the Partnership may either pay or receive margin based upon exposure with counterparties. Payments made by the Partnership are included in other current assets, whereas payments received by the Partnership are included in accrued liabilities. Substantially all of the Partnership’s commodity derivative contracts outstanding as of September 30, 2017 will settle prior to March 31, 2019. The Partnership enters into some master netting arrangements to mitigate credit risk with significant counterparties. Master netting arrangements are standardized contracts that govern all specified transactions with the same counterparty and allow the Partnership to terminate all contracts upon occurrence of certain events, such as a counterparty’s default. The Partnership has elected not to offset the fair value of its derivatives, even where these arrangements provide the right to do so. The Partnership’s derivative instruments are recorded at fair value, with changes in fair value recognized in net income (loss) each period. The Partnership’s fair value measurements are determined using the market approach and includes non-performance risk and time value of money considerations. Counterparty credit is considered for receivable balances, and the Partnership’s credit is considered for payable balances. The Partnership determines fair value using a hierarchy for the inputs used to measure the fair value of financial assets and liabilities based on the source of the input, which generally range from quoted prices for identical instruments in a principal trading market (Level 1) to estimates determined using significant unobservable inputs (Level 3). Multiple inputs may be used to measure fair value; however, the level of fair value is based on the lowest significant input level within this fair value hierarchy. Details on the methods and assumptions used to determine the fair values are as follows: Fair value measurements based on Level 1 inputs: Measurements that are most observable and are based on quoted prices of identical instruments obtained from the principal markets in which they are traded. Closing prices are both readily available and representative of fair value. Market transactions occur with sufficient frequency and volume to assure liquidity. Fair value measurements based on Level 2 inputs: Measurements derived indirectly from observable inputs or from quoted prices from markets that are less liquid are considered Level 2. Measurements based on Level 2 inputs include OTC derivative instruments that are priced on an exchange traded curve, but have contractual terms that are not identical to exchange traded contracts. The Partnership utilizes fair value measurements based on Level 2 inputs for its fixed forward contracts, over-the-counter commodity price swaps, interest rate swaps and forward currency contracts. Fair value measurements based on Level 3 inputs: Measurements that are least observable are estimated from significant unobservable inputs determined from sources with little or no market activity for comparable contracts or for positions with longer durations. The Partnership does not offset fair value amounts recognized for the right to reclaim cash collateral (a receivable) or the obligation to return cash collateral (a payable) against the fair value of derivative instruments executed with the same counterparty under the same master netting arrangement. The Partnership had no right to reclaim or obligation to return cash collateral as of September 30, 2017 and December 31, 2016 . The following table presents financial assets and financial liabilities of the Partnership measured at fair value on a recurring basis: As of September 30, 2017 Fair Value Measurement Quoted Prices in Active Markets Level 1 Significant Other Observable Inputs Level 2 Significant Unobservable Inputs Level 3 Financial assets: Commodity fixed forwards $ 62,367 $ — $ 62,367 $ — Commodity swaps and options 173 — 173 — Commodity derivatives 62,540 — 62,540 — Interest rate swaps 1,825 — 1,825 — Total $ 64,365 $ — $ 64,365 $ — Financial liabilities: Commodity fixed forwards $ 70,692 $ — $ 70,692 $ — Commodity swaps and options 112 — 112 — Commodity derivatives 70,804 — 70,804 — Interest rate swaps 235 — 235 — Currency swap derivative liabilities 2 — 2 — Total $ 71,041 $ — $ 71,041 $ — As of December 31, 2016 Fair Value Quoted Significant Significant Financial assets: Commodity fixed forwards $ 65,618 $ — $ 65,618 $ — Commodity derivatives 65,618 — 65,618 — Interest rate swaps 1,240 — 1,240 — Total $ 66,858 $ — $ 66,858 $ — Financial liabilities: Commodity fixed forwards $ 94,875 $ — $ 94,875 $ — Commodity swaps and options 103 — 103 — Commodity derivatives 94,978 — 94,978 — Interest rate swaps 336 — 336 — Other 25 — 25 — Total $ 95,339 $ — $ 95,339 $ — The Partnership enters into derivative contracts with counterparties, some of which are subject to master netting arrangements, which allow net settlements under certain conditions. The Partnership presents derivatives at gross fair values in the Condensed Consolidated Balance Sheets. The maximum amount of loss due to credit risk that the Partnership would incur if its counterparties failed completely to perform according to the terms of the contracts, based on the net fair value of these financial instruments, exclusive of cash collateral, was $60.2 million at September 30, 2017 . Information related to these offsetting arrangements is set forth below: As of September 30, 2017 Gross Amount Not Offset in the Balance Sheet Gross Amount of Gross Amount of Financial Instruments Cash Collateral Posted Net Amount Commodity derivative assets $ 62,540 $ — $ 62,540 $ (4,141 ) $ (13 ) $ 58,386 Interest rate swap derivative assets 1,825 — 1,825 — — 1,825 Fair value of derivative assets $ 64,365 $ — $ 64,365 $ (4,141 ) $ (13 ) $ 60,211 Commodity derivative liabilities $ (70,804 ) $ — $ (70,804 ) $ 4,141 $ — $ (66,663 ) Interest rate swap derivative liabilities (235 ) — (235 ) — — (235 ) Other liabilities (2 ) — (2 ) — — (2 ) Fair value of derivative liabilities $ (71,041 ) $ — $ (71,041 ) $ 4,141 $ — $ (66,900 ) As of December 31, 2016 Gross Amount Not Offset in Gross Amount of Gross Amount of Assets/ Liabilities in the Balance Sheet Financial Cash Net Amount Commodity derivative assets $ 65,618 $ — $ 65,618 $ (2,154 ) $ (209 ) $ 63,255 Interest rate swap derivative assets 1,240 — 1,240 — — 1,240 Fair value of derivative assets $ 66,858 $ — $ 66,858 $ (2,154 ) $ (209 ) $ 64,495 Commodity derivative liabilities $ (94,978 ) $ — $ (94,978 ) $ 2,154 $ — $ (92,824 ) Interest rate swap derivative liabilities (336 ) — (336 ) — — (336 ) Other liabilities (25 ) — (25 ) — — (25 ) Fair value of derivative liabilities $ (95,339 ) $ — $ (95,339 ) $ 2,154 $ — $ (93,185 ) The following table presents total realized and unrealized gains (losses) on derivative instruments utilized for commodity risk management purposes included in cost of products sold (exclusive of depreciation and amortization): Three Months Ended September 30, Nine Months Ended September 30, 2017 2016 2017 2016 Refined products contracts $ (17,281 ) $ 2,957 $ 27,637 $ (2,176 ) Natural gas contracts (908 ) (3,370 ) 13,850 16,472 Total $ (18,189 ) $ (413 ) $ 41,487 $ 14,296 There were no discretionary trading activities for the three and nine months ended September 30, 2017 and 2016 . The following table presents gross volume of commodity derivative instruments outstanding for the periods indicated: As of September 30, 2017 As of December 31, 2016 Refined Products (Barrels) Natural Gas (MMBTUs) Refined Products (Barrels) Natural Gas (MMBTUs) Long contracts 6,785 132,367 9,882 131,240 Short contracts (10,051 ) (71,639 ) (13,940 ) (76,556 ) Interest Rate Derivatives The Partnership has entered into interest rate swaps to manage its exposure to changes in interest rates on its Credit Agreement. The Partnership’s interest rate swaps hedge actual and forecasted LIBOR borrowings have been designated as cash flow hedges. Counterparties to the Partnership’s interest rate swaps are large multinational banks and the Partnership does not believe there is a material risk of counterparty non-performance. The Partnership's interest rate swap agreements outstanding as of September 30, 2017 were as follows: Interest Rate Swap Agreements Beginning Ending Notional Amount January 2017 January 2018 $ 225,000 January 2018 January 2019 $ 275,000 January 2019 January 2020 $ 125,000 January 2020 January 2021 $ 50,000 January 2021 January 2022 $ 50,000 There was no material ineffectiveness determined for the cash flow hedges for the three and nine months ended September 30, 2017 and 2016 . The Partnership records unrealized gains and losses on its interest rate swaps as a component of accumulated other comprehensive loss, net of tax, which is reclassified to earnings as interest expense when the payments are made. As of September 30, 2017 , the amount of unrealized gains, net of tax, expected to be reclassified to earnings during the following twelve-month period was $0.8 million . |