The call: a ramp moved right
A call option gives its owner the right, not the duty, to buy a stock at a fixed price on a fixed date. That price is the strike, and is the stock price on that date.
If , the owner buys at and can sell at , gaining . If , buying at would be pointless, so the owner lets the option lapse and gets 0. Both cases fit in one formula.
Rule: Call payoff
The ramp moved right by . It is flat at 0 up to the strike, then rises a dollar for each dollar the stock ends above it.
As a function (lesson 1.1.1), its domain is , since a share cannot be worth less than nothing. Its range is : a call never costs its owner anything at expiry, and its payoff has no upper limit. At both pieces give 0, so it does not matter which piece the boundary belongs to.
Try it
Evaluate the payoff at five final prices with . np.maximum applies the ramp to the whole array, as in lesson 1.1.2.
The payoff is 0 up to the strike, then 10 and 20.
Profit: the payoff moved down
An option is not free. The buyer pays a premium up front, say $5. The profit at expiry is the payoff minus the premium: the same ramp moved down by 5, the rule with .
The buyer breaks even where the profit is zero. That is the method of lesson 1.1.1: solve .
Below the strike the profit is , never 0. Above it the profit is , which is zero at .
The same algebra answers "where must the stock end for a profit of $15?". Above the strike the profit is one-to-one, so it has an inverse (lesson 1.1.3): .
Below the strike the profit is not one-to-one: every price up to 100 gives . A loss of $5 cannot tell you where the stock ended.
This ignores the interest the premium could have earned until expiry; module 1.4 handles that.
The put: the ramp flipped
A put option gives the right to sell at . It pays when the stock ends below the strike: . Write it as and it is the call's ramp with the input flipped, the rule from lesson 1.1.2, mirrored about .
The put's range is different from the call's. The stock cannot fall below 0, so the most a put can pay is , reached at : its range is . A put with strike 100 bought for $4 breaks even at , and its largest possible profit is $96.
Payoff and profit at expiry for a call costing $5 and a put costing $4, both with strike 100. Profit is the payoff moved down by the cost, so each breaks even where its profit line crosses zero.
Selling: the payoff flipped over
Selling an option flips its payoff over the horizontal axis, the rule. The seller of a call receives the premium now and owes later. With and a $5 premium, the seller's profit is .
That profit is at most $5, earned whenever . Above the strike it falls without limit: at and at . Its range is , which is why desks watch sold calls closely.
A sold put has a floor: selling the $4 put loses at most $96, at .
Desks record the direction as a sign. A quantity of is an option bought (a long position) and an option sold (a short position). The premium is cash paid (negative) for a buyer and cash received (positive) for a seller.
Strategies: add the payoffs
A position that holds several options pays the sum of their payoffs. Two classic examples follow.
A straddle buys a call and a put with the same strike. Its payoff is , the ramp plus its mirror image. Lesson 1.1.2 showed that this sum is an absolute value, so the payoff is , the distance from lesson 0.3.3.
A straddle pays when the stock moves a lot, in either direction.
The straddle costs both premiums, dollars. It breaks even where , which by lesson 0.3.3 means or . It makes money when the stock ends further than 9 from the strike.
A bull call spread buys a call at 95 and sells a call at 105. Its payoff is a function with three pieces (lesson 1.1.2), and the pieces meet at both strikes:
Above 105 the sold call, a flipped ramp, cancels the bought call's rise. So the payoff is capped at 10, the gap between the strikes.
A straddle is a V: profit needs a move of more than 9 either way. A bull spread adds a ramp and a flipped ramp, so its payoff rises between the strikes and is capped at 10.
Try it
One payoff function builds every diagram. The straddle and the spread are sums of its calls and puts, with a minus sign for an option sold.
The first two printed lines match: the straddle's payoff is . The third line is the spread at 90, 95, 100, 105 and 110. The plot draws all four; change the legs and run it again.
Now build positions yourself. Start from a preset, then change a side, a strike or a premium, and watch the break-evens and the largest gain and loss follow. The bull spread preset pays $8 for the 95 call and receives $3 for the 105 call, so it costs $5 and breaks even at 100. Try selling the put of the straddle instead of buying it.
Explore
Pick a strategy or build your own from up to three options. The solid line is the profit at expiry per share, the dashed line the payoff before premiums.
- Premiums
- 9 paid
- Break-even
- 91 and 109
- Largest profit
- no limit (it keeps rising as the stock rises)
- Largest loss
- 9
On a desk: units, conventions and bad inputs
The diagrams so far are per share. A practitioner meets a few more things before trusting a number.
- Per share or per contract. A standard US stock option contract covers 100 shares, so its payoff is stretched by 100, the rule. A call paying $20 a share pays $2,000 a contract. Contract sizes differ between markets, so check the terms.
- Against the return. Traders often plot a payoff against the stock's return , the fractional change in price. With today's price , the final price is , so the payoff becomes a composition (lesson 1.1.3). With it is , a ramp stretched by 100, with domain (a fall of 100%).
- Bad inputs. A negative price or strike is a data error, not a market state: it lies outside the domain. Code should stop with an error rather than return a number. The same holds for a misspelt option type: reading "Call" as a put would silently mirror the diagram.
- The sign of the quantity. A missing minus sign turns a sold option into a bought one and flips the diagram over the axis. Check one leg by hand.
A payoff diagram also has limits. It shows value at expiry only. Before then, an option's value also depends on how far the price may still move, so it is not the ramp.
Finding that value is the job of option pricing, starting with the Black–Scholes integrals of case study 2.6.5. The diagram ignores interest on the premium (module 1.4), and some options can be exercised before expiry.
Try it
The first line is one contract of the call with strike 100 at .
The next two lines compare the composition with at returns of , 0, 10% and 25%. They match.
Call and put payoffs
Write payoff(S, K, kind) that returns the payoff at expiry of one option with strike K.
kindis"call"or"put". For anything else, raiseValueError.Smay be a single number or a NumPy array, so usenp.maximum.- A negative stock price is outside the domain: raise
ValueErrorif any value ofSis below 0.
See the tests
import numpy as np
S = np.array([80.0, 90.0, 100.0, 110.0, 120.0])
def test_call_in_the_money():
"""A call with strike 100 pays 20 when the stock ends at 120"""
expect_close(payoff(120, 100, "call"), 20.0, what='payoff(120, 100, "call")')
def test_call_out_of_the_money():
"""A call with strike 100 pays nothing when the stock ends at 90"""
expect_close(payoff(90, 100, "call"), 0.0, what='payoff(90, 100, "call")')
def test_put():
"""A put with strike 100 pays 100 − S below the strike and 0 above it"""
expect_close(payoff(S, 100, "put"), [20.0, 10.0, 0.0, 0.0, 0.0], what='payoff(S, 100, "put")')
def test_call_array():
"""A call works on a whole array of final prices"""
expect_close(payoff(S, 100, "call"), [0.0, 0.0, 0.0, 10.0, 20.0], what='payoff(S, 100, "call")')
def test_put_call_difference():
"""Call minus put with the same strike is S − K"""
expect_close(payoff(S, 95, "call") - payoff(S, 95, "put"), S - 95, what="call − put")
def test_unknown_kind():
"""An unknown kind raises ValueError"""
try:
payoff(100, 100, "swap")
except ValueError:
return
raise AssertionError('expected ValueError for kind="swap"')
def test_negative_price():
"""A negative stock price raises ValueError"""
try:
payoff(np.array([90.0, -5.0]), 100, "call")
except ValueError:
return
raise AssertionError("expected ValueError for a stock price of −5")
Any strategy from its legs
Write strategy_payoff(S, legs). Each leg is a tuple (kind, K, quantity): quantity is positive for options bought and negative for options sold. Return the total payoff: the sum over legs of quantity times that option's payoff.
The starter gives you ramp(x), which is np.maximum(x, 0). A call is ramp(S - K) and a put is ramp(K - S).
Raise ValueError for any other kind. The tests build a straddle, a bull spread and a sold call.
See the tests
import numpy as np
S = np.array([80.0, 90.0, 100.0, 110.0, 120.0])
def test_single_call():
"""One call bought is just the call's payoff"""
expect_close(strategy_payoff(S, [("call", 100, 1)]), [0.0, 0.0, 0.0, 10.0, 20.0], what="one call")
def test_straddle():
"""A call and a put with strike 100 pay |S − 100|"""
legs = [("call", 100, 1), ("put", 100, 1)]
expect_close(strategy_payoff(S, legs), np.abs(S - 100), what="straddle")
def test_bull_spread():
"""Buy the 95 call, sell the 105 call: the payoff is capped at 10"""
legs = [("call", 95, 1), ("call", 105, -1)]
expect_close(strategy_payoff(S, legs), [0.0, 0.0, 5.0, 10.0, 10.0], what="bull spread 95/105")
def test_sold_call():
"""Selling a call flips its payoff: −max(S − 100, 0)"""
expect_close(strategy_payoff(S, [("call", 100, -1)]), [0.0, 0.0, 0.0, -10.0, -20.0], what="one call sold")
def test_quantity():
"""Two puts pay twice as much as one"""
expect_close(strategy_payoff(S, [("put", 100, 2)]), [40.0, 20.0, 0.0, 0.0, 0.0], what="two puts")
def test_no_legs():
"""No legs at all pay nothing, at every price"""
expect_close(strategy_payoff(S, []), np.zeros(5), what="no legs")
def test_unknown_kind():
"""A leg with an unknown kind raises ValueError instead of being read as a put"""
try:
strategy_payoff(S, [("Call", 100, 1)])
except ValueError:
return
raise AssertionError('expected ValueError for kind="Call" (a capital C is a typo, not a put)')
Summary card
- Call payoff : the ramp moved right by the strike, with range . Put payoff : the ramp mirrored about , with range .
- Profit is payoff minus premium, a downward shift. A call breaks even at ; a put at .
- Selling an option flips its payoff over the horizontal axis. A sold call can lose without limit.
- A strategy's payoff is the sum of its legs, quantity times payoff. Straddle: . Bull call spread: a ramp capped at the gap between the strikes.
- Check units (per share or per contract), signs (bought or sold), and inputs (no negative prices, no unknown option types). A payoff diagram shows value at expiry only.