previous up next SYLLABUS  Previous: 4.4 Methods for European  Up: 4.4 Methods for European  Next: 4.4.2 Improved scheme using


4.4.1 Naive implementation using financial variables $ \diamondsuit $


[ SLIDE Derivatives 1st - 2nd || Black-Scholes scheme - code - run || VIDEO modem - LAN - DSL]


Start with a finite number prices $ \{V_j^T\}$ that are all known from the terminal condition $ V_j^T=V(S_j,T)=\Lambda(S_j)$ with a regular sampling of the underlying asset $ S_j=j\Delta S$ . The idea behind the finite difference method is to approximate the infinitesimal changes in the Black-Scholes equation by small (but finite) differences and to generate new prices $ \{V_j^{t-\Delta t}\}$ in a sequence of small steps taken backward in time until the solution is found. It is not difficult to propose approximations of the partial derivatives directly from the definition

\begin{displaymath}\begin{split}\frac{\partial V}{\partial S}(S_j,t) =\lim_{\del...
... S}+\mathcal{O}(\Delta S^2)\qquad \textrm{backward} \end{split}\end{displaymath} (4.4.1#eq.1)


Convince yourself that if you subtract two Taylor expansions around the asset price $ S_j$

$\displaystyle V_{j+1}=V(S_j+\Delta S)= V(S_j)+\Delta S\frac{\partial V}{\partia...
...\frac{1}{2}\Delta S^2\frac{\partial^2 V}{\partial S^2} +\mathcal{O}(\Delta S^3)$ (4.4.1#eq.2)

$\displaystyle V_{j-1}=V(S_j-\Delta S)= V(S_j)-\Delta S\frac{\partial V}{\partia...
...\frac{1}{2}\Delta S^2\frac{\partial^2 V}{\partial S^2} -\mathcal{O}(\Delta S^3)$ (4.4.1#eq.3)


the quadratic terms cancel out, showing that a higher precision in $ \mathcal{O}(\Delta S^2)$ is achieved when using a centered scheme. Precision is however not the only requirement and it turns out that only backward (alt. forward) differences are stable for the approximation of the time derivative when the scheme runs backward (alt. forward). An approximation for the second derivative is obtained by subtracting $ 2V_j$ from the sum of two Taylor expansions above

$\displaystyle \frac{\partial^2 V}{\partial S^2}= \frac{V_{j+1}-2V_j+V_{j-1}}{\Delta S^2}+\mathcal{O}(\Delta S^3)$ (4.4.1#eq.4)


Substituting finite differences for all the partial derivatives in the Black-Scholes equation without dividend (extension considered in exercise 4.07)

$\displaystyle \frac{\partial V}{\partial t} +\frac{1}{2}\sigma^2 S^2\frac{\partial^2 V}{\partial S^2} +rS \frac{\partial V}{\partial S} -rV =0$    


this immediately leads to

$\displaystyle \frac{V_{j}^{t}-V_{j}^{t-\Delta t}}{\Delta t} +\frac{1}{2}\sigma^...
...1}^t}{\Delta S^2} +r(j\Delta S)\frac{V_{j+1}^t-V_{j-1}^t}{2\Delta S} -rV_j^t =0$ (4.4.1#eq.5)


where the time derivative (first term) has been approximated with a difference backward from the time level $ t$ for stability reasons and the price derivative (third term) has been centered on $ S_j=j\Delta S$ for a higher precision. After a few rearrangements, the unknown ``new'' option value at a time level $ t-\Delta t$ are obtained explicitly in terms of the known ``old'' values at time level $ t$

\begin{displaymath}\begin{split}V_{j}^{t-\Delta t} &=V_{j+1}^t\frac{\Delta t}{2}...
...t] &+V_{j-1}^t\frac{\Delta t}{2}(\sigma^2j^2 -rj) \end{split}\end{displaymath} (4.4.1#eq.6)


The value of an option can therefore be approximated before the expiry date, using a sequence of small steps to evolve the solution backward until the chosen time is reached.
To complete the formulation, the solution has to be specified on the domain boundaries $ S_0=0$ and $ S_n=n\Delta S$ ; in the same way as for the terminal conditions, these boundary conditions depend on the type of contract. For example, the underlying price at $ S=0$ doesn't change in the case of log-normal price increments, showing that the value of a put option is certain to be exercised with a payoff equal to the strike price $ K$ . This can be discounted back from the expiry time $ T$ at a rate $ r$ . On the contrary, the put option is increasingly unlikely to be exercised if the underlying asset value moves above the strike price and looses all of its value when $ S\rightarrow \infty$ . The boundary conditions for a put option without dividends (extension in exercise 4.07) are

$\displaystyle V_\mathrm{put}(S,t) = \left\{\begin{array}{ll} K\exp[-r(T-t)] & \...
...qquad S=0 0 & \qquad\textrm{for}\qquad S\rightarrow \infty \end{array}\right.$ (4.4.1#eq.7)


A similar reasoning leads to the boundary conditions for a call option

$\displaystyle V_\mathrm{call}(S,t) = \left\{\begin{array}{ll} 0 & \qquad\textrm...
...\exp[-r(T-t)] & \qquad\textrm{for}\qquad S\rightarrow \infty \end{array}\right.$ (4.4.1#eq.8)


This scheme that has been implemented in the VMARKET class FDSolution.java as
      double timeStep = runData.getParamValue("TimeStep");
      double strike   = runData.getParamValue("StrikePrice");
      double rate     = runData.getParamValue("SpotRate");
      double divid    = runData.getParamValue("Dividend");
      double sigma    = runData.getParamValue("Volatility");
      double sigmaSq  = sigma*sigma;
      for (int j=1; j<n; j++) {                          //Explicit 2 levels
        fp[j]=f[j+1]* 0.5*timeStep*(sigmaSq*j*j + rate*j)
             +f[j  ]*(1.0-timeStep*(sigmaSq*j*j + rate  )) 
             +f[j-1]* 0.5*timeStep*(sigmaSq*j*j - rate*j);
      }                                                  //Boundary condition
      if (isCall)      { fp[0]=0;  fp[n]=n*dx[0] -strike*Math.exp(-rate*time);
      } else if(isPut) { fp[0]=strike*Math.exp(-rate*time);   fp[n]=fp[n-1];
      } else           { fp[0]=fp[1];  fp[n]=fp[n-1]; }
showing clearly how the option values at the new time level fp[j] are explicitly calculated in terms of the old values f[j]. To limit the required size of the simulation domain around the strike price, it is marginally better to replace the Dirichlet condition fp[n]=0 with a Neumann condition fp[n]=fp[n-1]. This is what has been used above for the put option and in the default, so as to accommodate in a simple manner for more general payoffs from binary options. The VMARKET applet below shows an application using this very simple model.
VMARKET applet:  press Start/Stop to calculate the price V(S,t) of a European put option using a naive discretization of the Black-Scholes equation with explicit finite differences up to 6 months before expiry.






Virtual market experiments: naive FD scheme
  1. Switch from Put to Call, SuperShr and VSpread to verify that the same scheme works also for binary options.
  2. Imagine how the solutions would look like if Dirichlet conditions were used instead of Neumann conditions; note that neither converges to the correct value at the boundaries where the mesh is truncated.
  3. Switch back to Put option and try to accelerate the calculation with a slightly larger TimeStep=5E-4. Check how an instability grows for the largest values of the underlying and becomes visible after Time=0.22.
  4. Increase the time step above TimeStep=2.74E-3 and switch between different initial conditions to verify how, for large steps, the instability always appears around the largest value where the initial condition is not zero.



The mere simplicity of this naive formulation makes this explicit finite difference scheme attractive; two major problems, however, should lead you to reconsider an early judgment. First, the regular spacing of the grid is ill suited to accommodate a log-normal distribution of price increments: the relative numerical accuracy in $ \mathcal{O}(\Delta S^2)/S$ rapidly decreases and becomes insufficient when the value of the underlying becomes small. The second problem is the numerical instability, which appears when the solution evolves too rapidly. It turns out that the upper limit on the time step depends on the relative changes that are possible for the largest values of the underlying-even if the option price is negligible there. These drawbacks motivate a transformation to log-normal variables in the same manner as for the analytical solution in section 4.3.1.

SYLLABUS  Previous: 4.4 Methods for European  Up: 4.4 Methods for European  Next: 4.4.2 Improved scheme using