next up previous contents index
Next: Bond Algoritms. Up: Foreign Currency Algoritms Previous: Foreign Currency Algoritms   Contents   Index

Subsections


Foreign Currency Options


European options.

To value european options, all that is necessary is a slight adjustment of the Black-Scholes equation to adjust for the interest-rate differential.

\begin{displaymath}c = S e^{-r_f(T-t)} N(d_1) - X e^{-r(T-t)} N(d_2) \end{displaymath}


\begin{displaymath}p = X e^{-r(T-t)} N(-d_2) - S e^{-r_f(T-t)} N(-d_1) \end{displaymath}

where

\begin{displaymath}d_1 =\frac{\log\left(\frac{S}{X}\right)
+ \left(r-r_f+\frac{1}{2}\sigma^2\right)(T-t)}
{\sigma\sqrt{T-t}}
\end{displaymath}


\begin{displaymath}d_2 = d_1 - \sigma\sqrt{T-t} \end{displaymath}

Computer Algoritm, European Currency Option



// file currency_opt_euro_call.cc
// author:  Bernt A Oedegaard

#include <cmath>
#include "normdist.h"      // define the normal distribution function

double currency_option_price_call_european( double S,      // exchange_rate,
					   double X,      // exercise,
					   double r,      // r_domestic,
					   double r_f,    // r_foreign,
					   double sigma,  // volatility,
					   double time)   // time to maturity
{
    double sigma_sqr = sigma*sigma;
    double time_sqrt = sqrt(time);
    double d1 = (log(S/X) + (r-r_f+ (0.5*sigma_sqr)) * time)/(sigma*time_sqrt);
    double d2 = d1 - sigma * time_sqrt;
    return S * exp(-r_f*time) * N(d1) - X * exp(-r*time) * N(d2);
};


References.

The original formulations of European foreign currency option prices are in Garman and Kohlhagen (1983) and Grabbe (1983).

See (Hull, 1993, Ch 11.3) for a textbook treatment.


American options.

For American options, the usual method is approximation using binomial trees, checking for early exercise due to the interest rate differential.

Computer Algoritm, Binomial Currency Option



// file currency_opt_bin_call.cc
// author: Bernt A Oedegaard

#include <cmath>
#include <algorithm>
#include <vector>

double currency_option_price_call_american_binomial(
    double S, double X, double r, double r_f, double sigma, 
    double time, int no_steps) {
    vector<double> exchange_rates(no_steps+1);
    vector<double> call_values(no_steps+1);
    double t_delta= time/no_steps;
    double Rinv = exp(-r*(t_delta));
    double u = exp(sigma*sqrt(t_delta));
    double d = 1.0/u;
    double uu= u*u;
    double pUp   = (exp((r-r_f)*t_delta)-d)/(u-d); // adjust for foreign int.rate 
    double pDown = 1.0 - pUp;
    exchange_rates[0] = S*pow(d, no_steps);
    int i;
    for (i=1; i<=no_steps; ++i) {
	exchange_rates[i] = uu*exchange_rates[i-1]; // terminal tree nodes
    }
    for (i=0; i<=no_steps; ++i) call_values[i] = max(0.0, (exchange_rates[i]-X));
    for (int step=no_steps-1; step>=0; --step) {
	for (i=0; i<=step; ++i)   {
	    exchange_rates[i] = d*exchange_rates[i+1];
	    call_values[i] = (pDown*call_values[i]+pUp*call_values[i+1])*Rinv;
	    call_values[i] = max(call_values[i], exchange_rates[i]-X); // check for exercise
	};
    };
    return call_values[0];
};



next up previous contents index
Next: Bond Algoritms. Up: Foreign Currency Algoritms Previous: Foreign Currency Algoritms   Contents   Index
Bernt Arne Odegaard
1999-09-09