2.05 European Option

It is really not possible here to give a complete introduction on the broad subject of option pricing. A number of simple explanations can be found on-line in a tutorial by the Chicago Bord of Exchange; for a more thorough description, please consult the syllabus from Lifelong-learners option pricing course.

To complete this excercise, it is in fact sufficient to understand that a European Vanilla put option is a contract giving its owner the right to sell a certain asset (called the underlying) for a fixed price (E the exercise or strike price) at a prescribed time T in the future (the expiry date).

The parameters of the exercise have been chosen for the underlying QQQ index (NASDAQ top 100) quoted on the evening of May 24, 2000 when QQQ was traded as high as S = 79.5 USD (alternatively, you can take the value from today and repeat the exercise with updated values). Imagine you were the owner of a put option giving you the right to sell a QQQ share for E = 95.00 USD on September 1st, 2000: how much this right worth on May 24, 2000, i.e. T = 0.268 year before expiry (alt. take today).

At expiry on September 1st, 2000, it is clear that the value of the put depends only on the price S of the underlying share and is given simply by the payoff function P(S,t = 0) = max(E-S,0) apparent as initial condition in the JBONE applet: the put option is worthless if QQQ is traded above S = 95 USD (an option is a right with no obligation, so that you can simply discard it) and you will earn the price difference if QQQ is traded below (you can buy QQQ shares for e.g. S = 75 USD on the market and sell them for the strike price of E = 95 USD with a net profit of 20 USD per share).

Two factors at least can change the price of this right from May to September:

  1. if you would give your money to a bank, you could earn an interest rate of r = 0.05 on your deposit; you should therefore discount this systematic risk free return from the value of the option during the entire period your money is invested.
  2. The market (and in particular NASDAQ) is volatile. Prices change constantly with what may be modeled as a random component in the price of a share: even if chance are slim, you may still earn money with a put option at 95 USD if QQQ is above 100 USD in August... if the market crashes, making you rich! Clearly, options keep a finite value until they expire depending on volatility. For QQQ, this was s = 0.7155 in May 2000 (alt. follow the corresponding link to obtain a value for today).

The Black & Scholes model takes these factors into account and integrates the payoff function backwards in time to model the price of an option some time before it expires.

Using an explicit 2 levels spatially centered finite difference scheme, the Black-Scholes equation can naively be written as


Vt+Dt = Vt +Dt é
ê
ë
s2( 1
2
jDS)2 Vj+1-2Vj+Vj-1
DS2
+r (jDS) Vj+1-Vj-1
2DS
-r Vj ù
ú
û
= 0
(1)
and cast into


Vt+Dt = Dt
2
(s2j2 +rj) Vj+1 +(1-s2j2Dt +rDt) Vj + Dt
2
(s2j2 -rj) Vj-1
(2)
which has been implemented in JBONE as:

      double E      = runData.getInitialShapePosition(); //Exercise price
      double sigmaSq= diffusCo;                          //Volatility square
      double rate   = velocity;                          //Interest rate

      fp[0]=E*Math.exp(-rate*time);                      //Boundary condition
      for (int i=1; i<n; i++) {
        fp[i]=f[i+1]* 0.5*timeStep*(sigmaSq*i*i +rate*i) //Explicit 2 levels
             +f[i  ]*(1.0-timeStep*(sigmaSq*i*i +rate  )) 
             +f[i-1]* 0.5*timeStep*(sigmaSq*i*i -rate*i);
      }
      fp[n]=fp[n-1]+dx[0]*(fp[n-1]-fp[n-2]);             //Boundary condition

Press the Start/Stop button to start the (slow) integration backward in time. Try then to increase the time step by a factor 2: after only about 40 steps, a numerical instability develops that can be traced down to a violation of the stability criterion s2Dt/Dx2 < 1/2.

The problem with this naive approach is that the random changes in the asset prices dS are in reality lognormally distributed, so that the natural mesh for the a random walk should in fact be equally spaced in logS rather than in S. The time step is therefore limited here by the largest asset price, where the relative mesh intervals DS is smallest.

To avoid instabilities and negative values appearing for large asset prices, it is possible to change from financial (S,t¢) to lognormal variables (x,t) and evolve a standard diffusion equation. An interpolation back to financial variable is in fact required only for diagnostic purposes. This has been implemented in JBONE as:

      double E      = runData.getInitialShapePosition(); //Exercise price
      double sigmaSq= diffusCo;                          //Volatility square
      double rate   = velocity;                          //Interest rate
      double divid  = disperCo;                          //Dividend
      int    j;
      double x0, x1, f0, f1, xi;                         //Change variables
      double tau = 0.5*sigmaSq*time;                     //  f(x,t) ->
      double dtau= 0.5*sigmaSq*timeStep;                 //  fm(xx,tau)
      double xx0 = Math.log(x[1]/E);
      double dxx =(Math.log(x[n]/E)-Math.log(x[1]/E))/(n-1);
      double k1 = 2*rate/sigmaSq; 
      double k2 = 2*(rate-divid)/sigmaSq; 
      double k2m1 = k2-1.;

      //Interpolate from financial (x,t) to lognormal variables (xx,tau)
      if (time <=timeStep) {
        j=1; ; x0=xx0;
        f0=f[1]/E*Math.exp(0.5*k2m1*x0+(0.25*k2m1*k2m1+k1)*tau);
        x1=x0; f1=f0; xi=x0;
        for (int i=1; i<n; i++) { //Loop over lognormal mesh index
          xi=xx0+(i-1)*dxx;
          while (xi>=x1) { j++; x0=x1; f0=f1; x1=Math.log(x[j]/E); }
          f1=f[j]/E*Math.exp(0.5*k2m1*x1+(0.25*k2m1*k2m1+k1)*tau);
          fm[i]= f0 + (xi-x0)*(f1-f0)/(x1-x0);
        }
        fm[n]= fm[n-1] + dxx*(fm[n-1]-fm[n-2]);
      } else { //Retrieve fm[] from previous time step }    
      
 
      //Solve diffusion equation with an explicit 2 levels scheme
      double D = dtau/(dxx*dxx);
      for (int i=2; i<n; i++) 
        f[i]= fm[i] + D*(fm[i+1]-2.*fm[i]+fm[i-1]);
      f[1]= Math.exp(0.5*k2m1*xx0+0.25*k2m1*k2m1*tau); //Boundary cond.
      f[n]= f[n-1] + dxx*(f[n-1]-f[n-2]);
      

      //Interpolate back from lognormal to financial mesh variables
      fp[0]=E*Math.exp(-rate*time);                    //Analytically
      j=1; x0=x[0]; x1=x0; f0=fp[0];
      xi=xx0; f1=f[1]*E/Math.exp(0.5*k2m1*xi+(0.25*k2m1*k2m1+k1)*tau);
      for (int i=1; i<n; i++) { //Loop over financial mesh index
        while (x[i]>=x1) 
          {j++;x0=x1;f0=f1;xi=xx0+(j-1)*dxx;x1=E*Math.exp(xi);}
        f1=f[j]*E/Math.exp(0.5*k2m1*xi+(0.25*k2m1*k2m1+k1)*tau);
        fp[i]= f0 + (x[i]-x0)/(x1-x0)*(f1-f0);
      }
      xi=Math.log(x[n]/E);
      fp[n]=f[n]*E/Math.exp(0.5*k2m1*xi+(0.25*k2m1*k2m1+k1)*tau);

Using lognormal variables, the time step limit is then everywhere the same; the value can therefore be considerably larger and the problem with negative payoffs for large asset prices disappears.

Switch the selector from European naive to European vanilla and set TimeStep = 0.002 to check this approach. You can clearly see the numerical interpolation error induced by changing to lognormal variables after the first step; higher precision can of course be achieved by refining the mesh, but keep in mind that you are still subject to the stability condition.

After these numerical considerations, you are now ready to calculate what was the price of your put option on May 24, 2000 (alt. today).

  1. Edit the value of the
  2. Press Initialize and then Start/Stop for the calculation
  3. Choose Data to java console in the applet top right selector, press Step 1 and go back to Double click to edit below
  4. Open the java console (in NETSCAPE, select Communicator->Tools->Java console)
With an underlying QQQ traded for S = 79.5 USD on the evening of May 24, 2000, a nearest grid point approximation from x[79]=80.23 shows that the price of the put option will be g[79]=14.77 on September 1st, but was much higher f[79]=21.82 because of the so-called time value associated with the market volatility.

This predicted value of 21.82 USD can finally be compared with the market value which was 20.875 on the evening of May 24, 2000 (alt. search for current market price for QQQ options under this link. The agreement is certainly not a bad given the crude approximations made for the input parameters... and remember: the Black-Scholes is only a model of what the market really does!




Press START/STOP to first execute the European naive scheme using financial variables and a time step of 0.0001 (years) at the limit of numerical stability to integrate backward in time. Switch to European vanilla, increasing the time step to 0.002 years to calculate the solution in lognormal variables. To evolve your own scheme instead of the demo, you can temporarily switch Black-Scholes to Exercises and My scheme to Exercise 2.05.


©  Doc Andre Jaun & Lifelong-Learners/pde at 22:24:08, February 02nd, 2003