Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Derivatives pricing

Combining positions

Lesson 2 of 16 · 1 min read

This lesson combines the contracts from "Forwards, calls and puts" into portfolios. The only new fact is that payoffs add up; everything else follows from it. We keep the same setting: European options on a non-dividend-paying stock, all maturing at the same date TTT.

Payoffs add

A portfolio is a list of positions held at the same time. Suppose it holds n1n_1n1​ units of a contract with payoff X1=f1(ST)X_1 = f_1(S_T)X1​=f1​(ST​), n2n_2n2​ units of a contract with payoff X2=f2(ST)X_2 = f_2(S_T)X2​=f2​(ST​), and so on. A positive nin_ini​ is a long position, a negative nin_ini​ a short one. At maturity each contract pays independently of the others, so the portfolio pays

X=n1f1(ST)+n2f2(ST)+⋯+nkfk(ST).X = n_1 f_1(S_T) + n_2 f_2(S_T) + \dots + n_k f_k(S_T).X=n1​f1​(ST​)+n2​f2​(ST​)+⋯+nk​fk​(ST​).

Graphically, you draw each leg's payoff against STS_TST​ and add the lines vertically. Each call or put payoff is made of two straight pieces joined at its strike, so a sum of them is again made of straight pieces, with a kink at every strike that appears in the portfolio.

Besides options and the stock itself (payoff STS_TST​) we use a zero-coupon bond that pays 1 at TTT. Its payoff is the constant 1 and its price today is the discount factor e−rTe^{-rT}e−rT. Holding KKK bonds pays KKK for sure.

Payoff and profit of a portfolio

The figure in this lesson shows payoffs only. To get the profit, subtract the cost of setting up the portfolio. If the legs cost V0V_0V0​ in total today (premiums paid minus premiums received), the profit at maturity is

profit=X−V0 erT.\text{profit} = X - V_0\,e^{rT}.profit=X−V0​erT.

A portfolio with a large payoff is not automatically a good trade: in a well-functioning market a larger payoff costs more today. The examples below use rounded premiums and ignore the small factor erTe^{rT}erT.

Spreads

A bull call spread buys a call with a low strike K1K_1K1​ and sells a call with a higher strike K2K_2K2​:

X=(ST−K1)+−(ST−K2)+={0,ST≤K1,ST−K1,K1<ST<K2,K2−K1,ST≥K2.X = (S_T - K_1)^+ - (S_T - K_2)^+ = \begin{cases} 0, & S_T \le K_1,\\ S_T - K_1, & K_1 < S_T < K_2,\\ K_2 - K_1, & S_T \ge K_2. \end{cases}X=(ST​−K1​)+−(ST​−K2​)+=⎩⎨⎧​0,ST​−K1​,K2​−K1​,​ST​≤K1​,K1​<ST​<K2​,ST​≥K2​.​

The short call gives away the upside above K2K_2K2​, and in exchange its premium lowers the cost. Example with K1=95K_1 = 95K1​=95 and K2=105K_2 = 105K2​=105: if the 95 call costs 8 and the 105 call costs 3, the spread costs 5. The payoff is capped at 10, so the profit ranges from −5-5−5 to +5+5+5, and the break-even level is ST=100S_T = 100ST​=100.

A bear put spread is the mirror image: buy a put with the higher strike K2K_2K2​ and sell a put with the lower strike K1K_1K1​. It pays K2−K1K_2 - K_1K2​−K1​ when the stock ends below K1K_1K1​ and nothing above K2K_2K2​.

Straddle and strangle

A straddle buys a call and a put with the same strike KKK:

X=(ST−K)++(K−ST)+=∣ST−K∣.X = (S_T - K)^+ + (K - S_T)^+ = |S_T - K|.X=(ST​−K)++(K−ST​)+=∣ST​−K∣.

The payoff is a V with its tip at KKK: the position gains from a large move in either direction and is a bet on movement, not on direction. With K=100K = 100K=100, a call at 6 and a put at 4, the straddle costs 10, so it makes a profit only if ST<90S_T < 90ST​<90 or ST>110S_T > 110ST​>110.

A strangle buys a put with strike K1K_1K1​ and a call with a higher strike K2K_2K2​. The payoff is zero between the strikes and rises linearly outside them. It is cheaper than a straddle because it needs a larger move to pay anything.

Butterfly

A butterfly with strikes K1<K2<K3K_1 < K_2 < K_3K1​<K2​<K3​, equally spaced, buys one K1K_1K1​ call, sells two K2K_2K2​ calls and buys one K3K_3K3​ call:

X=(ST−K1)+−2 (ST−K2)++(ST−K3)+.X = (S_T - K_1)^+ - 2\,(S_T - K_2)^+ + (S_T - K_3)^+.X=(ST​−K1​)+−2(ST​−K2​)++(ST​−K3​)+.

Read it slope by slope. Below K1K_1K1​ no option pays. Between K1K_1K1​ and K2K_2K2​ only the first call pays, slope +1+1+1. Between K2K_2K2​ and K3K_3K3​ the slope becomes 1−2=−11 - 2 = -11−2=−1. Above K3K_3K3​ it is 1−2+1=01 - 2 + 1 = 01−2+1=0, and the payoff is back at zero. The result is a tent with its peak K2−K1K_2 - K_1K2​−K1​ at K2K_2K2​. With strikes 90, 100, 110 the peak is 10 at ST=100S_T = 100ST​=100, and the payoff at ST=95S_T = 95ST​=95 is 5.

The butterfly pays only when the stock ends near the middle strike, so it is a bet that the price will stay put, the opposite of a straddle.

The synthetic forward

Buy a call and sell a put, both with strike KKK. For any STS_TST​ exactly one of the two options pays:

(ST−K)+−(K−ST)+=ST−K.(S_T - K)^+ - (K - S_T)^+ = S_T - K.(ST​−K)+−(K−ST​)+=ST​−K.

If ST>KS_T > KST​>K the call pays ST−KS_T - KST​−K and the put is worthless; if ST<KS_T < KST​<K the call is worthless and the short put pays −(K−ST)=ST−K-(K - S_T) = S_T - K−(K−ST​)=ST​−K. Either way the total is the payoff of a long forward with delivery price KKK. This identity is called a synthetic forward; it is the basis of "Put–call parity".

The figure shows each leg's payoff as a thin dashed line and the total as a thick line. Pick the presets one by one and check that the thick line is the vertical sum of the dashed ones. In the synthetic forward the kinks of the two legs cancel and the total is a single straight line.

Payoff of option strategies at maturityOpen in Payoff Lab →
Long Call 95Short Call 110Total payoff

Building any piecewise-linear payoff

The examples suggest a general rule. Take any payoff f(ST)f(S_T)f(ST​) made of straight pieces, with kinks at strikes K1<K2<⋯<KmK_1 < K_2 < \dots < K_mK1​<K2​<⋯<Km​. Let f(0)f(0)f(0) be its value at zero, a0a_0a0​ its slope just to the right of zero, and cic_ici​ the change of slope at KiK_iKi​ (slope after minus slope before). Then

f(ST)=f(0)+a0 ST+∑i=1mci (ST−Ki)+.f(S_T) = f(0) + a_0\,S_T + \sum_{i=1}^{m} c_i\,(S_T - K_i)^+.f(ST​)=f(0)+a0​ST​+i=1∑m​ci​(ST​−Ki​)+.

Each term is a traded instrument: f(0)f(0)f(0) zero-coupon bonds, a0a_0a0​ shares, and cic_ici​ calls with strike KiK_iKi​ (a negative number means a short position). The butterfly is the case f(0)=0f(0) = 0f(0)=0, a0=0a_0 = 0a0​=0, c=(1,−2,1)c = (1, -2, 1)c=(1,−2,1). Puts are not needed in principle, although they often give a shorter recipe.

A payoff made of straight pieces can be built exactly from bonds, the stock and calls, with one call position per kink. Its slope changes tell you how many calls to hold at each strike.

Summary

  • The payoff of a portfolio is the sum of its legs' payoffs, drawn by adding the lines vertically.
  • Profit is the total payoff minus the net cost of the legs, carried to time TTT.
  • Spreads cap gains and losses; straddles and strangles pay for large moves; a butterfly pays when the price stays near the middle strike.
  • A long call plus a short put with the same strike pays ST−KS_T - KST​−K, the payoff of a forward.
  • Any piecewise-linear payoff can be built from bonds, the stock and calls.
Try itAssemble multi-leg strategies and see their payoff and profit in the Payoff lab →
← PreviousForwards, calls and putsNext →Arbitrage and the forward price
Connections
Combining positions
Open the full graph →
Labs for this lesson
Payoff Lab