Lesson 4 of 15
Black-Scholes Formula
Black-Scholes Formula
The Black-Scholes model (1973) gives a closed-form price for European options under the assumption that the stock follows geometric Brownian motion.
Inputs
| Symbol | Meaning |
|---|---|
| S | Current stock price |
| K | Strike price |
| T | Time to expiry (years) |
| r | Risk-free rate (continuously compounded) |
| σ | Volatility (annualized standard deviation of log-returns). Note: in finance, σ denotes volatility/standard deviation — not the sigmoid function used in ML. |
Formula
First compute and :
Then the call and put prices are:
where is the standard normal CDF.
Normal CDF via erfc
Python's math.erfc gives the complementary error function. We can compute:
Example Verification
For S=K=100, T=1, r=0.05, σ=0.2:
- d₁ = (ln(1) + 0.07) / 0.2 = 0.35
- d₂ = 0.35 - 0.2 = 0.15
- C ≈ 10.4506
Python runtime loading...
Loading...
Click "Run" to execute your code.