Formula Sheet

1 Binomial model

1.1 Parameters

1.2 Risk-neutral probabilities

\begin{eqnarray*}&& p_*=\frac{1+r-d}{u-d}\quad\quad q_*=\frac{u-1-r}{u-d}. \end{eqnarray*}

1.3 Price of derived security over one period

\begin{eqnarray*}\mbox{Price}&=& \frac1{1+r}\mathbb E_*\left[\mbox{Payoff}\right]. \end{eqnarray*}

2 Continuous Black-Scholes Model

2.1 Parameters

2.1 Black-Scholes model for the price of underlying security under risk-neutral probability

\begin{eqnarray*} S(t)&=&S_0e^{\left(r-\frac{\sigma^2}2\right)t+\sigma W_t}. \end{eqnarray*}

2.2 Price of derived security

\begin{eqnarray*}\mbox{Price}&=& e^{-rt}\mathbb E_*\left[\mbox{Payoff}\right]. \end{eqnarray*}

2.3 Prices of European call and European put

\begin{eqnarray*}C&=&S_0\Phi\left(d_+\right)-Ke^{-rt}\Phi\left(d_-\right)\\ P&=&Ke^{-rt}\Phi\left(-d_-\right)-S_0\Phi\left(-d_+\right)\\ d_{\pm}&=&\frac{\ln\frac{S_0}K+\left(r\pm\frac{\sigma^2}2\right)t}{\sigma \sqrt t}. \end{eqnarray*}

3 CPP Tables

3.1 Types of variables

In C++ real numbers are of type double, integers are of type long. If you have to declare a variable whose name is pStar and is supposed to be a real number, then you need to write double pStar;

3.2 Conversion

Assume that the variable x is of type double and contains a real number and that y is of type long. If you want to convert the real value from x to integer and store the result in y, then you need to write y=static_cast<long>(x);

3.3 Math and probability functions