This page provides a brief description of what's going on under the covers of the Option Risk Calculator.
The option risk calculator models stock price changes using the same assumption made by option pricing models like Black-Scholes: that stock price returns follow a pattern called geometric Brownian motion. In particular, this means that:
Is geometric Brownian motion a good model for stock price movements? This has been debated extensively, and the short answer is: sort of. It does a good job of describing normal day-to-day, month-to-month (and so on) price movement, but not describing large movements - which occur more often than predicted by the model.
Despite its limitations, geometric Brownian motion is the assumption behind option pricing models like Black-Scholes, and behind almost all stock price probability calculators. In addition to working pretty well much of the time, it has some convenient mathematical properties.
So let's look at what happens to a stock price over some period of time. Here are the inputs needed to characterize geometric Brownian motion:
With these inputs, geometric Brownian motion predicts this movement for the log of the return (recall from the above discussion that we're talking about ln(Pricetoday / Priceyesterday)):
That return results in this predicted stock price:
Where random is a normally distributed random number, with a mean of 0 and a standard deviation of 1. Clearly, this does not predict a single price but, on repeated evaluation, it predicts a distribution of prices following the lognormal curve.
What move have we described here, anyway - the daily price change? Weekly? Annual?
Answer: All of them. If you use annual growth rate and volatility, you've described an annual move. If you use daily growth rate and volatility, you've described a daily move. If you apply the daily calculation every day for a year, you get the same distribution of values as applying the annual rate once (this is the convenient mathematical property mentioned above).
That's the core of the theory behind this and other option price calculators. The rest is application of standard statistical techniques. Here, in case you want to try it at home, is what this calculator does under the covers:
Define the normal cumulative density function:
where erf is the standard error function.
Define the following quantities:
To compute the distribution of prices over a particular period of time, define t to be the amount of time, in years, being evaluated. For example, to evaluate a price distribution 47 days in the future, you can define t to be 47/365.25. With t defined, compute the volatility and log(return rate) for the period being evaluated:
Compute the median predicted price, where the lognormal distribution will reach its peak:
From here, we can compute the probability functions of interest. For a particular price Q, compute its distance in standard-deviations from the median:
and use that value to compute the probability functions. The value of the probability density function (the lognormal curve in the risk chart) at that price is:
The cumulative probability density - the probability of finishing at or below the price - is:
So the probability of finishing at or above the price is:
That's all the math behind forecasting price probabilities. The remaining math is in computing the value of the trade at a particular price at a particular time - which is just a matter of computing the value of each position at that price and adding them up. This total is the sum of:
This calculation only makes sense up to the first option expiration, which is why risk charts cannot show trade value or P/L past that point.
That's all the math. That said, here is what the option risk calculator is doing:
DISCLAIMER: This risk calculator is for educational purposes only, and is not intended as a basis for trading decisions. Use at your own risk.