σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Derivatives Pricing skill›Module 1 · Rates, bonds and swaps›Topic 1.7·~50 minIntermediate

The forward price and the futures basis

Skill positionModule 1 of 6 · Topic 7 of 7
1.7 The forward price and the futures basis
—Lab score— / 100Total XP—Streak—
Lecture0% read

11 min readCode examples: 6

  1. 01Buy now, hold, deliver later
  2. 02A forward that is already running
  3. 03The basis
  4. 04Cash and carry
  5. 05Futures settle every day
  6. 06A forward is not a forecast
  7. 07What you will build

On 21 August 2026 SPY closed at 765.72 and the 3-month Treasury yield was 3.88%. The fair price today for buying SPY in three months is 770.29, just 4.57 points above the spot. Over 21 years of real prices, the spot three months later was above that forward price 73% of the time, and on average 2.8% above it. This topic shows where the forward price comes from, and why it is a price and not a forecast.

01

Buy now, hold, deliver later

Where we are. The last topic priced interest-rate swaps from a curve. This one prices the simplest contract on any asset: a forward, an agreement to buy the asset at a future date for a price fixed today. A future is the same idea traded on an exchange. We take SPY, a fund that holds the US stock index, as the asset.

DefinitionForward price

F is the price agreed today for an asset delivered at time T years from now. It is chosen so that the contract costs nothing to enter: neither side pays anything today, and the price is what makes that fair.

The forward price is found by a replication argument, not by guessing where the asset will go. Suppose you want the asset in T years. You can wait and sign a forward, or you can buy it today: borrow the spot price S, buy the asset, and hold it. Holding costs you the interest on the loan and pays you the dividends. Both routes give you one asset at time T, so they must cost the same.

DefinitionCost of carry

The net cost of holding an asset until delivery: interest paid on the money tied up in it, minus the dividends it pays. With a continuously compounded interest rate r and dividend yield q, holding for T years multiplies the price by exp((r − q) × T).

F = S × exp((r − q) × T)(1)S spot price, r interest rate, q dividend yield (all per year, continuously compounded), T years to delivery

Worked example 1. *Problem:* an asset costs 100, the interest rate is 5%, it pays a 2% dividend yield, and delivery is in six months. What is the forward price? *Plan:* apply the formula with T = 0.5. *Steps:* below.

main.pyPython
print(round(forward_price(100.0, 0.05, 0.02, 0.5), 4))1print(round(forward_price(100.0, 0.05, 0.0, 1.0), 4), round(forward_price(100.0, 0.03, 0.03, 2.0), 4))2
101.5113
105.1271 100.0
  1. 1Spot 100, 5% interest, 2% dividends, half a year.
  2. 2No dividends for a year; interest equal to dividends.

*Check:* 100 × exp(0.03 × 0.5) = 101.5113. If there are no dividends and the rate is 5%, one year of carry adds 5.13%, giving 105.1271. If dividends equal the interest rate, holding is free and the forward equals the spot, 100.0. *What to notice:* the expected return of the asset does not appear in the formula. Only the cost of financing and the dividends matter, because anyone can lock in the price by buying today.

02

A forward that is already running

A forward costs nothing on the day it is signed. Later, the spot price and the rates move, and the contract becomes an asset to one side and a liability to the other. A trader holding it needs its value today.

The buyer of an old forward will receive the asset at time T and pay the agreed delivery price K at the same time. Bring both to today: the asset is worth S × exp(−q × T) (the dividends paid before delivery go to the owner of the asset, not to the forward buyer), and the strike is worth K × exp(−r × T).

value of a long forward = S × exp(−q × T) − K × exp(−r × T)(2)zero when K equals the fair forward price F; positive when K is lower, because the buyer pays less than the market price

Worked example 2. *Problem:* six months ago you agreed to buy the asset of example 1 at K = 98. Now the spot is 100, with the same rate and dividends and six months left. What is your forward worth? *Plan:* compute the discounted asset and the discounted strike, and check against the new fair forward price. *Steps:* below.

main.pyPython
value = forward_value(100.0, 98.0, 0.05, 0.02, 0.5)1fair = forward_price(100.0, 0.05, 0.02, 0.5)print(round(value, 4), round((fair - 98.0) * np.exp(-0.05 * 0.5), 4))2print(round(forward_value(100.0, fair, 0.05, 0.02, 0.5), 8))
3.4246 3.4246
0.0
  1. 1The value of the old forward.
  2. 2A forward struck at the fair price is worth nothing.

*Check:* the asset is worth 100 × exp(−0.01) = 99.0050 and the strike 98 × exp(−0.025) = 95.5804, so the forward is worth 3.4246. The second number prices the same thing differently: the gap between the new fair price (101.5113) and the old strike (98), discounted for the six months until payment. Both agree. *What to notice:* the value is not the gap S − K. Dividends and interest are part of it, and a forward struck at today's fair price is worth exactly zero.

03

The basis

The price of a future quoted on an exchange is not the spot price, and the difference is called the basis. It is the first thing a futures trader looks at.

DefinitionBasis

The futures price minus the spot price, in the units of the price (index points or dollars, not a percentage). With positive carry the basis is positive and shrinks to zero as delivery approaches, because on the delivery day the future and the spot are the same asset.

A quoted future also hides a rate. Turn the price formula around: if you know S, F, q and T, the equation gives the interest rate that the market is using. Traders call it the implied repo rate: it is what you earn per year by buying the asset and selling the future, both locked in.

r = ln(F / S) / T + q(3)the interest rate that a quoted future price implies; compare it with the real borrowing rate to see whether the quote is fair

Worked example 3. *Problem:* the index is at 4,500, the dividend yield is 1.5%, a 3-month future is quoted at 4,540 and the interest rate is 5%. What are the basis, the fair basis and the implied rate? *Plan:* subtract for the basis, take the fair price for the fair basis, and use equation 3. *Steps:* below.

main.pyPython
fair = forward_price(4500.0, 0.05, 0.015, 0.25)1print(basis(4500.0, 4540.0), round(fair, 4), round(basis(4500.0, fair), 4))2print(round(implied_rate(4500.0, 4540.0, 0.015, 0.25), 6))
40.0 4539.5478 39.5478
0.050398
  1. 1The fair price and the fair basis.
  2. 2The rate that the quote implies.

*Check:* the basis is 40.0; the fair price is 4,539.5478, a fair basis of 39.5478. The quote is only 0.45 points above the fair price, so the implied rate is 5.0398%, almost the real rate of 5%. *What to notice:* the basis looks large (40 points) but it is mostly the cost of carry. It is the small gap between the basis and the fair basis that matters.

04

Cash and carry

What if the quoted future is not at the fair price? Then you can build a trade with no risk and a positive profit, called arbitrage. If the future is too high, buy the asset with borrowed money and sell the future. If it is too low, do the opposite.

DefinitionCash and carry

The trade for a future priced above its fair value: borrow S, buy the asset and sell the future. At delivery you hand over the asset, receive the futures price, repay the loan with interest and keep the difference. Its mirror image, the reverse cash and carry, sells the asset short, lends the money and buys the future.

The profit at delivery is the distance between the quote and the fair price. It arrives at time T, so its worth today is that distance multiplied by exp(−r × T). The profit is never negative, because the trader picks the side that wins.

Worked example 4. *Problem:* with the numbers of example 3, a 3-month future is quoted at 4,560, and the contract is on 50 units. What is the trade, and what is it worth today? Then do the same for a quote of 4,520. *Plan:* compare the quote with the fair price and discount the gap. *Steps:* below.

main.pyPython
print(carry_arbitrage(4500.0, 4560.0, 0.05, 0.015, 0.25, 50))1print(carry_arbitrage(4500.0, 4520.0, 0.05, 0.015, 0.25, 50))2print(carry_arbitrage(4500.0, 4539.547769167422, 0.05, 0.015, 0.25, 50))
('cash_and_carry', 1009.9084570415114)
('reverse', 965.2471439462515)
('none', 0.0)
  1. 1A future above the fair price.
  2. 2A future below it.

*Check:* the fair price is 4,539.55. At 4,560 the future is 20.45 too high: buy the index, sell the future, and the profit at delivery is 20.45 × 50 = 1,022.61, worth 1,009.91 today. At 4,520 it is 19.55 too low: the reverse trade gains 977.39 at delivery, 965.25 today. At the fair price there is nothing to do. *What to notice:* the trade needs no view on the market. Real arbitrageurs do this in size, so real futures stay within a few basis points of the fair price. What stops them from doing more is the cost of trading and of borrowing.

Why real quotes differ a little

A real trader pays borrowing costs above the risk-free rate, trading fees, and may not be able to short the whole index. So the no-arbitrage price is really a band around the fair price, and a quote can sit inside it without any trade being worthwhile.

05

Futures settle every day

A forward pays everything at delivery. A future does not: the exchange settles it every day. At each close the clearing house takes the day's price change from the loser's margin account and credits it to the winner. After the last day the sum of all the daily amounts equals the total price change, as if you had held a forward, but the cash arrives early.

cash on day k = (price_k − price_(k−1)) × contracts × multiplier(4)contracts is positive for a long position and negative for a short one; the multiplier is the money per index point, for example 50 for an E-mini S&P 500 contract

Worked example 5. *Problem:* you are long 2 contracts with a multiplier of 50. The settlement prices over four days are 4,500, 4,512, 4,498 and 4,505. What cash moves each day, and how does it add up? *Plan:* take the daily differences and multiply. *Steps:* below.

main.pyPython
prices = [4500.0, 4512.0, 4498.0, 4505.0]cash = daily_settlement(prices, 2, 50.0)1print(cash.tolist(), float(cash.sum()))2print((prices[-1] - prices[0]) * 2 * 50.0)
[1200.0, -1400.0, 700.0] 500.0
500.0
  1. 1Cash on each day for a long position.
  2. 2The total price change times the position.

*Check:* day one pays +1,200, day two takes −1,400 and day three pays +700. The total is 500, the same as (4,505 − 4,500) × 2 × 50. *What to notice:* the total is the same as for a forward, but the timing differs. If interest rates are high when the price rises, you can invest the profits you receive early, and a long future is worth slightly more than a long forward. If rates move against the price the opposite holds. Over a few months the difference is small, so this topic uses one formula for both.

Not the same contract

Futures and forwards differ in their credit risk too. A forward is a private contract exposed to the other side defaulting; a future is guaranteed by the clearing house, which is why it asks for margin. The pricing formula is the same only because we treated interest rates as constant.

06

A forward is not a forecast

A common mistake is to read the forward price as the market's guess of the future price. It is not: the formula contains no forecast. The forward price only tells you the price at which you can lock in the purchase today. It differs from the spot by the carry, which is small for an index.

Worked example 6. *Problem:* on real SPY prices, does the 3-month forward price predict the spot three months later? *Plan:* every 21 trading days from 2005, compute the 3-month forward with that day's Treasury yield and a 1.5% dividend yield, and compare it with the spot 63 trading days later. study does this and also prices the forward for the last day of the table. *Steps:* below.

main.pyPython
data = load_data()out = study(data)1print(out["count"], round(out["mean_carry"], 5), round(out["mean_realised"], 5))print(round(out["mean_error"], 5), round(out["error_std"], 5), round(out["share_above"], 3))2last = out["last"]print(last["date"], round(last["spot"], 2), round(last["forward"], 2), round(last["basis"], 2), round(last["implied_rate"], 4), round(last["profit"], 2))
253 0.00075 0.0283
0.02755 0.07558 0.731
2026-08-21 765.72 770.29 4.57 0.0588 3.81
  1. 1The carry, and what the spot actually did.
  2. 2The last day and a made-up quote 0.5% above the forward.

*Check:* there are 253 starts. The forward adds 0.075% to the spot on average, while the spot rose 2.83% in the same quarters. The forward price was too low by 2.76% on average and the spot ended above it 73% of the time, with a standard deviation of 7.56%. For the last day, the spot is 765.72, the forward 770.29 and the basis 4.57. A quote 0.5% above the forward implies a rate of 5.88% against a yield of 3.88%, and is worth 3.81 per unit to an arbitrageur. *What to notice:* the forward and the spot are almost the same number, so the forward is an almost useless forecast. The 7.56% standard deviation is a hundred times the carry. The forward is a price you can lock in, not a view.

  • FunctionQuestion it answers
  • forward_price(spot, rate, q, years)What is the fair price for delivery later?spot times exp of the carry
  • forward_value(spot, strike, rate, q, years)What is an old forward worth today?discounted asset minus discounted strike
  • basis(spot, future)How far is the future from the spot?future minus spot
  • implied_rate(spot, future, q, years)Which interest rate does the quote use?log of the ratio over the time, plus q
  • carry_arbitrage(spot, future, rate, q, years, units)Is there a riskless trade, and what is it worth?compare with the fair price, then discount
  • daily_settlement(prices, contracts, multiplier)What cash moves in the margin account each day?daily difference times the position
What the real data saysSPY closes and 3-month US Treasury yields, 2005 to 2026; a dividend yield of 1.5% and a 3-month forward
Average carry per quarter0.075 %what the forward adds to the spot
Average spot move per quarter2.83 %what the spot actually did
Standard deviation of the miss7.56 %a hundred times the carry
Spot above the forward73 %in the quarters tested
Basis on 21 August 20264.57index points: forward 770.29, spot 765.72

Key takeaways

  • The forward price is a replication price. F = S × exp((r − q) × T): borrow, buy and hold; no forecast enters the formula.
  • An old forward has a value. S × exp(−q × T) − K × exp(−r × T) is zero at the fair strike and positive when the strike is below the fair price.
  • A quote hides a rate. The basis is future minus spot, and r = ln(F / S) / T + q is the rate the future implies; a gap to the real rate is an arbitrage.
  • A future settles every day. Daily cash is the price change times the position; the sum equals a forward's gain, only earlier.
Quick check
Your turn. An index is at 2,000, the interest rate is 4% and the dividend yield is 2%. A 6-month future is quoted at 2,030. What do you do?
Pick an answer.
07

What you will build

The lab follows the lecture. Task 1 writes the forward price and task 2 the value of an old forward. Task 3 is the basis and task 4 the rate that a quote implies. Task 5 finds the cash-and-carry trade and its value, and task 6 computes the daily cash of a futures position. Task 7 runs the forward price on real SPY and Treasury data and checks whether it predicts anything.

Next topic: forwards and futures have a fixed price. The next one, American options by LSM Monte Carlo, prices a contract whose holder may act at any time before expiry, which a formula cannot do and a simulation can.

Lab · what's graded

7 tasks · 100 pts
  • The forward price10 pts
  • The value of an old forward15 pts
  • The basis5 pts
  • The implied rate15 pts
  • Cash and carry20 pts
  • Daily settlement10 pts
  • The 3-month forward on SPY25 pts
Explorer · lab-dv-02
▾ lab-dv-02
▾ data
…
bash · in-browser
learner@quantcraft:~/lab-dv-02$
Python not loaded yetPythonLn 1, Col 1Spaces: 4UTF-8

Reset this topic?

Everything in lab-dv-02 goes back to the starter files and the terminal is cleared. Your current solution will be lost — this can't be undone.

Will be reset
  • main.py → starter code
  • Terminal history and test output
  • Unsubmitted changes
Will be kept
  • Best lab score
  • Your XP and streak
  • Lecture progress and notes