---
title: "Commodity Options and Structured Hedges"
book: "Markets III: Commodities, Energy and Crypto"
subject: quant
language: en
chapter: 12
exercises: 8
source: https://one-course.com/books/quant/3/en/chapter/12-commodity-options-and-structured-hedges
---

# Chapter 12 — Commodity Options and Structured Hedges

Every year Mexico’s finance ministry buys put options on the oil it expects to export. In December 2009, when prices had collapsed, its options paid almost 5.1 billion dollars. In 2015 they paid 6.4 billion, and 2.7 billion the year after. It is one of the largest regular hedges in any market, and it is built from the instruments of this chapter: options on the average of a price over a period, bought from banks that hedge them in the futures market. Commodity producers, consumers and governments hedge not a price on a day but a revenue or a cost over months, and their instruments are shaped accordingly. This chapter covers options on commodity futures, average-price and [calendar-spread options](#def-m3-commodity-options-and-structured-hedges-cso), the [swing contracts](#def-m3-commodity-options-and-structured-hedges-swing) of gas and power, the [collars](#def-m3-commodity-options-and-structured-hedges-collar) that producers sell to finance their protection, and the [hedging programmes](#def-m3-commodity-options-and-structured-hedges-programme) that combine them.

## 12.1 Options on commodity futures

**Definition 12.1 (Futures option).**

A *futures option* is an option whose exercise delivers a position in a futures contract (long for a call, short for a put) at the strike, the difference being settled through the futures’ variation margin; it usually expires shortly before the future it is written on.

Because the underlying is a future, which costs nothing to hold, a [futures option](#def-m3-commodity-options-and-structured-hedges-fo) is priced on the forward, not on a spot plus carry: Black’s formula for options on futures, which One Quant Book 5 derives, uses the futures price and discounts the payoff to the option’s expiry. For a future at $60, a one-year put struck at $55 with a volatility of 35% and a rate of 4% is worth $5.51 a barrel. NYMEX’s listed WTI option is American and expires at the close three business days before its future; its WTI [average-price option](#def-m3-commodity-options-and-structured-hedges-apo) is European, cash-settled on the month’s average settlement of the nearby future times 1 000 barrels, and expires on the month’s last business day.

Commodity options differ from equity options in the shape of their volatility smile (One Quant Book 1, chapter 25). Where supply shocks push prices up (a refinery outage, a frost, a war in a producing region), out-of-the-money calls can be as dear as puts, or dearer; where a glut is the fear, puts are. And near-dated options carry the higher volatility of near-dated futures, the [Samuelson effect](https://one-course.com/books/quant/3/en/chapter/10-forward-curves-storage-and-convenience-yield#def-m3-forward-curves-storage-and-convenience-yield-samuelson) of [Chapter 10](https://one-course.com/books/quant/3/en/chapter/10-forward-curves-storage-and-convenience-yield#ch-m3-forward-curves-storage-and-convenience-yield).

## 12.2 Average-price and calendar-spread options

A producer that sells oil every day of a month is exposed to the month’s average price, not to its last day’s. Its option is on that average.

**Definition 12.2 (Average-price option).**

An *average-price option* (APO) pays at expiry on the arithmetic average of a reference price over a period (a month, a quarter, a year) against its strike: a put pays $\max(K - \bar P, 0)$ per unit. It is the product commodity markets trade under that name; One Quant Book 5, chapter 16, prices the general Asian option.

An average moves less than its last observation: with daily fixings, a lognormal price’s average over the option’s life has about $1/\sqrt 3$ of the price’s volatility. The average-price put of the example above, on twelve monthly fixings, is worth $2.66 a barrel by simulation, less than half the vanilla put’s $5.51 ([Figure 12.1](#fig-m3-commodity-options-and-structured-hedges-dist)).

![The futures price at the end of a year and the average of its twelve monthly fixings, both starting at $60 with 35% volatility, 200 000 simulated paths in bins of $5: the average is far less dispersed, so options on it are cheaper. Illustrative; data: the chapter’s tutorial.](https://one-course.com/images/onecourse/chapters/quant-3/m3-commodity-options-and-structured-hedges/fig-bbc6207f87e0.svg)

***Figure 12.1.** The futures price at the end of a year and the average of its twelve monthly fixings, both starting at $60 with 35% volatility, 200 000 simulated paths in bins of $5: the average is far less dispersed, so options on it are cheaper. Illustrative; data: the chapter’s tutorial.*

**Definition 12.3 (Calendar-spread option).**

A *calendar-spread option* (CSO) is an option on the difference between the prices of two delivery months of the same commodity, for example a call paying $\max(F_{T_1} - F_{T_2}
- K, 0)$ on the first minus the second month.

A storage owner is naturally long [calendar-spread options](#def-m3-commodity-options-and-structured-hedges-cso) (it profits when near prices rise above far ones by more than the cost of carry), and a refiner or a shipper is long or short them according to its timing. Their prices depend on the correlation between the two months, which is high but falls when the curve’s shape changes; One Quant Book 6, chapter 16, models spread options.

## 12.3 Swing contracts

Gas and power are bought under contracts that give the buyer flexibility in how much it takes, because its own demand varies with the weather.

**Definition 12.4 (Swing contract, take-or-pay clause).**

A *swing contract* lets its holder choose, each day, a quantity between a minimum and a maximum around a daily contract quantity, at a fixed or indexed price, subject to limits on the total taken over the year. A *take-or-pay clause* obliges the buyer to pay for a minimum annual quantity whether or not it takes it.

![A swing contract, schematic: each day the holder nominates between a minimum and a maximum around the daily contract quantity (DCQ); the year’s total must stay within annual limits, and the take-or-pay clause makes the lowest total a payment in any case. Stylised, no data.](https://one-course.com/images/onecourse/chapters/quant-3/m3-commodity-options-and-structured-hedges/fig-e402469a7d8e.svg)

***Figure 12.2.** A [swing contract](#def-m3-commodity-options-and-structured-hedges-swing), schematic: each day the holder nominates between a minimum and a maximum around the daily contract quantity (DCQ); the year’s total must stay within annual limits, and the [take-or-pay clause](#def-m3-commodity-options-and-structured-hedges-swing) makes the lowest total a payment in any case. Stylised, no data.*

A [swing contract](#def-m3-commodity-options-and-structured-hedges-swing) is a strip of daily options to buy more or less at the contract price, linked by the annual limits: taking the maximum today uses up flexibility that may be worth more later. Its value therefore depends on the whole path of prices, and its optimal use is a dynamic programme like the battery of [Chapter 6](https://one-course.com/books/quant/3/en/chapter/6-power-markets-ii-trading#ch-m3-power-markets-trading); the model is One Quant Book 6’s.

**Example 12.5 (Three days of swing).**

A buyer holds a three-day contract at $40\,\mathrm{EUR}/\mathrm{MWh}$ with a daily contract quantity of 100 MWh, a swing of 20 MWh either way, and a total that must equal 300 MWh. Market prices turn out to be 30, 50 and 40. Taking 80 on the first day (buying the missing 20 in the market at 30) and 120 on the second (selling the extra 20 at 50) is worth $20 \times (40 - 30) + 20 \times (50 - 40) = 400$ euros more than taking 100 every day. With prices unknown in advance, the holder must decide each day, and the flexibility is worth less than this perfect-foresight value.

## 12.4 Collars and three-way collars

Puts cost money. A producer that wants a floor but will not pay for it sells upside instead.

**Definition 12.6 (Collar, three-way collar).**

A producer’s *collar* buys a put and sells a call, usually with strikes chosen so that the premiums cancel (a zero-cost collar): its realised price is kept between the two strikes. A *three-way collar* adds a sold put below the bought one: the producer is protected only between the two put strikes, and the extra premium lets it raise the floor or the cap.

![A producer’s realised price per barrel against the year’s average price. The collar keeps it between $50 and $75; the three-way protects from $60 down to $45 only, then follows the price down with a $15 cushion, and gives up everything above $70.24; the bought put keeps all the upside at the cost of its premium. Illustrative; data: the chapter’s tutorial.](https://one-course.com/images/onecourse/chapters/quant-3/m3-commodity-options-and-structured-hedges/fig-ac297cd2d30d.svg)

***Figure 12.3.** A producer’s realised price per barrel against the year’s average price. The [collar](#def-m3-commodity-options-and-structured-hedges-collar) keeps it between $50 and $75; the three-way protects from $60 down to $45 only, then follows the price down with a $15 cushion, and gives up everything above $70.24; the bought put keeps all the upside at the cost of its premium. Illustrative; data: the chapter’s tutorial.*

**Example 12.7 (What each structure costs).**

With the future at $60, 35% volatility and a year of monthly averaging, the 50/75 [collar](#def-m3-commodity-options-and-structured-hedges-collar) costs $0.07 a barrel, close to zero; the 55 average-price put costs $2.66. A three-way that buys the 60 put and sells the 45 put costs the same $2.66 if it also sells a call at $70.24. A producer with a budget of $50 a barrel would, unhedged, fall $8.43 short of it in the worst 5% of years; with either the [collar](#def-m3-commodity-options-and-structured-hedges-collar) or the put its worst-5% realised price stays above the budget.

The three-way was popular with oil producers because it looks cheap and protects against moderate falls. Its weakness is the sold put: in a collapse the producer’s protection stops at the lower strike just when it is most needed.

![Distribution of a producer’s realised average price over a year, simulated from a $60 future with 35% volatility: unhedged, with the 50/75 collar, and with the 55 average-price put net of its $2.66 premium. The collar truncates both tails; the put truncates only the lower one, at a cost. Illustrative; data: the chapter’s tutorial.](https://one-course.com/images/onecourse/chapters/quant-3/m3-commodity-options-and-structured-hedges/fig-ca53f3cf5e2a.svg)

***Figure 12.4.** Distribution of a producer’s realised average price over a year, simulated from a $60 future with 35% volatility: unhedged, with the 50/75 [collar](#def-m3-commodity-options-and-structured-hedges-collar), and with the 55 average-price put net of its $2.66 premium. The [collar](#def-m3-commodity-options-and-structured-hedges-collar) truncates both tails; the put truncates only the lower one, at a cost. Illustrative; data: the chapter’s tutorial.*

## 12.5 Producer, consumer and sovereign hedging programmes

**Definition 12.8 (Hedging programme).**

A *hedging programme* is a standing policy, set by a board or a ministry, fixing what share of future production or consumption is hedged, over what horizon, with which instruments, and how the hedges are executed and reported.

A producer hedges to protect its investment budget and its debt covenants; a consumer (an airline, a utility, a food processor) to protect its margins; a government to protect its budget. They choose differently: producers favour swaps and [collars](#def-m3-commodity-options-and-structured-hedges-collar) that cost nothing upfront, consumers calls or [collars](#def-m3-commodity-options-and-structured-hedges-collar), and governments puts, which cost a known premium and leave the upside to the treasury.

**As of September 2026 — Mexico’s oil hedge.**

Mexico’s government buys, each year, Asian (average-price) put options on its oil exports for the year ahead, from banks. Reported payouts: almost USD 5.1 billion for 2009, USD 6.4 billion for 2015 and USD 2.7 billion for 2016. On the cost, in January 2020 the finance minister put it at about USD 1 billion a year and a deputy minister at USD 1.2 billion on average over the programme’s life, as reported by the press.

## 12.6 Tutorial: pricing an average-price put and a three-way

**Goal.** Price a vanilla put on a future and an average-price put, and solve the call strike of a [three-way collar](#def-m3-commodity-options-and-structured-hedges-collar) that costs as much as the put. **End state:** Figures [12.1](#fig-m3-commodity-options-and-structured-hedges-dist) and [12.3](#fig-m3-commodity-options-and-structured-hedges-payoffs) and [Example 12.7](#ex-m3-commodity-options-and-structured-hedges-costs).

1. **The legs.** A leg is a swap, put or call, bought or sold; structures are lists of legs. `@dataclass (frozen=True ) class Leg : """One instrument per barrel: kind in swap, put, call; side +1 bought, -1 sold.""" kind: str strike: float side: int = 1 def payoff (self , x: np.ndarray) -> np.ndarray: if self .kind == " swap " : # a producer sells a swap: receives strike - x return self .side * (x - self .strike) if self .kind == " put " : return self .side * np.maximum(self .strike - x, 0.0 ) if self .kind == " call " : return self .side * np.maximum(x - self .strike, 0.0 ) raise ValueError(self .kind) def collar (put_strike: float , call_strike: float ) -> list [Leg]: """Producer's collar: buy a put, sell a call.""" return [Leg(" put " , put_strike, 1 ), Leg(" call " , call_strike, -1 )] def three_way (put_strike: float , lower_put: float , call_strike: float ) -> list [Leg]: """Producer's three-way collar: buy a put, sell a lower put, sell a call.""" return [Leg(" put " , put_strike, 1 ), Leg(" put " , lower_put, -1 ), Leg(" call " , call_strike, -1 )]` **Listing 12.1.** Legs, collars and three-way collars. code/firm/hedgeprog/firm_hedgeprog.py
2. **Simulate and value.** Monthly averages of a driftless lognormal future, then mean discounted payoffs. `def simulate_averages (f0: float , sigma: float , t: float , steps: int , n: int , seed: int = 7 ) -> np.ndarray: """Arithmetic averages over `steps` equally spaced fixings in (0, t] of a driftless lognormal futures price (the risk-neutral dynamics of a future).""" rng = np.random.default_rng(seed) dt = t / steps z = rng.standard_normal((n, steps)) logf = np.log(f0) + np.cumsum(-0.5 * sigma * sigma * dt + sigma * math.sqrt(dt) * z, axis=1 ) return np.exp(logf).mean(axis=1 ) def value (legs: list [Leg], settlements: np.ndarray, r: float , t: float ) -> float : """Discounted mean payoff per barrel of a set of legs on simulated settlement prices.""" total = sum (leg.payoff(settlements) for leg in legs) return float (math.exp(-r * t) * np.mean(total))` **Listing 12.2.** Averages by simulation and the value of a structure. code/firm/hedgeprog/firm_hedgeprog.py
3. **Run** `m3_options.vanilla_vs_average()` , `sovereign()` , `producer_car()` and `fig_options.py` .

**What to change next.** Use daily instead of monthly fixings and compare with the $1/\sqrt3$ rule; add a volatility skew (a higher volatility for low strikes) and see which structure becomes dearer.

## 12.7 Build: the hedging-programme evaluator

**Purpose.** The miniature firm structures hedges for producers and consumers: it must value their structures, show their payoffs, and measure what each does to the client’s worst years.

**Interface.** `black76(f, k, t, sigma, r, call)`; `Leg(kind, strike, side).payoff`; `collar`, `three_way`; `simulate_averages(f0, sigma, t, steps, n, seed)`; `value(legs, settlements, r, t)`; `hedged_revenue(price, legs, premium)`; `cash_flow_at_risk(revenue, budget, q)`.

**Rules.** Payoffs per barrel on the settlement price (the average for average-price legs); simulation seeds fixed; the future is a martingale under the pricing measure; cash flow at risk is the shortfall of the lower quantile below the budget.

**Acceptance tests.** `code/firm/hedgeprog/tests/`: put–call parity for Black’s formula; the average-price put cheaper than the vanilla and the simulated average centred on the forward; a [collar](#def-m3-commodity-options-and-structured-hedges-collar) bounding revenue; a three-way’s capped protection.

**Stretch.** Volatility smiles by strike; quarterly and annual averaging periods; the producer’s volumes as uncertain as its prices.

Sources and further reading

- MoneyWeek, “Mexico’s lucrative Hacienda hedge”, 21 April 2017.
- Jain Family Institute, *Mexico’s Petroleum Hedging Program* , 2023.
- Alto Nivel (with Reuters), “¿Qué son las coberturas petroleras y cuánto le cuestan a México?”, 10 January 2020.
- F. Black, “The pricing of commodity contracts”, *Journal of Financial Economics* , 1976.
- CME Group, WTI average price options; NYMEX Rulebook, chapters 310 (Light Sweet Crude Oil Option) and 341 (WTI Average Price Option) (Internet Archive copies).

## 12.8 Exercises

**Exercise 12.1 ★.**

A producer sells a swap at $62 for a year of monthly averages. The year averages $55. What does the swap pay, and what is the producer’s realised price?

**Solution of Exercise 12.1.**

The swap pays $62 - 55 = \$7$ a barrel; the producer realises $62.

**Exercise 12.2 ★.**

Why is an [average-price option](#def-m3-commodity-options-and-structured-hedges-apo) cheaper than the vanilla option with the same strike and expiry?

**Solution of Exercise 12.2.**

The average of prices over the period is less dispersed than the price at its end, because early fixings cannot move after they are set and the average smooths the rest; a less volatile underlying makes a cheaper option.

**Exercise 12.3 ★.**

Give the realised price per barrel of the 50/75 [collar](#def-m3-commodity-options-and-structured-hedges-collar) if the year averages $40, $60 and $90.

**Solution of Exercise 12.3.**

$50, $60 and $75.

**Exercise 12.4 ★★.**

For the three-way 60/45/70.24, give the realised price if the year averages $30, $50, $65 and $90.

**Solution of Exercise 12.4.**

$45 (the price plus the 15-dollar put spread), $60, $65 and $70.24.

**Exercise 12.5 ★★.**

With twelve monthly fixings, the volatility of the average’s logarithm in the simulation is 21.3%. Compare it with $35\%/\sqrt3$ and explain the difference.

**Solution of Exercise 12.5.**

$35\%/\sqrt3 = 20.2\%$ holds for continuous averaging; with twelve fixings, the last at expiry, the exact factor is $\sqrt{(n+1)(2n+1)/(6n^2)} = 0.613$, giving 21.5%, and the simulation’s 21.3% is close to it (the log of an average is not exactly normal).

**Exercise 12.6 ★★.**

Why does a storage owner hold, in effect, [calendar-spread options](#def-m3-commodity-options-and-structured-hedges-cso)?

**Solution of Exercise 12.6.**

It can buy the commodity for the near date and sell it for the far date whenever the spread exceeds its cost of storage, and do nothing otherwise: its payoff is a call on the far-minus-near spread struck at the storage cost.

**Exercise 12.7 ★★★.**

*Coding.* With `black76`, verify put–call parity for the [futures option](#def-m3-commodity-options-and-structured-hedges-fo) of the text, and give the call’s value.

**Solution of Exercise 12.7.**

Call minus put is $10.31 - 5.51 = 4.80 = e^{-0.04}(60 - 55)$; the call is worth $10.31.

**Exercise 12.8 ★★★.**

*Find the flaw.* “Our [three-way collar](#def-m3-commodity-options-and-structured-hedges-collar) costs nothing and protects us from $60 down.”

**Solution of Exercise 12.8.**

It protects only between $60 and the lower put strike: below that the producer follows the price down with a fixed cushion, exactly in the collapse it wanted to insure. And it costs its upside above the call strike. “Costs nothing” means only that the premiums cancel today.

## 12.9 Problem: The Finance Ministry’s Put

**Problem 12.1.**

Weekend problem — a sovereign’s annual oil put

A finance ministry expects to export 250 million barrels next year and budgets them at the forward, $60. It can buy an average-price put at $55, or spend the same premium on a three-way: buy the 60 put, sell the 45 put, and sell a call. Volatility is 35%, the rate 4%, and averaging monthly (all illustrative).

**Part I — The put.**

1. What is the put’s premium per barrel?
2. What does the programme cost, in dollars?
3. What share of the budgeted export revenue is that?
4. What does the put pay if the year averages $45?
5. And if it averages $30?

**Part II — The three-way.**

6. At what strike must the call be sold for the same premium?
7. What does the three-way pay at an average of $45?
8. And at $30?
9. What does it cost the ministry if the year averages $90?
10. Which structure does better in which years?

**Part III — Execution.**

11. Why buy [average-price options](#def-m3-commodity-options-and-structured-hedges-apo) rather than vanillas?
12. How do the selling banks hedge, and what does that do to the futures market?
13. Why might the ministry spread its purchases over weeks and keep them secret?
14. What does the ministry do if its exports fall short of 250 million barrels?
15. How should the premium be accounted for in the budget?

**Part IV — Judgement.**

16. Why might a government prefer puts to swaps?
17. What does the programme’s history of payouts say about its value?
18. When is a three-way the wrong choice for a sovereign?
19. State the *named result* : the cost of the put programme as a share of revenue, and its payouts in a $45 and a $30 year against the three-way’s.
20. In one sentence: what does a sovereign buy with a put?

**Solution of Problem 12.1.**

**1.** $2.66 a barrel. **2.** About USD 664 million. **3.** 4.4% of USD 15 billion. **4.** USD 2.5 billion. **5.** USD 6.25 billion. **6.** $70.24. **7.** USD 3.75 billion. **8.** Also USD 3.75 billion: the protection stops at $45. **9.** About USD 4.94 billion paid on the call. **10.** The three-way does better in moderate falls (to about $45), the put in collapses and in rallies. **11.** The budget depends on the year’s average export price, and average options are cheaper. **12.** They sell futures (and adjust as the average fixes), which adds selling pressure when the programme is placed and as prices fall. **13.** To limit the market impact of a known, large buyer and of the banks’ hedges. **14.** The excess protection becomes a speculative position; the ministry can sell the surplus puts or accept the payout. **15.** As an insurance cost, spread over the year it covers. **16.** Puts cap the budget’s downside while keeping the upside, and cost a known amount; a swap gives up the upside and can require payments in rallies. **17.** Large payouts in crisis years and premiums lost in others: its value is the budget certainty it bought, not a profit. **18.** When the fiscal risk is a deep collapse, which the sold put leaves uncovered, or when a rally’s upside matters. **19.** *Named result:* the put costs 4.4% of budgeted revenue (USD 664 million) and pays USD 2.5 billion in a $45 year and USD 6.25 billion in a $30 year, against USD 3.75 billion in both for the three-way of equal premium. **20.** A floor under its budget, at a known premium, keeping the upside.

## 12.10 Interview questions

**Interview question 12.1 ★ trader.**

What is an [average-price option](#def-m3-commodity-options-and-structured-hedges-apo), and who needs it?

**Solution of Interview question 12.1.**

An option on the average of a price over a period: producers and consumers who buy or sell every day and are exposed to the average, not to one day’s price.

*What the interviewer is looking for: matching the exposure, and cheapness.*

**Interview question 12.2 ★ trader, bank.**

Explain a zero-cost [collar](#def-m3-commodity-options-and-structured-hedges-collar) to a producer’s finance director.

**Solution of Interview question 12.2.**

You buy a floor and pay for it by selling a ceiling: your price will be between the two, whatever the market does, and nothing is paid upfront. You give up gains above the ceiling.

*What the interviewer is looking for: clear plain language on floor, cap and opportunity cost.*

**Interview question 12.3 ★★ researcher.**

Why is the effective volatility of an average about $1/\sqrt3$ of the price’s?

**Solution of Interview question 12.3.**

The average of a Brownian path over $[0,T]$ has variance $\int_0^T\!\int_0^T \min(s,u)\,ds\,du/T^2 = T/3$, so its standard deviation is $\sigma\sqrt{T/3}$: $1/\sqrt3$ of the terminal value’s.

*What the interviewer is looking for: the integral of the covariance of Brownian motion.*

**Interview question 12.4 ★★ bank, risk.**

You sold a large average-price put to a sovereign. How do you hedge it through the year?

**Solution of Interview question 12.4.**

Short a put: buy futures to be delta-neutral (sell futures if the client’s position makes you long delta), reduce the hedge as fixings accumulate (fixed fixings have no delta), manage gamma and vega with listed options, and plan the hedge’s market impact.

*What the interviewer is looking for: delta decaying with fixings, vega management, liquidity.*

**Interview question 12.5 ★★ trader.**

What is a [swing contract](#def-m3-commodity-options-and-structured-hedges-swing), and why is it worth more than a fixed-volume contract?

**Solution of Interview question 12.5.**

A contract letting the holder vary its daily take between limits, subject to annual limits and a take-or-pay minimum. The flexibility is a set of options to take more when the price is high and less when it is low, which a fixed-volume contract lacks.

*What the interviewer is looking for: flexibility as options, and the annual constraints.*

**Interview question 12.6 ★★★ developer, researcher.**

Design a tool that proposes and compares hedging structures for a producer, given its budget and covenants.

**Solution of Interview question 12.6.**

Inputs: production forecasts with uncertainty, budget and covenant thresholds, market curves and smiles, credit lines. Structures: swaps, puts, [collars](#def-m3-commodity-options-and-structured-hedges-collar), three-ways over chosen periods. Output: cost, payoff charts, distribution of cash flow and covenant breach probability under simulated prices and volumes, and margin needs.

*What the interviewer is looking for: objective tied to covenants, joint price and volume risk.*
