Skip to content

Testing BS option pricing models

Notifications You must be signed in to change notification settings

SaraPeyko/EuropeanOptionPricing

Repository files navigation

Black-Scholes option pricing model

The program illustrates the exact formula for plain (European) equity options with zero dividends and their sensitivities. These options can be exercised at the expiry time only.

Mathematical and financial background

The formula apply to option pricing on a range of underlying securities, but this program focuses on stocks.

The generalized Black-Scholes formula to calculate the price of a call option on some underlying asset, the call price is a function:

Capture1

The exeact formula for call option C is given by:

Capture2

The exact formula for put option P is also given by:

Capture5

where N(x) is the standard cumulative normal distribution function defined by:

Capture3

and

Capture4

The cost-of-carry parameter has specific values depending on the kind of security:

b = r is the Black-Scholes stock option model, use this for the case of stock options.

The differentiate of C and P with respect of the parameters produce a formula for the option sensitivities.

There is a relationship between the price of a European call option and European put option when they have the same strike price K and maturity T. This is called Put-Call parity and is given by the formula:

Capture6

  • Option Sensitivities, aka the Greeks

Option sensitivities are the partial derivatives of the Black-Scholes option pricing formula with respect of its parameters. Being a partial derivative, a given greek quantity is a measure of the sensitivity of the option price to a small change in the formula's parameter.

There are exact formula for the greeks:

Capture7

  • Divided differences to approximate option sensitivities

In some cases, an exact formula may not exist (or is difficult to find), which applies to numerical methods. In which case, it can approximate first and second-order derivatives in S by 3-point second order approximations:

Capture8

where h is small (various values of h produce better approximations)

Perpetual American Options

An American option is a contract that can be execised at any time prior to T. There is no known exact solution to price an American option but there is one exception, Perpetual American Options.

The perpetual price is the time-homogeneous price and is the same as the normal price when the expiry price T tends to infinity. The formula are:

Capture1

for call options and

Capture2

for put options

Requirements

  • Environment: Visual Studio 2019

  • Configuration: x64-Debug

  • C++ library: STL and Boost 17.5.0