Approximating Option Probability ITM with the Normal CDF
Summary
The document explains the hardcoded coefficients in a script that estimates the chance a stock will finish above or below an option strike. The script scales annual volatility by the square root of time to expiry, compares the strike with the underlying price through a logarithm, and transforms the result into a standard-normal probability. It uses a polynomial approximation to evaluate the cumulative normal distribution function.
The cited explanation traces the approximation coefficients to a published mathematical reference and notes their use in an options textbook. This clarifies that the constants are numerical approximation parameters rather than contract-specific inputs. The discussion does not derive the full probability model or assess whether its assumptions fit a particular option: the code shown is limited, and practical estimates depend on the distributional and volatility assumptions used. It also does not compare the approximation’s accuracy with built-in normal distribution functions.
Key ideas
- The script’s hardcoded coefficients approximate the cumulative standard normal distribution.
- Its inputs include underlying price, strike, annual volatility, and time remaining.
- The calculation uses volatility scaled by the square root of time and a log price-to-strike comparison.
- The source identifies a published reference for the approximation but does not evaluate its accuracy or assumptions.
Tags
Full text
# Probability ITM formula for options
# Probability ITM formula for options
Given a stock of price `price` and annual volatility `annual_volatility`, and given an option with strike price `strike` and expiry in `calendar_days_remaining` calendar days, I want to know the probability that it will expire in-the-money.
In other words, I need what you see as "probability ITM" in TOS or InteractiveBrokers.
So far I've found no answer for this on the internet, other than this calculator that thankfully works client side, so we can actually see the code (variable names are edited by me to try to make sense of this):
```
price = form.price.value;
strike = form.strike.value;
calendar_years_remaining = calendar_days_remaining/365;
annual_volatility = percent_annual_volatility/100;
vt = annual_volatility*Math.sqrt(calendar_years_remaining);
lnpq = Math.log(strike/price);
d1 = lnpq / vt;
y = Math.floor(1/(1+.2316419*Math.abs(d1))*100000)/100000;
z = Math.floor(.3989423*Math.exp(-((d1*d1)/2))*100000)/100000;
y5 = 1.330274*Math.pow(y,5);
y4 = 1.821256*Math.pow(y,4);
y3 = 1.781478*Math.pow(y,3);
y2 = .356538*Math.pow(y,2);
y1 = .3193815*y;
x = 1-z*(y5-y4+y3-y2+y1);
x = Math.floor(x*100000)/100000;
if (d1<0) {x=1-x};
pabove = Math.floor(x*1000)/10;
pbelow = Math.floor((1-x)*1000)/10;
```
Here we have, in `pabove`, the probability it'll expire above the strike price (and the opposite in `pbelow`).
My question is: why are there hardcoded numbers (`1.330274`, `.3989423`, etc)? What do they represent?
What is the actual formula to compute probability ITM and does it have hardcoded constants like the above script?
## Answer by AlRacoon (score 4, accepted)
https://quant.stackexchange.com/a/43441
The formula with the hard coded constants is a polynomial approximation for the cumulative normal distribution function. This can be found in Abromowitz and Stegun, Handbook of Mathematical Functions, 1972. It is also used in Hull's Options, Futures, and Other Derivatives.
If you have the 4th edition of Hull, the forumulas for this approximation is on p.252.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.