The diagrams below illustrate the payoff for various derivatives at maturity. For options, the Profit/Loss (P/L), which accounts for the option premium, is also displayed. The diagrams do not account for any other trading costs.
\(S_T\) is the underlying asset value at maturity \(T\), and \(F_0\) is the futures price at time zero, and \(X\) is the option exercise price.
Underlying asset
Change the value of the asset at maturity \(S_T\) using the slider below, the payoff is represented with a dot:
viewof s = Inputs.range([0,150], {step:1,label:"S_T",value:100})
longAssetPayoff = Plot.plot({caption:"Payoffs on a Long position on an asset",x: {domain: [0,150],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.line([[0,0], [150,150]], {stroke:"blue"}), Plot.dot( [[s, s]], {fill:"red",r:5,title: d =>`S_T: ${s}Payoff: ${s}`,tip:true }),// Tooltip + crosshair (data-bound) Plot.tip(Plot.pointerX(longAssetSeries), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${d.y}`}), Plot.crosshair(longAssetSeries, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Long position payoff"})
shortAssetPayoff = Plot.plot({caption:"Payoffs on a Short position on an asset",x: {domain: [0,150],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.line([[0,0], [150,-150]], {stroke:"red"}), Plot.dot( [[s,-s]], {fill:"blue",r:5,title: d =>`S_T: ${s}Payoff: ${-s}`,tip:true }),// Tooltip + crosshair (data-bound) Plot.tip(Plot.pointerX(shortAssetSeries), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${d.y}`}), Plot.crosshair(shortAssetSeries, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Short position payoff"})
When you purchase an asset (long position), the payoff is simply the value of the asset at maturity \(S_T\). The payoff function is represented by the straight line passing through the origin with a slope of 1.
When you sell an asset (short position), the payoff is the negative of the value of the asset at maturity, \(-S_T\). The payoff function is represented by the straight line passing through the origin with a slope of -1.
Futures contract
Assuming no dividends, a maturity of 1 year, and a continuously compounded risk‑free rate of 4%, the fair futures price is \[F_0 = S_0\,e^{rT} = S_0\,e^{0.04\times1}.\]
Use the sliders to set the current spot price \(S_0\) and the maturity price \(S_T\). The corresponding \(F_0\) is computed automatically from \(S_0\) and displayed below.
viewof s0f = Inputs.range([50,150], {step:1,label:"S_0",value:100})viewof stf = Inputs.range([50,150], {step:1,label:"S_T",value:100})// Compute F0 from S0 (no dividends), r = 4% (cc), T = 1 yearf0 = s0f *Math.exp(0.04)
md`F_0 (no dividends, r = 4% cc, T = 1): **${f0.toFixed(2)}**`
longFuturePayoff = Plot.plot({caption:"Payoffs on a Long position on a futures contract",x: {domain: [0, domainMaxF],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([f0], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0,-f0], [domainMaxF, domainMaxF - f0]], {stroke:"blue"}), Plot.dot( [[stf, stf - f0]], {fill:"red",r:5,title: d =>`S_T: ${stf.toFixed(2)}F_0: ${f0.toFixed(2)}Payoff: ${(stf - f0).toFixed(2)}`,tip:true }),// Pointer tooltip and crosshair bound to series Plot.tip(Plot.pointerX(futuresLongSeries), {x:"x",y:"y",title: d =>`S: ${d.x.toFixed(2)}\nPayoff: ${(d.x- f0).toFixed(2)}`}), Plot.crosshair(futuresLongSeries, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Long futures position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>F0 <span class="badge">${f0.toFixed(2)}</span></span> <span><span class="swatch" style="background: blue"></span> Payoff</span> <span><span class="swatch" style="background: red"></span> Current point</span></div>`
shortFuturePayoff = Plot.plot({caption:"Payoffs on a Short position on a futures contract",x: {domain: [0, domainMaxF],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([f0], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0, f0], [domainMaxF, f0 - domainMaxF]], {stroke:"red"}), Plot.dot( [[stf, f0 - stf]], {fill:"blue",r:5,title: d =>`S_T: ${stf.toFixed(2)}F_0: ${f0.toFixed(2)}Payoff: ${(f0 - stf).toFixed(2)}`,tip:true }),// Pointer tooltip and crosshair bound to series Plot.tip(Plot.pointerX(futuresShortSeries), {x:"x",y:"y",title: d =>`S: ${d.x.toFixed(2)}\nPayoff: ${(f0 - d.x).toFixed(2)}`}), Plot.crosshair(futuresShortSeries, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Short futures position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>F0 <span class="badge">${f0.toFixed(2)}</span></span> <span><span class="swatch" style="background: red"></span> Payoff</span> <span><span class="swatch" style="background: blue"></span> Current point</span></div>`
The payoff of a futures contract at maturity is the difference between the spot price of the underlying asset at maturity (\(S_T\)) and the futures price agreed upon at the initiation of the contract (\(F_0\)):
md`- For a long position (buyer of the futures contract), the payoff is ${tex`S_T - F_0`} = **${(stf - f0).toFixed(2)}**`
md`- For a short position (seller of the futures contract), the payoff is ${tex`F_0 - S_T`} = **${(f0 - stf).toFixed(2)}**`
Note that unlike other derivatives, futures contracts have no upfront premium cost as they are obligations to buy/sell at a predetermined price.
Option Contracts
Options give the holder the right, but not the obligation, to buy (call option) or sell (put option) the underlying asset at a predetermined price (exercise price or strike price). You can adjust the parameters below to see how they affect option payoffs.
viewof s0o = Inputs.range([50,150], {step:1,label:"S_0",value:100})viewof x = Inputs.range([50,150], {step:1,label:"X (Exercise Price)",value:100})viewof sto = Inputs.range([0,150], {step:1,label:"S_T",value:100})
r =0.04; T =1; sigma =0.20; q =0;// Error function approximation and standard normal CDFerf = x => {const sign =Math.sign(x);const ax =Math.abs(x);const t =1/ (1+0.3275911* ax);const y =1- (((((1.061405429*t -1.453152027)*t) +1.421413741)*t -0.284496736)*t +0.254829592)*t*Math.exp(-ax*ax);return sign * y;}N = z =>0.5* (1+erf(z /Math.SQRT2));// d1, d2 and option premiumsd1 = (Math.log(s0o / x) + (r - q +0.5* sigma * sigma) * T) / (sigma *Math.sqrt(T));d2 = d1 - sigma *Math.sqrt(T);c0 = s0o *Math.exp(-q*T) *N(d1) - x *Math.exp(-r*T) *N(d2);p0 = x *Math.exp(-r*T) *N(-d2) - s0o *Math.exp(-q*T) *N(-d1);// Profit/Loss series at maturity across S_TseriesLongCallPL =Array.from({length:201}, (_,i) => ({x: i,y:Math.max(0, i - x) - c0}));seriesShortCallPL =Array.from({length:201}, (_,i) => ({x: i,y:-Math.max(0, i - x) + c0}));seriesLongPutPL =Array.from({length:201}, (_,i) => ({x: i,y:Math.max(0, x - i) - p0}));seriesShortPutPL =Array.from({length:201}, (_,i) => ({x: i,y:-Math.max(0, x - i) + p0}));
Call Options
A call option gives the holder the right to buy the underlying asset at the exercise price.
md`Call premium (Black–Scholes, r = 4% cc, σ = 20%, T = 1): **${c0.toFixed(2)}**`
longCallPayoff = Plot.plot({caption:"Payoffs on a Long position on a Call option at the option maturity",x: {domain: [0,200],label:"S_T" },y: {domain: [-100,100],label:"Payoff" },grid:true,marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([x], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0,0], [x,0], [200,200- x]], {stroke:"blue"}),// Profit/Loss including premium Plot.line(seriesLongCallPL, {x:"x",y:"y",stroke:"green",strokeWidth:2}), Plot.dot( [[sto,Math.max(0, sto - x)]], {fill:"red",r:5,title: d =>`S_T: ${sto}X: ${x}Premium C0: ${c0.toFixed(2)}Payoff: ${Math.max(0, sto - x)}P/L: ${ (Math.max(0, sto - x) - c0).toFixed(2) }`,tip:true }), Plot.tip(Plot.pointerX(seriesLongCallPL), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${Math.max(0, d.x- x)}\nP/L: ${(Math.max(0, d.x- x) - c0).toFixed(2)}`}), Plot.crosshair(seriesLongCallPL, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Long Call position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>X <span class="badge">${x}</span></span> <span>Call premium C0 <span class="badge">${c0.toFixed(2)}</span></span> <span><span class="swatch" style="background: blue"></span> Payoff</span> <span><span class="swatch" style="background: green"></span> P/L (incl. premium)</span> <span><span class="swatch" style="background: red"></span> Current point</span></div>`
shortCallPayoff = Plot.plot({caption:"Payoffs on a Short position on a Call option at the option maturity",x: {domain: [0,200],label:"S_T" },y: {domain: [-100,100],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([x], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0,0], [x,0], [200, x -200]], {stroke:"red"}),// Profit/Loss including premium Plot.line(seriesShortCallPL, {x:"x",y:"y",stroke:"green",strokeWidth:2}), Plot.dot( [[sto,-Math.max(0, sto - x)]], {fill:"blue",r:5,title: d =>`S_T: ${sto}X: ${x}Premium C0: ${c0.toFixed(2)}Payoff: ${-Math.max(0, sto - x)}P/L: ${ (-Math.max(0, sto - x) + c0).toFixed(2) }`,tip:true }), Plot.tip(Plot.pointerX(seriesShortCallPL), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${-Math.max(0, d.x- x)}\nP/L: ${(-Math.max(0, d.x- x) + c0).toFixed(2)}`}), Plot.crosshair(seriesShortCallPL, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Short Call position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>X <span class="badge">${x}</span></span> <span>Call premium C0 <span class="badge">${c0.toFixed(2)}</span></span> <span><span class="swatch" style="background: red"></span> Payoff</span> <span><span class="swatch" style="background: green"></span> P/L (incl. premium)</span> <span><span class="swatch" style="background: blue"></span> Current point</span></div>`
Put Options
A put option gives the holder the right to sell the underlying asset at the exercise price.
md`Put premium (Black–Scholes, r = 4% cc, σ = 20%, T = 1): **${p0.toFixed(2)}**`
longPutPayoff = Plot.plot({caption:"Payoffs on a Long position on a Put option at the option maturity",x: {domain: [0,200],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([x], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0, x], [x,0], [200,0]], {stroke:"blue"}),// Profit/Loss including premium Plot.line(seriesLongPutPL, {x:"x",y:"y",stroke:"green",strokeWidth:2}), Plot.dot( [[sto,Math.max(0, x - sto)]], {fill:"red",r:5,title: d =>`S_T: ${sto}X: ${x}Premium P0: ${p0.toFixed(2)}Payoff: ${Math.max(0, x - sto)}P/L: ${ (Math.max(0, x - sto) - p0).toFixed(2) }`,tip:true }), Plot.tip(Plot.pointerX(seriesLongPutPL), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${Math.max(0, x - d.x)}\nP/L: ${(Math.max(0, x - d.x) - p0).toFixed(2)}`}), Plot.crosshair(seriesLongPutPL, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Long Put position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>X <span class="badge">${x}</span></span> <span>Put premium P0 <span class="badge">${p0.toFixed(2)}</span></span> <span><span class="swatch" style="background: blue"></span> Payoff</span> <span><span class="swatch" style="background: green"></span> P/L (incl. premium)</span> <span><span class="swatch" style="background: red"></span> Current point</span></div>`
shortPutPayoff = Plot.plot({caption:"Payoffs on a Short position on a Put option at the option maturity",x: {domain: [0,200],label:"S_T" },y: {domain: [-150,150],label:"Payoff" },grid:true,pointer:"plot",marks: [ Plot.ruleY([0]), Plot.ruleX([0]), Plot.ruleX([x], {stroke:"gray",strokeDasharray:"4,4"}), Plot.line([[0,-x], [x,0], [200,0]], {stroke:"red"}),// Profit/Loss including premium Plot.line(seriesShortPutPL, {x:"x",y:"y",stroke:"green",strokeWidth:2}), Plot.dot( [[sto,-Math.max(0, x - sto)]], {fill:"blue",r:5,title: d =>`S_T: ${sto}X: ${x}Premium P0: ${p0.toFixed(2)}Payoff: ${-Math.max(0, x - sto)}P/L: ${ (-Math.max(0, x - sto) + p0).toFixed(2) }`,tip:true }), Plot.tip(Plot.pointerX(seriesShortPutPL), {x:"x",y:"y",title: d =>`S: ${d.x}\nPayoff: ${-Math.max(0, x - d.x)}\nP/L: ${(-Math.max(0, x - d.x) + p0).toFixed(2)}`}), Plot.crosshair(seriesShortPutPL, {x:"x",y:"y",stroke:"#444",opacity:0.6}) ],title:"Short Put position payoff"})
html`<div class="plot-legend"> <span><span class="swatch-line" style="border-top-color: gray; border-top-style: dashed;"></span>X <span class="badge">${x}</span></span> <span>Put premium P0 <span class="badge">${p0.toFixed(2)}</span></span> <span><span class="swatch" style="background: red"></span> Payoff</span> <span><span class="swatch" style="background: green"></span> P/L (incl. premium)</span> <span><span class="swatch" style="background: blue"></span> Current point</span></div>`
Option payoffs at maturity:
Long Call: \(\max(0, S_T - X)\)
Short Call: \(-\max(0, S_T - X)\)
Long Put: \(\max(0, X - S_T)\)
Short Put: \(-\max(0, X - S_T)\)
The blue and red lines in the diagrams represent the payoff at maturity. The green lines also account for the premium paid or received, showing the final profit or loss.