Derivatives, One Step at a Time

Keep a hedge alive as contracts expire

Loading Java…

Keep a hedge alive as contracts expire

The bakery needs protection beyond the maturities with reliable liquidity. It can match separate business dates with a strip of futures, or stack positions in a liquid near month and roll them forward. A sequence of trades adds new basis and funding decisions. Compare their entire cash-flow paths instead of calling a roll a permanent price lock.

Predict first, then run each standalone calculation. Make a requested edit only in the named cell: other exercises retain their own stated inputs. Enter numbers without currency symbols or units, rounded to two decimals unless the check asks for four. None of the model prices is a forecast or a trading recommendation.

What stays protected when a hedge is rolled?

A strip uses contract maturities aligned with several exposure dates. Stack-and-roll initially concentrates the hedge in a more liquid nearer maturity, then closes and replaces it as time passes. Choosing the best contract considers grade, location, business date, liquidity and the availability of a later close, not just the smallest visible spread.

For a planned buyer with positive proxy co-movement, the long hedge’s h=Cov⁡(ΔS,ΔF)Var⁡(ΔF)h = \frac{\operatorname{Cov}(\Delta S,\Delta F)}{\operatorname{Var}(\Delta F)} is a regression slope when the regression includes an intercept.

Target contracts=h physical unitscontract units\text{Target contracts} = h\,\frac{\text{physical units}}{\text{contract units}}

These formulas use absolute price changes in compatible units and matching sampling intervals. Return-based hedge estimates instead need value/notional sizing. Correlation of price levels, a tiny sample and shifting relationships do not establish a stable hedge.

Rolling examplePrice per physical unit
Open first near contract50
Close first contract47
Open replacement at the same roll date48
Close replacement at the business date53
Physical spot purchase at the business date54

For 100 long units, total nominal futures P&L is 100[(47−50)+(53−48)]100\big[(47 - 50) + (53 - 48)\big]. The roll-date gap 48−4748-47 changes the next entry terms; opening a future does not itself require paying its full notional. Actual fees, margin and settlement still require cash.

Daily settlement can earn or cost interest before the business cash arrives. A simple tailing illustration discounts an untailed exposure using a stated remaining funding factor. Exact financing-aware hedging needs cash dates, rate assumptions and rebalancing; a single haircut to contract count is not a universal recipe.

Forwards and futures with matching terms have equal model quotes under deterministic interest rates and the usual frictionless assumptions. With stochastic rates, correlation between settlement gains and reinvestment/funding rates can change their quotes; the sign depends on the joint dynamics.

Scenario and assumptions

Use fictional 25-unit futures and a 100-unit buyer for rolling unless a different example is specified. Regression inputs are supplied estimates, not evidence from the two roll intervals. Ignore fees and interest in the nominal rolling P&L; add explicit funding only where stated. Exercise 5 uses $600 initial collateral, $450 maintenance and top-up to $600 only below maintenance. Exercises 6–7 are separate simplified financing illustrations, not extensions of that margin account.

Exercise 1 — Interpret a regression-based hedge ratio

A supplied historical estimate gives covariance of absolute spot and futures price changes of 4.8 and futures-change variance of 4.0, both in compatible squared price units. Divide covariance by variance. This is a minimum-variance estimate, not a promise to eliminate every loss; positive hh implies longs for the planned buyer.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What estimated futures units per physical unit does the regression imply?

Need a hint?

Use the stated quote direction, cash-flow dates and assumptions. Keep full precision internally; round this answer to 2 decimal places.

Waiting for your answer.

Exercise 2 — Convert the estimate to contracts when quantity changes

At h=1.2h=1.2, 100 physical units imply 4.8 of the 25-unit futures. Run that target, then change the forecast purchase quantity from 100 to 150. Compare whole-contract candidates around the new target rather than silently using the old five-contract hedge. Forecast quantity itself can be uncertain.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

After changing physical quantity to 150, what is the unrounded contract target?

Need a hint?

Use the stated quote direction, cash-flow dates and assumptions. Keep full precision internally; round this answer to 2 decimal places.

Waiting for your answer.

Exercise 3 — Add the actual gains across two contracts

Return to 100 long units in the stated rolling path. The first contract loses $300 and the replacement gains $500. Add only entry-to-close changes within each contract. Subtract the total from the $5,400 physical purchase bill to get $5,200 effective cost, or $52 per unit, before funding.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is total nominal futures P&L across the two legs?

Need a hint?

Use the stated quote direction, cash-flow dates and assumptions. Keep full precision internally; round this answer to 2 decimal places.

Waiting for your answer.

Read the picture

A long 100-unit rolling hedge loses $300 on its first contract and gains $500 on its replacement; the $200 total gain leaves a $5,200 effective bill at $54 spot.

A long 100-unit rolling hedge loses $300 on its first contract and gains $500 on its replacement; the $200 total gain leaves a $5,200 effective bill at $54 spot.

The figure shows a fixed worked example. Editing a calculation does not update this illustration.

Exercise 4 — Interpret the roll gap correctly

At the roll date close the old future at 47 and open the replacement at 48. Multiplying the one-dollar gap by 100 compares the two contracts’ quote levels. It is not an immediate full-notional purchase cash payment. A matched strip would have different initial dates/quotes and does not automatically share this path’s outcome.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · CHOOSE ONE

What does the $100 quote-gap comparison represent?

Need a hint?

Separate an executable cash flow from a model input, an estimate or a notional comparison.

Waiting for your answer.

Exercise 5 — Fund the loss before the later recovery

The first contract’s $300 loss reduces the separate $600 margin account to $300. Under the below-$450 maintenance rule, add enough own cash to restore $600. The later $500 gain arrives only afterward. Ignoring other calls/withdrawals, the account then ends at $1,100 against $900 total contributions, recovering the $200 trading gain.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What additional cash is required at this first loss?

Need a hint?

Use the stated quote direction, cash-flow dates and assumptions. Keep full precision internally; round this answer to 2 decimal places.

Waiting for your answer.

Exercise 6 — Tail an illustrative hedge for an early payment

In a separate single-payment illustration, ten untailed contracts would produce the desired terminal hedge cash per unit price move if paid at the business date. Here their net settlement is received earlier and can grow by a known factor 1.05 to that date. Divide ten by 1.05. Change the factor to 1.02. This fractional comparison isolates timing, with no rounding, transaction costs or other settlements.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

After using a 1.02 funding factor, what fractional tailed target results, to four decimals?

Need a hint?

Use the stated quote direction, cash-flow dates and assumptions. Keep full precision internally; round this answer to 4 decimal places.

Waiting for your answer.

Read the picture

The first $300 loss triggers a $300 top-up before the replacement’s $500 gain arrives; final $1,100 balance minus $900 contributions is $200 trading P&L.

The first $300 loss triggers a $300 top-up before the replacement’s $500 gain arrives; final $1,100 balance minus $900 contributions is $200 trading P&L.

The figure shows a fixed worked example. Editing a calculation does not update this illustration.

Exercise 7 — Test the deterministic-rate shortcut

Consider a separate two-state pricing model. At an early fixing date each state has pricing probability one half and the later asset delivery value is already known: 80 or 120. All futures price changes settle at that fixing date, when discounting from today is the same across states, so its fair quote is 100. The state’s subsequent cash accumulation factor to delivery is 1.01 or 1.10 respectively. The single-delivery forward instead weights terminal asset value by the state-dependent discount factors. The code computes futures quote minus forward quote; the common early discount factor and one-half probabilities cancel.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · CHOOSE ONE

Why can the two quotes differ in this deliberately simplified model?

Need a hint?

Separate an executable cash flow from a model input, an estimate or a notional comparison.

Waiting for your answer.

Remember

Choose contract dates and proxies against the business exposure, test regression estimates and reconsider forecast quantities. Sum realized changes contract by contract, keep the roll gap separate from cash payments and fund every margin call on time. Tailing and forward/futures differences concern the value of settlement timing. Funding limits, competitors’ pricing and uncertain business volume can justify partial or no hedging under an explicit mandate rather than automatic maximum coverage.

Keyboard shortcuts

Press Esc to enter cell command mode. Then use the keys below. Press Enter to edit again.

A
In command mode: insert a Java cell above the selected cell.
B
In command mode: insert a Java cell below the selected cell.
D, D
In command mode: press D twice within one second to delete the selected cell. Runtime variables remain until kernel restart.
Z
In command mode: undo the last cell deletion.
Shift + Enter
Run code, check a quiz answer, or advance past Markdown; then select the next cell.
Tab
Move focus to the next control or cell.
Shift + Tab
Move focus to the previous control or cell.
Enter
Edit the selected cell in command mode; check an answer when a quiz input is focused, or activate a focused button.
Esc
Enter cell command mode, or close this popup when it is open.