Implementation - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

The implementation of digital option pricing engine is very similar to the barrier option pricing engine. It also uses the Brownian Bridge to correct the hitting error. Here, the exercise of digital option could be at the expiry time or any time between the expiry time and the 0 time, which is configured the by exEarly input arguments. When argument exEarly is false, the fixed cash is paid at the expiry time and it is discounted to time zero for the value of option. Otherwise, once the maximum or the minimum of the asset price hits the strike value, the fixed cash is paid and it is discounted to time 0 for the value of option.

In the following, we will take put digital option as an example to elaborate. Let \(T\) be the maturity time of option. The maturity time \(T\) is discretized by time steps \(N\). The strike value is \(K\). \(C\) is the fixed cash which paid when option is in the money.

The detailed procedure of Monte Carlo Simulation is as follows:

  1. For \(i\) = 1 to \(M\)
  • For \(j\) = 1 to \(N\)
    • generate a normal random number and uniform random number \(u\);
    • simulate the price of asset \(S^i_j\);
    • simulate the maximum price of asset \(M\) during time interval \([t_{j-1}, t_j]\).
\[x = \ln \frac {S^i_j}{S^i_{j-1}}\]
\[y = \frac {x - \sqrt {(x^2 - 2\sigma^2 \Delta t\log u)}} {2}\]
\[M = S^i_j\exp (y)\]
  1. Calculate the payoff and discount it to time 0 for option price \(P_i\). if \(M > K\),
\[P_i = C\exp (-rt_j), exEarly = true\]
\[P_i = C\exp (-rT), exEarly = false\]

or if \(M\) for all time interval never cross strike,

\[P_i = 0\]

So, the estimated value of option is the average of all the samples.

\[c = \frac{1}{M}\sum_{i=1}^{M} P_i\]