A forward contract locks in today's price for future delivery. The no-arbitrage forward price equals the spot price grown at the risk-free rate, adjusted for carry costs. Futures are exchange-traded forwards with daily settlement.
Forward contract payoff
A long forward obliges you to buy the asset at the agreed forward price F at expiration. If the spot price Sᵀ exceeds F, you profit; otherwise you lose. The payoff is Sᵀ − F. The short side's payoff is the mirror: F − Sᵀ. No money changes hands at inception — the contract starts at zero value.
# Forward contract payoffdef forward_payoff_long(spot, F):
return spot - F
def forward_payoff_short(spot, F):
return F - spot
F = 100for S in [110, 100, 85]:
l = forward_payoff_long(S, F)
s = forward_payoff_short(S, F)
print(f"Spot={S}: Long={l}, Short={s}, Sum={l+s}")
No-arbitrage forward pricing
The forward price must equal the spot price grown at the risk-free rate, or arbitrageurs will exploit the gap. For an asset with no income: F = S₀ · erᵀ. With a continuous dividend yield q: F = S₀ · e(r−q)ᵀ. Storage costs increase the forward price; convenience yields decrease it. This is the cost of carry model.
Scheme
; No-arbitrage forward price; F = S0 * e^(r * T) (no income); F = S0 * e^((r - q) * T) (continuous dividend yield q)
(define (forward-price-no-income S0 r T)
(* S0 (exp (* r T))))
(define (forward-price-dividend S0 r q T)
(* S0 (exp (* (- r q) T))))
; Gold: S0 = $1800, r = 5%, T = 1 year, no income
(display "Gold 1-yr forward: $")
(display (round (forward-price-no-income 18000.051))) (newline)
; Stock index: S0 = 4000, r = 5%, q = 2% div yield, T = 0.5 yr
(display "Index 6-mo forward: $")
(display (round (forward-price-dividend 40000.050.020.5))) (newline)
; Verify no-arbitrage: borrow S0, buy spot, deliver at F; Profit = F - S0*e^(rT) must be zero
(define S0 1800) (define r 0.05) (define T 1)
(define F-market (forward-price-no-income S0 r T))
(define borrow-cost (* S0 (exp (* r T))))
(display "Arbitrage profit: $")
(display (- F-market borrow-cost))
Forwards are private, over-the-counter contracts. Futures are standardized, exchange-traded, and marked to market daily. Daily settlement means gains and losses are realized every day, not just at expiration. This introduces reinvestment risk but eliminates counterparty risk through the clearinghouse. When interest rates are non-stochastic, forward and futures prices are identical.
# Daily mark-to-market on a futures position
initial_margin = 10000
prices = [100, 102, 99, 101, 104, 103]
print("=== Long futures, daily settlement ===")
balance = initial_margin
for day inrange(1, len(prices)):
pnl = prices[day] - prices[day - 1]
balance += pnl
print(f"Day {day}: price={prices[day]}, P&L={pnl:+}, balance=${balance}")
print(f"\nTotal P&L: ${prices[-1] - prices[0]:+}")
print(f"Final balance: ${balance}")
Hedging with futures
A producer who will sell an asset in the future can short futures to lock in today's price. A consumer who will buy can go long. The hedge ratio h = ρ · (σₛ/σᶠ) minimizes portfolio variance when the hedge asset differs from the underlying. Basis risk — the gap between spot and futures — remains.