0.3
Conventions
Notation, units (annualised vol, continuous vs simple rates, day counts), prerequisites, how to run the code.
This page is the reference. Nothing on it teaches; it records the conventions every other page assumes, so that a symbol or a unit that trips you has one place to be looked up. Read the prerequisites once, then come back here when you need to.
Units
Time is measured in years. is one year, and a step is a fraction of a year. Where a page counts days it says which count it is using. The pricer and the library use Actual/365: an expiry in days divided by 365, with nothing rounded in between. Other day counts exist — Actual/360 and 30/360 among them — and the fraction of a year between two dates depends on which one applies; 1.0 prices a deposit with the wrong one and shows the size of the error.
Volatility is annualised and carried as a decimal: is 30% a year. A slider shows the percent; the code holds the decimal, and the formulas take the decimal. Over years the spread is , and 2.1 shows why the square root.
Rates are continuously compounded throughout Parts 2 and 3, and carried as decimals. A rate means one unit of cash grows to over years, and a payment of one unit at is worth now. A rate may be negative. A dividend yield is a continuous yield in the same units. Simple and annual compounding, and the conversions between them, are 1.0's.
Prices are in the underlying's currency, and there is one underlying, so no currency ever needs converting. Greeks are raw partial derivatives per unit of their input — vega per 1.00 of volatility, theta per year, rho per 1.00 of rate — and a desk's per-point, per-day and per-basis-point figures are scalings applied at display, once, where you can see them. 2.10 and 3.5 own the Greeks; this page only fixes their units.
Prerequisites
Probability at the level a working developer has: variances add across independent things, and sums of many small independent things come out normal. Both are assumed without proof. The stochastic side — everything from a random walk onwards — is taught in full.
Ordinary calculus to a second-order Taylor expansion. That is the whole of what Itô's lemma adds the rulebook to.
You can read code. The snippets are Python with numpy; the library is C++20 and Part 3 reads it. You do not need to write either to follow the pages.
No finance is assumed. 0.1 says what the instruments are for and Part 1 says what each one is.
Running the code
There are four kinds of code on this site: experiments, snippets, demos and the library. You can directly run all apart from snippets, which are part of the experiments themselves.
The experiments behind Part 2 live in the Touchstone repository under experiments/,
one script per page, each writing its JSON result beside it. Every script takes an explicit
seed and records it in its output, so the same seed gives the same result, to the tolerance
each script asserts. They run under uv, which installs Python, numpy and QuantLib at the
pinned versions and needs nothing else.
The snippets shown on a page are extracts of those files, not copies of them, and the site's build runs every file it extracts from. A snippet's caption names the file and the lines. If you want to run a snippet, run the experiment it came from.
The demos run in your browser and need nothing installed.
The library is C++20. It builds with CMake and its tests run under ctest; GCC and
Clang both build it with warnings as errors, and the tests read the committed QuantLib
reference values rather than linking QuantLib.
The exact commands are in the Touchstone README, which is where they are kept current.
Notation
Bars, brackets and Greek letters carry precise, boring meanings and never decorate. When two look-alike symbols coexist on a page, the page says so at first use.
Not what and mean: only the notation that trips working developers.
Derivatives
A function of one variable gets primes: , . Once time enters, as in , we switch to partial derivatives: , , . The switch itself tells you depends on as well as .
We always differentiate with respect to the placeholder , then evaluate along the path: at , never .
In this notation, Itô's lemma reads:
where is the drift and the volatility. Drift-plus-noise lines always put before .
Random walks and scaling — page 2.1
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "S sub n" | position of the walk after steps | the subscript is a time index, never a power | |
| "ksee" (xi) | the -th step, or | Greek habit: letters like , name random draws; not a constant | |
| expectation of | the probability-weighted average of over all possible outcomes ("worlds") | not "the value you expect" — is a value the step never takes | |
| variance, standard deviation | spread of ; | is in squared units and adds across independent terms; is in 's own units and does not | |
| absolute value / magnitude | the size of , sign stripped; when is a position or a difference, its distance from 0 | bars mean size, always; "distance" is the reading when the thing inside is a position | |
| expected magnitude | shorthand for — the brackets are elided when bars are present | 2.1's trap: exactly while . One glyph, two animals | |
| "expectation of given " | conditioning — arrives properly in 2.2 | this vertical bar is unrelated to absolute-value bars despite the identical glyph | |
| proportional to | equal up to a fixed constant | says how something scales, not what it equals: | |
| vs vs | approx / asymptotic / exact | numerically close; "behaves like, for large "; exact | is a large- statement, not an identity at |
| "order dt" | shrinks at the same rate as (resp. ) as | a rate, not a value — the whole pincer is a fight between orders | |
| "W" (for Wiener) | the random walk of 2.1 taken to its continuous limit with -sized steps — Brownian motion; is its position at time . Defined properly in 2.2 | not new machinery: 2.1's object wearing a name. is the step column of the pincer | |
| "d-W" | the increment of over the next slot: — a -sized zero-mean kick | the d means "a small increment of", as in — NOT a derivative; has no derivative (2.2) |
Brownian motion — page 2.2
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "W at t" | the position of Brownian motion at time ; the argument is a time, and | the number you see is a variance, never an ; is and is never written. has 0.5 — the time 0.5 in a different hat, coincidence not identity | |
| "normal with mean mu and variance sigma squared" | the second slot of is a variance, by convention | has 0.5. numpy's rng.normal(loc, scale) takes scale as the sd, so code says scale=0.5 where the maths says — same distribution, opposite slot | |
| "X is distributed as" | between a random variable and a distribution means "has this distribution" — exact, not approximate | second reading of on the course (2.1: "behaves like, for large "); which one is meant is fixed by what sits on the right — a distribution, or a formula in | |
| "delta W" | the increment over a finite step: , over one step | the thing simulation actually sums: , so the path is . is the same thing with ; neither is a derivative | |
| "F sub s" / "the filtration at s" | everything known up to time — the whole history of the path so far | not a function and not a set of numbers you compute; reads "the expectation of given all we know at ". For Brownian motion, alone carries all of it (Markov) | |
| "martingale property" | the best forecast of the future value, given everything known now, is the current value | this is conditional: unconditionally, but . Not "the mean is constant" — "the mean, given now, is now" | |
| martingale · Markov | — | martingale: forecast = present (a statement about the mean). Markov: given the present, the past adds nothing (a statement about information) | different properties, both implied by independent increments. Markov independent increments: a mean-reverting process is Markov and its increments depend on the level |
| "root-c W of t over c" | the zoomed path: time stretched by , space by ; again a Brownian motion | the vertical factor is , not (variance goes , goes ). For a 1 % zoom and the axis stretches | |
| excess kurtosis | — | : zero for a Gaussian, negative for lighter tails, positive for heavier | the is what makes it excess; a -step sum of coins has exactly , which is how 2.2 shows the CLT arriving rather than asserting it |
- Laplace · +3
- Gaussian · 0
- uniform · −1.2
- 10-step coin sum · −0.2
Quadratic variation — page 2.3
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "sigma" — sum | add up over every grid step, : | a sum over the grid is one number, not a function of . terms of size make order 1; of size make order ; of size make order | |
| steps, step size | the grid: chopped into steps of length | carry : , which is only because in the experiment | |
| "Z" | the standard normal, ; is the -th independent draw. | a specific named variable, not a family: "" means nothing. The bracket in carries the Gaussian family's parameters; other families put other things there (: a count; : endpoints) | |
| "Z squared", "chi-squared with one degree of freedom" | the square of a standard normal. Mean 1, variance 2, lives on , median 0.45, piled against 0 with a long right tail | not : an is negative 24 % of the time, a square never. Variance 2 comes from : for , . is a root-mean-square, not a range — the spread is all on the right | |
| "chi-squared with k degrees of freedom" | , independent standard normals squared. Mean , variance | the subscript is a count, not a parameter like or . is with — a bell by the CLT, though each term is a spike | |
| interval notation | the numbers from up to but not including . Square bracket includes the end, round bracket excludes it. = zero or any positive number | always gets a round bracket — it is a direction, not a value reached | |
| "the quadratic variation of W up to T" | the limit of over as the grid is refined; equals for Brownian motion, path by path | square brackets here are not an interval; angle brackets are not an expectation. Both notations are in use for the same thing | |
| quadratic variation · total variation | — | quadratic: in the limit. Total: in the limit — a curve's length | "variation" is not variance. A smooth curve: total variation finite, quadratic 0. : total , quadratic . Each object has one and not the other |
| , , , | "the rulebook" | statements about sums over the grid as : (what sums to), , , | not about one step: a single is a wild draw, nothing like . "" means "vanishes when summed"; "" means "sums to what sums to". Rule: size survives, anything smaller dies |
| "f prime", "f double prime", "g triple prime" | first, second, third derivatives — each a function | on screen looks like a closing quote mark. does not exist (2.2); that is why 2.3 works with , never | |
| chain rule | — | for : — differentiate the outside with the inside left alone, then multiply by the inside's derivative | the inner derivative is the factor people drop: , and that is squared in every integral of . For the chain rule is short by — 2.4 |
| "the integral from 0 to T" | the continuous version of : area under the curve. Over it is just the average value of the integrand | three different integrals of on 2.3: = net change (0 for a full sine wave), = distance travelled (4), = mean squared speed (). Only the first is "undoing the derivative" | |
| — | one full wave over ; ; averages over a period () | the makes the period exactly 1 and reappears as under the integral | |
| "phi of z" | the standard normal density, : the height of the bell at | a height, not a probability; probabilities are areas. is the expectation recipe — value × how likely, summed | |
| "expected size of Z" | 0.7979, the average magnitude of a standard normal draw; hence and | less than the of 1 because is a root-mean-square and squaring favours the big draws. The coin has constant exactly 1 instead | |
| odd moment | — | with odd (1, 3, 5, …); zero for any symmetric about 0 | why is exactly 0: the only surviving covariance term is , an odd moment. is not a sum of and the trick fails — its correlation is small, not zero |
| log-log slope | — | fit a line to against ; its slope is the exponent in " goes like " | means , means , means , 0 means settles. Every "goes like" claim in the JSON is checked this way |
| Taylor expansion | — | : the change in a smooth over a small step, as a series in the step | for a smooth path only the term survives summation (chain rule). For the term survives too, because — the whole reason ordinary calculus fails |
The Itô integral — page 2.4
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "the integral of with respect to " — a stochastic integral | the limit as of the left-endpoint sum . Equals | not "the area under " — that is (2.3's kind of integral, with ). Here the increment is , so this is a sum of position × change, a P&L | |
| , | "integral of against " | the general form: is the integrand (the position), or what it is held against (the price). is the case | must be adapted — read at the left end of each step. Which letter is "position" and which is "price" is the whole content of the notation |
| , , | left endpoint, midpoint, right endpoint | the three places in step where the integrand can be read: , , | the choice changes the answer by or . On the smooth pages it changed nothing, which is why nobody mentioned it before |
| , | "delta one, delta two" | the two half-step increments of a step: , , so ; each | lower-case for a half-step, capital for a full step — same "change of" meaning, different grid |
| "Stratonovich integral" — the circle | the midpoint limit, . Related to Itô by | recognise it, do not use it: on this course every is Itô. The circle is not composition of functions | |
| adapted · non-anticipating | — | a process is adapted if depends only on what is known at — on , the filtration from 2.2. "Non-anticipating" is the same word from the other side | the trading meaning: you choose the position before the price moves. itself is adapted; is not adapted at |
| , | "the running integral" | the left () or right () sum over the steps before — the integral as a process in , not one number | is a martingale; has . is for integral (not an identity matrix), for right endpoint (not a return) |
| martingale ↺ | — | 2.2's property, now applied to : . The first thing the Itô integral is, once you have it | it is a property of the left-endpoint limit only. Checked on 2.4 as and |
| Itô isometry | — | : the mean-square of a stochastic integral is an ordinary integral of the mean-square integrand. For : | "isometry" is geometry's word for "preserves lengths": the size of the integral (root-mean-square) equals the size of the integrand. Not a statement about means |
| vs | mean-square vs variance | . When they coincide, which is why the isometry gives the variance of directly | for the right sum they differ: because |
| s.e. | "standard error" | of a sample mean: of the values divided by . 20,000 values with 0.7 give s.e. 0.005 | not the of the thing itself. "−0.004 ± 0.005" means the mean is 0 to within noise; the values themselves spread ±0.7 |
| limit | "the limit as " | the value a grid quantity settles on as the grid is refined without end: the last row of a table like 2.4's path-1 table. | not a bound, a maximum or an extreme path — the everyday sense of the word is the wrong one here. "left − limit" is "this grid's value minus the settled value", the discretisation error, and it can have either sign |
| (exact) vs (limit) | "equals on every grid" vs "tends to" | two kinds of equality on 2.4: is algebra, true at ; is a limit, and needs 2.3 | 2.4's argument is "exact identity, then one limit". Keep the two visibly apart or the reader thinks the is approximate |
| units of | "root time" | , so has units ; and have units of time, as do and | the check that kills () before any arithmetic. Carry units through every stochastic formula; they catch factor-of- slips |
| telescoping sum | — | : every interior term appears once with each sign and cancels | why with no limit and no randomness left in it beyond the endpoint — the one exact step in the derivation. Also why on every grid |
Itô’s lemma — page 2.5
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| Itô's lemma | — | : the chain rule plus a second-order term, for a smooth of Brownian motion. Taylor to second order with | it is a limit statement (the -form), not an identity; the identity behind it is Taylor summed over the grid, the -form. 2.4's is the case |
| — order of terms | "drift first" | every line with both a and a is written with the certain part first and the random part second: , , the general form | the two orders say the same thing; the course fixes one so the eye can find the drift in the same place every time. Taylor expansions stay in power order (, , ): that is an expansion, not a drift-plus-noise line |
| "the Itô term", "the dt term", "the second-order term" | half the curvature of at the current , times . The survivor of 2.3: the one Taylor term whose sum is -sized and does not die | the is Taylor's , not a convention — drop it and stops being a martingale. Its sign follows : positive for and (means grow), for (either sign) | |
| -form · -form | — | the two ways of writing the second-order term on a grid: (exact) and (a limit). Their difference is the -vs- noise, | vs again (2.4 ↺). On a grid the lemma is off by the noise, which comes from replacing by , not from Taylor — the remainder is , ten to a thousand times smaller |
| third order and beyond · remainder | — | : everything after the second-order term. For it is exactly ; for it is empty | rms , faster than 2.3's bound, because the signed cubes cancel (odd moment ↺). "Vanishes" here means "sums to 0 in the limit", not "each term is small" |
| vs | signed vs unsigned cubes | has mean 0 and ; has mean . On the coin walk: exactly, and exactly | the bars change the rate by a factor . 2.3 measured the unsigned one; the lemma's remainder is the signed one |
| "the lognormal mean" | the mean of the exponential of a Brownian motion grows at a constant rate per unit time: all of it from the term, none from | not : 's size sets the spread of , and its variance sets the mean. "Mean of the exponential ≠ exponential of the mean" — the mean is held up by rare large paths while a typical path sags | |
| "the exponential martingale" | the in the exponent cancels the term exactly, leaving : constant mean 1, second half independent of the first | is forced, not chosen: gives a mean falling like , is not a constant and falls too. The first appearance of 2.6's | |
| , , , | "f sub t", "f sub x", "f sub x x", "f sub t x" — partial derivatives | the derivative of with respect to holding fixed; with respect to holding fixed; the second in ; then differentiated in (read a two-letter subscript left to right as the order of differentiation; for a smooth , ) | a subscript that is a derivative, on a page full of subscripts that are indices (, ). is not " at ". Tell them apart by the letter: a variable name (, ) is a derivative, a counter (, ) is an index. And names 's second slot, not a moving thing: is what occupies the slot, so pairs "sensitivity to the slot" with "how far the occupant moved" — as does. 2.7 names the slot after its occupant, , |
| "drift a, volatility b" | the general one-step recipe for a process : a certain part ( is the drift, the average rate of change of , units of per unit time) plus a random part ( is the volatility or diffusion coefficient, the size of the random step per ; ). itself is , ; 2.6's GBM is , | the general Itô form is — the comes from , the rulebook applied to . Everything else is the chain rule | |
| smooth (, ) | — | has continuous derivatives up to the order Taylor uses: two in , one in . , , , , and every pricing function on the course | an assumption about the function, never about , which is nowhere differentiable (2.2): the lemma is "a smooth function of a rough path". Where has a kink — an option payoff at expiry — is a spike and the lemma needs an extra term; 2.10 meets it as gamma at the strike |
| ↺ | the rulebook, as an operation | 2.3's line, now used as a substitution inside a Taylor expansion: wherever appears under a , replace it by and let | it is licensed only under a sum: a single is a draw, and the substitution costs the -vs- noise on any finite grid. The same substitution on a smooth — by — is wrong by |
| Taylor's and | "one over two factorial, one over three factorial" | the coefficients of the second- and third-order terms in | the of Itô's lemma, of 2.4's , and of the lognormal's are all this one . Check it on : , and is the coefficient of . In two variables the second-order block has one in front of four products, and the two equal cross terms eat it: |
| heavy tail · s.e. of a lognormal mean | — | a mean that is set by rare large values: is carried by paths with ( against a typical 4). 400 paths give such a mean to tens of percent, 20,000 to a few | "± s.e." from the sample undercounts when the rare values are missing from the sample. The JSON checks 's levels loosely (30 %) and its rates tightly (slopes ± 0.05) for this reason; 's levels are tight (15 %) |
Partial derivatives — page 2.5
These rows replace the subscript partials of the batch above.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "partial f by partial t" | the derivative of with respect to , holding fixed: how fast changes as the clock moves with the slot's contents left where they are | the curly marks a partial derivative: has more than one slot and the others are held fixed. It is not the d of and , which is an increment. In the lemma it multiplies alone — the clock's own contribution | |
| "partial f by partial x" | the derivative of with respect to its second slot, holding fixed | names 's second slot, not a moving thing: differentiate in the placeholder, then evaluate along the path — at , never . pairs "sensitivity to the slot" with "how far the occupant moved", as does | |
| "second partial of f in x" | differentiated in again, still held fixed: the curvature of in its second slot | the two s count differentiations and square nothing — one sits on , the other on . It enters the lemma in the one term the chain rule does not have, | |
| , , , — retired | — | the subscript partials of the batch above: is , is , is . , read left to right, is , read right to left; for a smooth the order does not matter | no page uses them. A function of one variable keeps its primes (, ); a function of time and takes . Subscripts are left to indices (, ) and times () |
SDEs and geometric Brownian motion — page 2.6
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| SDE · | "stochastic differential equation" | 2.5's one-step recipe , with the drift and the volatility now allowed to depend on where is and on the time. It says what happens over the next ; it is not yet a formula for | the d's are increments, not derivatives: has none (2.2). Read it as " for a small step", which is exactly the Euler step |
| · GBM | "geometric Brownian motion" | the price model: drift and volatility , both proportional to the price, so the percentage step is the same whatever the price. is the drift rate (per year), the volatility (per ) | "geometric" = multiplicative: can never cross zero, and is the natural variable. Not "Brownian motion of the price" — is the driver, is the exponential of a Brownian motion with drift. Written out as "Geometric Brownian motion (GBM)" at first use on every page |
| solve (an SDE) | — | write as a formula in (no stepping). The route: find a function of whose SDE has no on the right, sum the steps exactly, invert. for GBM | most SDEs cannot be solved; GBM can, which is why 2.9 has a closed form at all. "Solve" never means "simulate" |
| "the closed-form sample", "exact sampling", "draw directly" | the solution of GBM with . One standard normal per path gives exactly, with no grid and no error. Decision 1: use it whenever the payoff only looks at | one draw gives only, nothing in between; but the same line holds between any two grid points, , so a path-dependent payoff on GBM steps exactly too. Forget the and every draw is too high — 8 % at , | |
| Euler–Maruyama · | "Euler step", "Euler" | the SDE read literally, one step at a time, . steps, normals per path. Decision 2: the fallback when the model has no solution (Part 4); GBM itself steps exactly, and is where Euler's cost can be measured | its differs from the exact one on the same normals by to leading order: 1 % rms at , shrinking like . The error is 2.5's -vs- noise, not a bias — its mean is 0 |
| the stepping error · means ignore it, spreads keep it | "strong order ½" | the pathwise gap shrinks like (measured slope −0.501) and has mean zero. A mean over paths — a price — hardly feels it; a spread over paths — a P&L distribution, a hit-rate — keeps it, because a zero-mean noise adds to a variance | the convergence of is a different, faster rate ("weak order", ; exactly). Not "a hedge follows one path": a hedging simulator follows many and reads their spread, which is a spread |
| · volatility drag | "the drag", "the Itô correction" | the lemma's on with : . The mean log-return is , not ; the median price is while the mean price is | it moves the median, not the mean. With and the mean price stays at and the median falls to ; 58 % of paths end below the mean. 2.5's is the same fact from the mean's side |
| mean vs median (lognormal) | — | for : median , mean . The ratio is the lognormal's mean-over-median; here . In log space there is one centre: mean = median = ; the median carries over through exp, the mean does not | the mean is held up by the tail — the 99th percentile is for — and the fraction of paths below the mean is , not . Nobody "sees" the median: it is the point a single path is as likely to finish above as below. The expected price and the odds for one path are different things |
| log-return · | — | the Gaussian one: mean , variance , skewness and excess kurtosis 0. is lognormal because its log is normal | the simple return is not Gaussian and its mean is . The course's is the of the log-return per , and 2.11's "returns are not lognormal" is a statement about this quantity. Write , not , unless |
| in the step ↺ | — | 2.1's -sized kick, now inside the Euler step: , so kicks have total variance whatever is | instead of gives a volatility of — too small by , 100× at , and worse the finer the grid. The tell: the drift becomes the same size as the kick |
| realised volatility · the three tests | — | of a path's per-step log-returns — the you would measure from the path; 0.400 on every grid for the correct step. With mean and median , the three assertions a GBM simulator must pass (Decision 3) | a per-path number with its own noise (±0.003 at , ), so assert to a few percent. The mean test catches a missing ; the volatility test catches ; the mean passes the bug, so it is not enough on its own. 2.10 compares realised with implied ; 2.11 asks whether it is constant at all |
| · | "phi of x", "N of x" | the probability that a standard normal is below — the cumulative normal. On 2.6, is the fraction of paths below the mean | the same function is written from 2.9 on, as the index writes , and as most option texts do; appears only on 2.6. Not a density: , as |
Delta hedging and the Black–Scholes PDE — page 2.7
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| "the option value", "" | the price of the option at time when the stock is at — a function of two variables, the first the course has met. Taken on 2.7 from the closed form as a candidate function (2.9 derives it), licensed by the check that it satisfies the PDE — which is what any must satisfy | is a surface over , not a number; "the price" is here. Its derivatives are partials, throughout | |
| — delta, hedge ratio | "delta" | how much moves per unit move in ; the number of shares to short against one option so that the first-order exposure to cancels. 0.63 at inception here, 1 for a forward, 0 or 1 for the call at expiry | a function of , so it changes along the path — that is why the hedge is rebalanced. Held fixed within a step, reset between steps. Not "the derivative with respect to time". Because is taken, a change over one grid step is written , on 2.7 (2.3–2.6 wrote increments ) |
| — gamma | "gamma" | the curvature of in ; the rate at which changes. is the P&L a delta-hedged position makes on a move of , in either direction, and 2.7's numbers are all this term | zero for a forward, positive for a call, largest near the strike and growing like towards expiry. 2.10 names the rest of the Greeks; the P&L needs this one now |
| — theta | "theta" | how changes as time passes with held fixed; negative for a call (−9.8 per year at inception here): the option decays. The PDE reads : theta pays for gamma | at fixed , not along a path. Often quoted per day; here per year, like and |
| — the hedged portfolio | "pi", "the hedged book", "the portfolio" | long one option, short shares; the cash difference at . over a step on which is held fixed. Self-financing: nothing goes in or out after inception; rebalances pay for themselves from cash | the money tied up is (negative here: the shares you sold more than paid for the option), and it is that amount that earns . "" is not a product sign |
| rebalance — | — | resetting the share position to the current at a grid time, times over the life. Decision 1: a static hedge () takes the spread from 29.6 to 11.8, and from there it falls like — 6.50 at , 0.22 at on an 18 option | a hedge is never "done"; between rebalances it is stale by . The is 2.3's noise again: terms of |
| — the risk-free rate | "", "the risk-free rate" | the rate cash earns with certainty; 0.05 here. A portfolio with no term must earn exactly , or there is an arbitrage. The only way enters the derivation, and the rate at which a price is discounted (2.8) | not the stock's expected return . Nothing on 2.7 says the stock drifts at ; 2.8 will say that pricing as if it did gives the same |
| , | "strike", "time to expiry" | the call pays at ; is how long is left. depends on only through . here (at the money) | : the sign flips. The forward struck at has , , |
| the Black–Scholes PDE | "the PDE", "Black–Scholes" | , with = the payoff. What must satisfy for a delta-hedged position to earn ; a property any pricer can be tested against (residual on the closed form, by finite differences) | is not in it. and are. "The formula" (2.9) is one solution of it, for one payoff; the PDE holds for every European payoff on this stock. 3.3 solves it on a grid |
| vanishes ↺ | — | 2.6's drift , cancelled from by the same choice of that cancels , because both enter through . Decision 2: a hedger needs no view on direction. Measured: the hedged mean and at , 0, +0.3 agree within five s.e. from . Not true of a static hedge: at the spread at is 17.6 against 11.8 — drift-blindness is bought by rebalancing | it vanishes from the hedged book, not from the stock: the unhedged mean swings from −11.7 to +22.1. On a coarse grid () an trace of it survives, +0.7 on a spread of 7 |
| realised vs implied volatility ↺ | "", "" | 2.6's realised volatility is the the stock actually moves with; the implied is the the price and the hedge were built from. Decision 3: hedged at while the stock moves at , the mean P&L is — +3.74 for 0.5 against 0.4, −3.76 for 0.3 | the gap in variances, not in vols, times a path-dependent gamma integral. "Implied" is named for inverting 2.9's formula, which 3.4 does; here it only means "the in ". That P&L keeps a spread (1.3–1.7) no rebalancing removes |
| realised quadratic variation (of the stock) ↺ | — | 2.3's with the stock in place of : along the path, the activity the hedge is left exposed to. Per step its mean is , so the gamma P&L's mean is | direction is , which the hedge removes; activity is , which it does not. The hook's "gamma acting on realised quadratic variation" is this row |
| gamma P&L — | "the gamma P&L", "the hedging error" | what a delta-hedged position makes on one step: the move squared against what the price assumed for it. Mean zero when , spread , summed over steps . 2.5's noise with a price on it; 2.10's "a delta-hedged option earns " is its mean | a second-order quantity: it exists only because is curved. A linear payoff has none, and that is the course's whole distinction. Path by path it reproduces the P&L with a residual that falls faster than the P&L (ratio 0.54 → 0.06 across the grids) |
Risk-neutral pricing — page 2.8
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| — the real-world measure | "", "the real-world measure", "the physical measure" | the probabilities 2.6's model assigns to paths when the stock drifts at its actual expected return ; the measure every page up to 2.7 worked in without naming it. | named only now that there is a second one. Nothing about changed on 2.8; what changed is which measure the price is an expectation under. Not "the real distribution" — still the model's |
| — the risk-neutral measure | "", "the risk-neutral measure", "the pricing measure" | the same model with the drift set to : . Under every discounted traded price is a martingale — the stock, the forward, the call, the hedged book — and prices are discounted expectations. Measured: has mean at every checkpoint; the -run's average is the price | a device, not a belief: nobody thinks the stock drifts at , and stays . "Risk-neutral" names the investor who would believe it, and no such investor enters the argument — the hedge does. That there is exactly one here is 2.11's to show (one noise, one traded stock) |
| — expectation under | "the -expectation", "the risk-neutral expectation" | the average over paths drawn with the -drift — or over paths drawn with any drift, each weighted by . The quantity a Monte Carlo pricer estimates | not . The two differ by at , 21.0 at 0.3. The superscript is not decoration |
| — the pricing formula | "discount the risk-neutral expectation" | 2.8's result: the price is the -expectation of the payoff, discounted at . For , condition on and discount over . Measured: 18.010 ± 0.031 against 18.023; the surface over within 1.7 s.e. at 32 points | both the drift inside the expectation and the discount rate are , for different reasons: the discount is the time value of the payoff; the drift is what makes the hedge break even. discounted at is not a price |
| the -drift — "as if the stock drifted at " | "simulate under ", "the -drift" | what a simulator does to price: . The only change from 2.6's exact draw is the number in the drift slot | is untouched. The is 2.6's drag, unchanged; the -median of is , below — "drifts at " is about the mean |
| — the -Brownian motion | "W-tilde", "the Brownian motion under " | : 2.2's Brownian motion with a tilt added, which under is a Brownian motion with no tilt. The noise the stock has under the -drift: | the same path as — the same random numbers — read with a different drift absorbed into it. Under it is "Brownian motion with drift " (2.2); under it is Brownian motion. Which one it is depends on the measure, not on the path |
| — the market price of risk | "lambda", "the market price of risk" | how far the real-world drift sits above , in units of : excess return per unit of volatility. 0.625 at , −0.625 at −0.2, 1.375 at 0.6. The size of the tilt Girsanov removes | not needed to price — it is exactly what eliminates, and the price does not contain it. It sets the cost of reweighting ( of the paths) and nothing else on 2.8. The name is finance's, not 2.8's argument |
| — the likelihood ratio, Girsanov's weight | "the weight", "the likelihood ratio", "" | the factor that turns a -average into a -average on the same paths: . 2.5's exponential martingale with , so mean . Measured: the weighted -paths average to the price at every in the table; mean = 1.000 ± 0.001 at every up to 0.3 | a weight per path, not per average: dividing the average by gives 30.3, not 18.0, because the division corrects only the part of the payoff proportional to , not the strike. Mean , so the weights have a spread — the ESS row |
| Girsanov's theorem | "Girsanov", "the change of measure" | adding a drift to a Brownian motion is undone by reweighting its paths by : the tilted process is a Brownian motion under the reweighted measure. Here: the -stock and the -stock are the same paths with different weights. Named on 2.8 and measured, not proved: weighted mean log-return , weighted realised vol | changes the drift and only the drift — "reweighting paths, not changing volatility". A change of volatility is not a change of measure; no reweighting turns a path into a 0.5 one |
| Feynman–Kac | "Feynman–Kac" | the discounted -expectation of the payoff, as a function of , solves 2.7's PDE with the payoff as its condition at — because is a -martingale and Itô's lemma says its term is the PDE. Named on 2.8, sketched in the "why" section, measured: agrees with the closed form at 32 grid points within 1.7 s.e. and its PDE residual is the size of its Monte Carlo noise | the link between three pricers — Monte Carlo (2.8), the closed form (2.9), finite differences (3.3) — and the reason the course can ask them to agree. It says the expectation solves the PDE; it does not say how to evaluate either |
| s.e. = — the Monte Carlo standard error ↺ | "standard error", "s.e." | 2.1's in its working clothes: the of the mean of draws is the of one draw over . ±0.95 at paths, ±0.03 at . Measured, not assumed: 100 pricers of paths scatter by 0.298 and each reported 0.312 | a Monte Carlo price is never quoted without it. 100× the paths for 10× the precision. "Within standard error" means within one; the checks use five |
| ESS = — effective sample size | "effective sample size", "ESS" | : how many equally-weighted paths a reweighted average of is worth. 68 % of at , 15 % at 1.375 (0.158 measured). The cost of simulating at the wrong drift and fixing it with weights | counts the weights, not the estimator: paths drawn towards the payoff can give a smaller s.e. than the -run (0.015 against 0.031 at ) — importance sampling, which 3.2 takes up. The reason to simulate under is that it needs no weights for any payoff |
| — the discounted stock, a -martingale ↺ | "the discounted stock" | 2.5's martingale, with the thing that is a martingale now named: under , , 2.5's exponential martingale with , mean at every . Under it drifts at : a submartingale for (128.6 at from 100), a supermartingale for (77.8) | a martingale is not a constant: its grows to 41.8 by . "Martingale" is a statement about the mean given the past; "martingale" needs "under " after it to be a sentence |
The Black–Scholes formula — page 2.9
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| — the cumulative normal ↺ | "N of x" | the probability that a standard normal is below : 2.6's under the name the formula is always written with. , on 2.9 | is what turns the call's two pieces into the put's; is the area, not the density |
| — the indicator of exercise | "one if is above " | 1 on the paths that finish above the strike, 0 elsewhere; is what splits the price into two pieces | its expectation is a probability, ; multiplied by it picks out the stock's value on those paths, not their average price |
| — the exercise threshold | "d two" | exactly when : the distance from the strike to the -median of , in standard deviations. on 2.9 (the median 97.0 sits just below ) | born from the inequality, not chosen; negative when the median is below the strike |
| — the threshold after the stock-weighting shift | "d one" | completing the square in moves the normal's centre by ; on 2.9 | the enters with a plus in and a minus in ; swapping them is the commonest implementation error, and the oracle catches it |
| — the risk-neutral probability of exercise | "N d two" | : the share of -drift paths that finish above the strike, 2.8's 47.0 % now named. Measured 0.4707 ± 0.0005 | not the real-world probability (70.8 % at ) and not the delta |
| — the share-measure probability of exercise; the delta | "N d one" | the probability of exercise when each path is weighted by : , the share of the stock's forward value that comes from the exercising paths. Also , the delta 2.7 hedged with. Measured 0.6278 ± 0.0005; bump 0.62741 | always above ; not "the probability of finishing in the money". is a different number and is not in the price |
| and — the two pieces | "the stock piece", "the strike piece" | the discounted stock received on exercise, 62.74, and the discounted strike paid on exercise, 44.72; their difference is the price | each is measurable on the draws (62.79 ± 0.07, 44.77 ± 0.05); the price is not " times a probability" |
| — the Black–Scholes call price | "the formula", "Black–Scholes" | 2.8's expectation evaluated: 18.023 on 2.9. The function 2.7 checked against the PDE and 2.8 borrowed, now derived; the function Part 3 implements and tests | exact — the Monte Carlo estimate is the approximation. Exact for this payoff and this model; 2.11 is where it breaks |
| — the put price | "the put" | the same integral over the other side of the strike: 13.146 on 2.9; measured 13.122 ± 0.017 | a European put can sit below its intrinsic value deep in the money, because ; that is not a bug |
| — put–call parity | "parity" | the call and the put differ by the forward, path by path and in price: 4.877 on 2.9, measured 4.889 ± 0.042 | needs no model — the payoffs differ by on every path and the discounted stock is a -martingale; the formula obeys it, it does not create it |
| — the continuous dividend yield | "q", "the yield" | cash the stock pays its holder at the rate ; under the price drifts at and becomes in the formula. The call falls (18.02 → 16.21 at ), the put rises | is not : the hedge removes the real-world drift, not the yield. Discrete dividends are 2.11's |
| — the forward price | "F", "the forward" | : 105.13 at , 102.02 at . The one number the market quotes for delivery at , whoever receives the dividends | the forward's price, not the forward contract's value (, 4.88); 2.8's forward was the contract |
| Black-76 — the formula written in | "Black seventy-six" | , : only in the discount, folded into . The same number as the other two spellings to | not a second model: the lognormal with its mean named differently. Prices options on forwards, futures, FX and swap rates because can be any quoted forward |
Greeks — page 2.10
Rows marked ↺ revisit a 2.7 row in its new role: computed from the formula rather than taken as a black box.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| Greek — a partial derivative of the price | "the Greeks", "a Greek" | , every other input held still: the first-order answer to "if this moves and nothing else does, how much does my book move?" Five on 2.10 — , , vega, , — all from 2.9's formula by one identity | first order only: the change on a finite move is , and the gap (0.632 against 0.627) is the next Greek's job. A Greek is a function of , not a number; "the delta" is its value now |
| — delta ↺ | "delta" | 2.7's hedge ratio, now differentiated out of the formula: the and terms the chain rule produces cancel, leaving . Put: | moves with the stock — 0.637 at — which is . Not the probability of exercise (that is , 2.9), though it is one under the stock-weighted measure |
| — gamma ↺ | "gamma" | the delta's own sensitivity to spot; 0.00946 here. The normal density in : peaks below the strike at long expiry (74.8 at ), at it as , growing like . The same for the put | "largest at the strike" is a short-expiry statement. Long the option is long gamma: on a move either way — the term the hedge does not remove |
| — the identity | — | the two density terms are equal (37.84 both), because the exponents differ by exactly . Every input but moves and together, so the chain-rule pair cancels — delta, vega, rho and theta each fall out in one line | not a coincidence of the base case: an identity in every input. The reason rho is "discount only" even though sits in and |
| — vega | "vega" | how much the price moves per 1.00 of volatility: 37.84 here, 0.378 per vol point. Positive, no direction in it, equal for call and put, largest near the strike (103.0 at ), growing like | not a Greek letter; the vol trader's Greek, because an option is a position in . Per unit on 2.10 and in the oracle; a desk's "vega" is usually per point — ask which |
| — theta ↺ | "theta" | computed: per year, −0.027 per day. Most negative near the strike (−10.20 at ); the carry alone deep in the money (−4.76); zero deep out. Put: −5.05 | at fixed = . The first term is : theta is gamma's bill. Per year here; per day on a desk |
| — rho | "rho" | the discount factor's derivative, the -terms having cancelled: +44.72 per 1.00 of , 0.0045 per basis point. The strike piece's -weight. Put: | positive for the call (paying later is cheaper when rates are higher), negative for the put. Not zero — the hedge removes , not . Small for short equity options; the rates desk's Greek |
| bump-and-revalue | "bump", "finite-difference Greek" | , and by the second difference. The check on every analytic form here ( at 216 points, call and put); the only Greek there is when there is no formula (3.5) | two errors in tension: truncation , round-off ( for ). 's best here is , not the a hand estimate gives; the study is 3.5's |
| theta pays for gamma — the PDE as P&L | "theta pays for gamma", "long gamma, short theta" | 2.7's read per unit time on the hedged book: — the theta paid is what the curvature is priced to earn at . Measured per step on 4,000 paths: a gamma gain of 7.58 ± 0.05 against a theta cost of 9.71 less carry 2.14 | an identity in expectation, not per step: the gamma gain depends on how the stock actually moves, the theta cost does not. Their difference is 2.7's gamma P&L, the gamma integral — −3.80 / +3.73 at / 0.5 |
| gamma gain · theta cost · carry — the step attribution | — | , , along a path: the three pieces of the hedged book's P&L once is removed, plus Taylor's remainder (rms 0.014 at , 0.11 at 256) | the remainder falls about eightfold from to 4096; the theta cost's spread ( 3.3) does not — it is a path integral, and how much theta you pay depends on where the stock spent the year |
| raw partials — the units | "per unit", "raw" | vega per 1.00 of , per year, per 1.00 of : what the formula gives, what the golden file stores, what the C++ returns | a desk scales at display — ÷100, ÷365, ÷ — and only there; a convention factor inside the oracle would have to match in three places. "Vega 37.8" and "vega 0.378" are the same number |
| — the dividend-rho | "dividend rho" | the stock piece's -weight, as is the strike piece's: −62.74 here. Carried by the oracle and checked against the closed form at 7,234 rows | not one of 2.10's five; named once so the golden file's seventh column has a home |
Where it breaks — page 2.11
Rows marked ↺ revisit an earlier row in its new role.
| Symbol | Say it | Here it means | Watch out |
|---|---|---|---|
| — implied volatility ↺ | "the implied vol", "implied" | the that makes 2.9's formula return the market's price: 0.400 for 18.02. Unique because everywhere; found by Newton on in four steps here. 2.7's , now backed out of a price rather than assumed | a price in different units, not a forecast of . Defined only for prices strictly inside the bounds; not recoverable where vega has vanished (the deep and one-day rows) |
| — the bounds | "the no-arbitrage bounds" | the call's range as runs from 0 to : 4.877 to 100 at the base case (put: to ). Every price between has one implied vol; a price outside has none and the solver refuses it | 687 golden rows sit on the lower bound (within ): no time value at double precision, so no vol |
| the smile | "the smile", "the vol smile" | against at one expiry when it is not flat: for the fair mixture a U with its bottom at the forward (0.398), 0.477 at , 0.452 at | its minimum is at the forward, not the spot; symmetric in , not in . A single- model has none |
| the skew | "skew", "the skew" | a tilted smile: higher at lower strikes (0.448 at against 0.372 at 160) when the high-vol state carries the lower forward | the fair mixture has none; direction comes from asymmetry between the states, not from fat tails alone |
| — the volatility surface | "the surface", "the vol surface" | the smile at every expiry, as one object: what a production pricer takes in instead of a . Named on 2.11; built on 3.4, drawn by D9 | 2.11 measures one expiry. The surface's own Greeks (vanna, volga) are named, not computed |
| the lognormal mixture — the synthetic market | "the mixture" | drawn from one of two 2.6 models, or 0.6 with equal chance, the state fixed for the life of the option and unknown when it is sold; forwards tied so . Every price is | a market built to break one assumption at a time, not a model of any stock. Each component alone passes the kurtosis test on 2.6 |
| excess kurtosis — fat tails | "kurtosis", "fat tails" | the fourth central moment over the variance squared, less the normal's 3: 1.80 for the mixture's , 1.92 for its daily returns, 0 for any lognormal. Mass beyond 3 : 1.23 % against 0.27 % | the check that catches the mixture where mean and variance do not. Within each vol state the returns are Gaussian: the fat tails are the mixing |
| — the between-state spread | "the unhedgeable piece", "incompleteness" | 7.54 here: the of a coin toss between the two states' prices — uncertainty about which state the option was sold in, fixed before the state became known. What is left of the hedged book's spread when the Greeks are right (the oracle hedge: 7.542 at ) | incompleteness, not a hedge failing: with only the stock to trade, the state is a risk nothing spans. The Black–Scholes hedge adds a within-state 2.83 in quadrature: 2.7's gamma P&L with the wrong |
| — the proportional cost | "ten basis points", "the fee" | the charge per unit of stock traded: 0.001 here, on every share at setup, each rebalance and the unwind. The rebalancing cost is and grows like : 0.485 at , 1.94 at 4096 | a fee, not a bid–ask model; spread + cost is smallest at an interior (256 on the grid). Leland (1985) folds it into an adjusted — v2 |
| "vol is the unit of price" | "forty vol", "quoted in vol" | quoting instead of : the stock moves 100 → 110 and the price quote 18.02 is stale (the call is worth 24.74 at 40 vol) while the vol quote is not. Vol removes the inputs that are usually observable (, , , ) and leaves the quantity options are quoted and compared in | comparable across strikes, expiries and days; the reason the surface, not a price list, is the market's object |
| vanna, volga — the surface's Greeks | "vanna", "volga" | and : how the hedge and the vega exposure move when the surface moves. Named on 2.10's "Into 2.11" and on 2.11 as where the Greeks go next | not computed on 2.11; 3.4 and v2 |
Check
A page says E[Sₙ] = 0 and, two lines later, E|Sₙ| ≈ 0.8√n. Which is right?
In E[W₂ | W₁ = 1.5], what does the vertical bar mean?
dW appears in dS = μS dt + σS dW. What is dW?
A demo slider reads "Vol 30%". What number does the code carry, and for what period?
The site says r = 0.05, continuously compounded. What is £100 worth in one year?