Professional Documents
Culture Documents
Contents
1 Review of the Carr-Madan method
1.1 Option Valuation with Carr-Madan method . . . . . . . . . . . . . . . . .
4
4
10
12
14
Introduction
In this paper, we discuss the Carr-Madan method, which is an option pricing method
for European options based on Fast-Fourier transform. In particular, we review the
theoretical aspects of the Carr-Madan method and also reproduce the Carr-Madan results obtained by the numerical experiment performed in [Fang and Oosterlee, 2008]
and [Grzelak and Oosterlee, 2009].
The paper is organized as follow: In Section 1, we review the theoretical aspects of
Carr-Madan method, reproduce the Carr-Madan results presented in Table 1, 2 and 6
of [Fang and Oosterlee, 2008] in section 2, 3 and 4 respectively. In section 5, we perform
a numerical experiment using the Carr-Madan method to price European option under
the H1-HW model.
Note that most of this report refers to [Fang and Oosterlee, 2008], [Carr and Madan,
1999], [Kienitz and Wetterau, 2012], [Ng, 2005] and [Grzelak and Oosterlee, 2009].
eius fT (s) ds
T (u) =
(1)
The initial European call price, C(K, T ), related to the risk neutral density, fT (s),
is then given by:
C(K, T ) = erT EQ [max{ST K, 0}]
= erT EQ [max{esT ek , 0}]
Z
max{esT ek , 0}fT (sT ) dsT
= erT
Z
(2)
Note that the initial European call price, C(ek , T ), is not in L1 for a given maturity
T , since
lim C(K, T ) = lim C(ek , T ) = S0
K0
(3)
for > 0.
(4)
Note that the choice for > 0 is to ensure the existence of the Fourier transform of
c(k, T ) which we will discuss later.
For > 0, we expect c(k, T ) L1 , the space of integrable functions and so therefore
we have that the Fourier transform of c(k, T ) is well-defined and given as:
Z
\
T,call (v) c(k, T ) =
eivk c(k, T ) dk
(5)
Inverting gives
1
c(k, T ) =
2
(6)
Z
e log(K) iv log(K)
=
e
T,call (v) dv
<
(7)
The expression for T,call (v) which is the Fourier transform of c(k, T ) can be written
as follow:
Z
Z
ivk
T,call (v) =
e c(k, T ) dk =
eivk ek C(ek , T ) dk
Z
Z
(iv+)k
rT
(esT ek )fT (sT ) dsT dk
=
e
e
k
Z
Z s T
e(iv+)k (esT ek ) dk dsT
fT (sT )
= erT
Z sT
Z
Z sT
e(iv++1)k dk dsT
fT (sT ) esT
e(iv+)k dk
= erT
Z
h 1
h
isT
i sT
1
fT (sT ) esT
= erT
e(iv+)k
e(iv++1)k
dsT
iv +
iv + + 1
(8)
Since for > 0, we have that
lim |e(iv+)k | = lim |e(iv++1)k | = lim e(+1)k = 0
(9)
fT (sT )
h e(iv+)sT
iv +
rT
e
T (v ( + 1)i)
2
+ v 2 + i(2 + 1)v
e(iv++1)sT i
dsT
iv + + 1
0
where
T,call (v) =
erT T (v ( + 1)i)
.
2 + v 2 + i(2 + 1)v
(10)
(11)
(12)
erT E[ST+1 ]
erT |T (( + 1)i)|
=
2 +
2 +
(13)
(14)
(15)
T,call (0) =
c(k, T ) dk.
(16)
which follows from equation (5). Combining equation (16) with equation (13) completes the proof.
We numerically evaluate the initial European call price value, C(K,T), by approximating the integral in terms of a sum by applying the trapezoidal integration rule. Now,
define g(v) eivk T,call (v), the trapezoidal rule over domain [0, D] then yields
Z
N 1
g(v) dv
0
i
X
h
g(v1 ) + 2
g(vn ) + g(vN )
2
n=2
N
hX
n=1
(17)
i
1
g(vn ) (g(v1 ) + g(vN ))
2
where D is the effective upper limit for the integration which is defined as:
D = N .
Let
vn = (n 1); and ku = b + (u 1).
where n = 1, 2, . . . , N is the grid in the v-domain and u = 1, 2, . . . , N to be the grid
in the k-domain.
Also, we choose the constant b as b = N2 , such that the grid is laid around atthe-money strikes since we are mainly interested in at-the-money option values; which
correspond to k log(K) near 0. Substituting the expression for vn and ku in equation
(17) (recall that g(v) eivk T,call (v)) yields
g(v) dv
0
N
hX
n=1
N
hX
n=1
N
hX
n=1
N
hX
n=1
N
hX
i
1
ei[b+(u1)][(n1)] T,call (vn ) (g(v1 ) + g(vN ))
2
i
1
eib(n1)i(n1)(u1) T,call (vn ) (g(v1 ) + g(vN ))
2
i
1
ei(n1)(u1) eib(n1) T,call (vn ) (g(v1 ) + g(vN ))
2
(18)
i
2
1
ei N (n1)(u1) eibvn T,call (vn ) (g(v1 ) + g(vN ))
2
(n1)(u1)
n=1
i
1
[eibvn T,call (vn )] (g(v1 ) + g(vN ))
2
where the last two equalities of equation (18) hold, since we respectively set
=
2
;
N
and
N = ei N .
Note that equation (18) is written in the form of Fast-Fourier transform (FFT). So,
therefore FFT can be utilized to evaluate the sum given in equation (18), provided that
g(v1 ) = g(vN ) exists. Also, note that the FFT is an efficient algorithm for computing
the sum of the form:
w(k) =
N
X
ei N (j1)(l1) xj ,
for l = 1, 2, . . . , N
(19)
j=1
N
io
eku n hX (n1)(u1) ibvn
1
<
N
[e T,call (vn )] (g(v1 ) + g(vN ))
(20)
n=1
where we have imposed the Nyquist relation to the grid size in the v- and k-domains,
=
2
.
N
Note that to increase the accuracy of the approximation, one can apply the Simpsons
integration rule instead of the trapezoidal integration rule. In similar manner as above,
one can easily show that in the case of Simpsons integration rule we have
C(ku , T )
N
o
eku nX (n1)(u1) ibvn
<
N
[e T,call (vn ) (3 + (1)n n1 ] ,
(21)
n=1
where n1 is the Kronecker delta function that equals one whenever n = 1 and zero
otherwise. The approximation given above for both numerical integration rule can be
computed efficiently using the FFT in Matlab.
Note that we have only discussed the pricing of European call options by the CarrMadan method above. However, one can also obtain the prices of European put options
by the Carr-Madan method by choosing a negative value for . In particular, for the
European put option price, P (K, T ), we consider the modified put option:
p(k, T ) ek P (ek , T ),
for > 0.
(22)
Then the Fourier transform for the modified put option is given as:
T,put (u) =
(23)
0
We consider the following function, which is the probability density function of the
standard normal distribution, given by
1 2
1
f (x) = e 2 x ,
2
(2)
(3)
We recover the density function given above by approximating the integral given in
equation (1) of this section in terms of a sum by applying the trapezoidal integration rule
combined with the FFT algorithm. Note that the effective upper limit for the integration
in this case is D = 20 and we measure the maximum error at x = {5, 4, . . . , 4, 5}.
We use a truncation rang of size [0, 20]
Table 2.1 presents the Carr-Madan results for recovering the density function given
above. Note the all cpu times presented, in (milli)seconds, are determined after averaging the computing times obtained from 100 experiments. The computer used for the
experiments has Intel(R) Core(TM) i5 CPU, M 520 2.40GHz and the code is written in
Matlab R2013b. See Appendix for the Matlab code used for this experiment.
N
Max. error
cpu time (in seconds)
4
0.80222
2.33676e-04
8
7.23068
2.35292e-04
16
0.77663
2.47339e-04
32
3.55850e-05
2.53788e-04
64
8.72502e-06
6.76044e-04
Table 2.1: Cpu time and maximum error when recovering f (x) from (w) by Carr-Madan
method.
Looking at the values presented in Table 2.1, it seems strange that the value for
N = 8 is so high. This may be due to the choice of the truncation range or some mistake
in the code but I havent found any mistake yet in the Matlab code. However, we see
that the maximum error decreases for larger values of N , while the cpu time increases
for larger values of N .
10
The characteristic function of the log-asset price for the GBM is given by:
1
1
GBM (u) = exp iu log(S0 ) + iu(r 2 ) 2 u2 ,
2
2
(1)
where = T t0 = T 0 = T .
The parameters used for this test are:
S0 = 100, r = 0.1, q = 0, T = 0.1, = 0.25.
The reference value corresponding to the three different strike prices are given in
Table 3.1.
Strike Price
80
100
120
Reference Value
20.799226308673340
3.659968453325448
0.044577814073288
Table 3.1: The reference value corresponding to the three different strike prices.
Table 3.2 shows the Carr-Madans results for pricing European calls under GBM
process. Note the all cpu times presented, in (milli)seconds, are determined after averaging the computing times obtained from 100 experiments. The computer used for the
experiments has Intel(R) Core(TM) i5 CPU, M 520 2.40GHz and the code is written in
Matlab R2013b. See Appendix for the Matlab code used for this experiment.
N
max. abs. err.
cpu time (msec.)
16
2.45188e+07
0.287098
32
1.76294e+06
0.280165
64
1.61966e+03
0.292623
128
16.23027
0.330376
256
0.07946
0.892498
Table 3.2: Error convergence and cpu time using the Carr-Madans method for pricing
European calls under GBM for the three different strike prices, namely K =
80, 100 and 120.
As we can see in Table 3.2, the values for the maximum error are matches the result
presented in Table 1 of [Fang and Oosterlee, 2008]. In fact, we see that the maximum
error decreases for larger values of N , while the cpu time increases for larger values of N .
Note that we cannot compare the cpu times presented here in this paper with the ones
obtained in [Fang and Oosterlee, 2008], because different type of computers are used.
11
dxt = (u 21 ut ) dt + ut dW1t ,
(1)
dut = (
u ut ) dt + ut dW2t ,
where xt denotes the log-asset price variable and ut the variance of the asset price
process. Parameters 0, u
0 and 0 are called the speed of mean reversion
, the mean level of variance and the volatility of volatility, respectively. Furthermore,
the Brownian motions, W1t and W2t , are assumed to be correlated with correlation
coefficient .
The characteristic function of the log-asset price for the Heston model is given by:
u h 1 eD i
0
(
iw
D)
2 1 GeD
h
1 GeD i
u
exp 2 ( iw D) 2 log
1G
where = T t0 = T 0 = T ,
p
D = ( iw)2 + (w2 + iw) 2 ,
G=
iw D
iw + D.
(2)
(3)
(4)
12
Reference Value
50.070539139723508
45.124108541464899
40.208801172304959
35.338694824309748
30.533286991857107
25.819775170846526
21.236638756022217
16.839368487397689
12.709531760206342
8.967794306297670
5.785155450240623
Strike Price
105
110
115
120
125
130
135
140
145
150
Reference Value
3.359201922125749
1.787135060623922
0.921148309770783
0.482828092902555
0.262123561233131
0.147593635853726
0.085878404410413
0.051414849791787
0.031553214380537
0.019788382151668
Table 4.1: The reference value corresponding to the 21 consecutive strike prices, namely
K = 50, 55, 60, . . . , 150 with maturity T = 1. Note that the reference value
are obtained by the Carr-Madan method using N = 217 points with truncated
Fourier domain set to [0, 1200]
Table 4.2 shows the Carr-Madans results for pricing European calls under Heston
model. Note the all cpu times presented, in (milli)seconds, are determined after averaging the computing times obtained from 100 experiments. The computer used for the
experiments has Intel(R) Core(TM) i5 CPU, M 520 2.40GHz and the code is written in
Matlab R2013b. See Appendix for the Matlab code used for this experiment.
N
max. abs. err.
cpu time (msec.)
512
2.70962e+05
0.92095
1024
4.96950e+02
1.62337
2048
0.56432
4.03544
4096
0.01071
4.32354
8192
3.44565e-06
8.07884
Table 4.2: Error convergence and cpu time using the Carr-Madans method for pricing
European calls under Heston model for 21 consecutive strike prices, namely
K = 50, 55, 60, . . . , 150 with maturity T = 1.
As we can see in Table 4.2, the values for the maximum error are different from the
result presented in Table 1 of [Fang and Oosterlee, 2008]. This may be due to the way
the maximum error is computed. In this paper, the maximum error is computed by
subtracting the computed European call option value with Carr-Madan method for the
21 consecutive strike prices from their corresponding reference values shown in Table
4.1. Nonetheless, we see that the maximum error decreases for larger values of N , while
the cpu time increases for larger values of N . Note that we cannot compare the cpu
times presented here in this paper with the ones obtained in [Fang and Oosterlee, 2008],
because different type of computers are used.
13
S0 > 0;
dSt = rt St dt + t St dWtx ,
dt = (
t ) dt + t dWt , 0 > 0;
(1)
r
drt = (t rt ) dt + dWt ,
r0 > 0;
with
(2)
where > 0 determines the speed of adjustment of the volatility towards its theoretical mean,
> 0, > 0 determines the speed of mean reversion for the interest rate
process, t is the interest rate term-structure, controls the volatility of the interest rate
and
> 0 and > 0 is the second-order volatility, i.e. the variance of the volatility.
Furthermore, the reformulated Heston Hull-White hybrid model
the system of SDEs given by:
dt = (
t ) dt + t dWt ,
drt = (t rt ) dt + dWtr ,
with
dWt dWtr = 0;
(H1-HW) follows
S0 > 0;
0 > 0;
r0 > 0;
(3)
(4)
14
t x,r E( t )
2 = 2x, + 2x,r ;
x,
= x, x, ;
(5)
where
2 (1 et )(
et
+ 20 ) 12
E( t )
:= (t)
(1 et ) + 0 et
8
(
et
+ 0 )
(6)
E( t ) a + bect
where the values a, b and c are estimated by:
q
2
a=
8
,
b = 0 a,
(7)
(8)
The characteristic function for the H1-HW model is given in Lemma 3.4 of the
paper, [Grzelak and Oosterlee, 2009].
We now use the Carr-Madan method to price European options under H1-HW model
for 21 consecutive strike prices, namely K = 50, 55, 60, . . . , 150 with maturity T = 1.
We assume for this experiment that the damping factor, , in the Carr-Madans method
to be = 0.75 as in [Fang and Oosterlee, 2008]. Note that the results for these strike
prices are obtained in one single numerical experiment and also we use a truncation rang
of size [0, 1200]. Moreover, the reference values are obtained by the Carr-Madan method
using N = 217 points with truncated Fourier domain set to [0, 1200].
The parameters used for this test are:
S0 = 100, r = 0, q = 0, T = 1, = 1.5768;
= 0.0398; = 0.3;
= 0.05; r0 = = 0; = 0.05; x,r = 0.6; x, = 0.7; 0 = 0.0175;
Note for the H1-HW parameters given above that the Feller condition, i.e., 2
> 2,
is satisfied.
Table 5.1 shows the Carr-Madans results for pricing European calls under H1-HW
model. Note the all cpu times presented, in (milli)seconds, are determined after averaging the computing times obtained from 100 experiments. The computer used for the
15
experiments has Intel(R) Core(TM) i5 CPU, M 520 2.40GHz and the code is written in
Matlab R2013b. See Appendix for the Matlab code used for this experiment.
N
max. abs. err.
cpu time (msec.)
512
2.57660e+05
1.66956
1024
4.66523e+02
2.57719
2048
0.56432
4.54578
4096
0.01071
6.08057
8192
3.44565e-06
11.44484
Table 5.1: Error convergence and cpu time using the Carr-Madans method for pricing
European calls under H1-HW model for 21 consecutive strike prices, namely
K = 50, 55, 60, . . . , 150 with maturity T = 1.
As we can see in Table 5.1, the values for the maximum error are relatively the same
as the result presented in Table 4.2 of this paper. We compute the maximum error in
the same way as in section 4. Furthermore, we see that the maximum error decreases
for larger values of N , while the cpu time increases for larger values of N . Moreover,
we see that the cpu times for the H1-HW model are larger than the cpu times for the
Heston model.
16
Appendix
Matlab Implementations.
u = [0:1:fft_N-1]*fft_nu;
17
lnS = log(S);
alpha = 0.75;
v1 = [0:1:fft_N-1]*fft_nu;
v2 = (v1 - 1i*(alpha + 1));
v = v2;
% Damping factor
% grid point of psi-domain
% shifted grid point of psi-domain
18
v1 = [0:1:fft_N-1]*fft_nu;
v2 = (v1 - 1i*(alpha + 1));
v = v2;
19
else
disp(Feller Condition is not satisfied. Try again with valid values)
end
% The real matlab code used for reproducing the Carr-Madan results
format long
clc;
clear all;
close all;
clf;
% start stopwatch
20
% increase runtime
end
integral_fft;
max_error_normal;
runTime_normal_s = runTime_normal/N_timemeasure_normal
runTime_normal_ms = 1000*runTime_normal_s;
end
max_error_normal
21
fft_N = [2.^[8:-1:4]];
fft_nu = uplim./fft_N;
% start stopwatch
% increase runtime
end
max_error_gbm;
runTime_gbm_s = runTime_gbm/N_timemeasure_gbm;
runTime_gbm_ms = 1000*runTime_gbm_s
end
max_error_gbm
figure(2)
plot(Strike,Call_gbm,r,Strike,call_price_fft_gbm,b*)
xlabel(Strike)
ylabel(Call option price)
22
23
runTime_heston = 0;
N_timemeasure_heston = 100;
% start stopwatch
% Call option price with Carr-Madan method for the Heston model
[call_price_fft_heston] = CarrMadanFFT(phi_heston1,fft_nu(i),fft_N(i),Strike,tau,
% Error Convergence under Heston model
error_heston = abs(call_price_fft_heston - 5.785155450240623);
error_heston = abs(call_price_fft_heston - call_price_fft_ref);
max_error_heston(i) = max(error_heston);
% increase runtime
end
max_error_heston;
runTime_heston_s = runTime_heston/N_timemeasure_heston;
runTime_heston_ms = 1000*runTime_heston_s
end
max_error_heston
figure(3)
plot(Strike,call_price_fft_ref,r,Strike,call_price_fft_heston,b*)
xlabel(Strike)
ylabel(Call option price)
24
Results_heston;
% start stopwatch
25
% increase runtime
end
max_error_h1hw
% calculate average runtime in seconds
runTime_h1hw_s = runTime_h1hw/N_timemeasure_h1hw;
% calculate average runtime in milliseconds
runTime_h1hw_ms = 1000*runTime_h1hw_s
figure(4)
plot(Strike,call_price_fft_ref,r,Strike,call_price_fft_h1hw,b*)
xlabel(Strike)
ylabel(Call option price)
26
References
[Carr and Madan, 1999] Carr, P. and Madan, D. B. (1999). Option Valuation Using the
Fast Fourier Transform. J. Comp. Finance, 2:6173.
[Fang and Oosterlee, 2008] Fang, F. and Oosterlee, C. (2008). A Novel Pricing Method
For European Options Based on Fourier-Cosine Series Expansions.
[Grzelak and Oosterlee, 2009] Grzelak, L. A. and Oosterlee, C. W. (2009). On The
Heston Model with Stochastic Interest Rates.
[Kienitz and Wetterau, 2012] Kienitz, J. and Wetterau, D. (2012). Financial Modelling:
Theory, Implementation and Practice. Wiley Finance.
[Ng, 2005] Ng, M. (2005). Option Pricing via the FFT and its Application to Calibration.
27