Skip to content
All library documents

Mapping Black–Scholes Lognormal Parameters to SciPy

Article Quant Q&A · Author: Roman Rdgz

Summary

The document explains how to express a Black–Scholes-style lognormal price distribution using SciPy’s lognormal parameterization. If a price variable is the exponential of a normally distributed variable, the normal variable’s standard deviation corresponds to the lognormal shape parameter. The exponential of the normal mean corresponds to the lognormal scale parameter, while the lognormal location parameter shifts the distribution and is ordinarily left at zero for this construction.

It also gives the mean and variance of a lognormal variable in terms of the underlying normal parameters and describes sampling from the two equivalent representations. This helps prevent confusing a lognormal distribution’s parameters with the mean and standard deviation of the price itself. The discussion is about parameter interpretation and simulation, not a full option-pricing derivation; it does not specify a time horizon or explain how to estimate the normal parameters from market data.

Key ideas

  • A lognormal variable can be represented as the exponential of a normally distributed variable.
  • The normal variable’s standard deviation maps to the lognormal shape parameter in SciPy.
  • The exponential of the normal mean maps to the lognormal scale parameter.
  • A nonzero lognormal location shifts the distribution and is not part of the basic exponential-of-normal construction.

Tags

Full text
# Which value to use as shape parameter for Black-Scholes lognormal distribution?


# Which value to use as shape parameter for Black-Scholes lognormal distribution?












When working with Scipy, lognomal distribution is defined by 3 parameters: the median (loc), the scale (standard deviation or, in our case, the implied volatility) and the shape parameter.

But, which one is the shape parameter used by Black-Scholes to determine option prices?

## Answer by Olaf (score 1, accepted)

https://quant.stackexchange.com/a/24777

This is a good question which I got stuck on as well.

Suppose $X$ is lognormal defined as $X\sim \log \mathcal{N}(\mu, \sigma^2)$. With this notation we mean that if we write $X = e^Z$, then $Z$ follows a normal distribution with mean $\mu$ and variance $\sigma^2$.

The mean and variance of $X$ are then $\mu_X = e^{\mu + \frac{1}{2}\sigma^2}$ and $\sigma_X^2 = (e^{\sigma^2} - 1)e^{2\mu + \sigma^2}$.

For many distributions the location and scale parameters are just the standard mean and variance. This is not the case for the lognormal distribution. You can look up the details somewhere else (everything follows from the definition of the PDF), but what it comes down to is (see also here):

- The lognormal's shape parameters equals the normal's scale parameter (the standard deviation of $Z$: $\sigma_Z$)

- The lognormal's scale parameter equals the normal's exponentiated location parameter ($e^{\mu_Z}$)

- The lognormal's location parameter does not have a counterpart on the normal distribution side. A lognormal distribution with non-zero location parameter cannot be written as the exponential of a normal distribution. The distribution has a lower bound at zero, and with a non-zero location parameter this lower bound is shifted left or right.

TLDR: On to python. Here's two ways of sampling from the lognormal distribution with $\mu_Z = 5$ and $\sigma_Z=.2$, one of which shows how you instantiate the `lognorm` class.

```
from scipy.stats import lognorm, norm
import numpy as np
import matplotlib.pyplot as plt

mu = 5.
stdev = .2

Z = norm(loc=mu, scale=stdev)
X = lognorm(s=stdev, scale=np.exp(mu))
plt.hist(np.exp(Z.rvs(10000)), bins=100)
plt.hist(X.rvs(10000), bins=100)
```

Note that `loc` defaults to zero for $X$.

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.