File Exchange

image thumbnail


version (42.6 KB) by Kienitz Wetterau FinModelling
Carr-Madan and Lewis pricing methods using FFT for many advanced financial models


Updated 07 May 2012

View License

This is material from the book
Financial Modelling: Theory, Implementation and Practice with Matlab source from Joerg Kienitz and Daniel Wetterau, WILEY, September 2012

Pricing Call Options for advanced financial models using FFT and the Carr-Madan or the Lewis Method. We cover:

Bachelier, Black-Scholes, CEV, Displaced Diffusion, Hull-White

Stochastic Volatility:
Heston, SABR, Displaced Diffusion Heston, Heston-Hull-White

Merton, Bates, Bates-Hull-White

Variance Gamma, Normal Inverse Gaussian

Levy+Stochastic Volatility:
Gamma Ornstein-Uhlenbeck and CIR clock

Cite As

Kienitz Wetterau FinModelling (2021). FinancialModelling_Ch2_ImpliedVolatility (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)


Also, The Carr and Madan approach used another formula for pricing out-of-the-money call (indeed the formula for ITM call options is based on the intrinsic value and therefore does not apply to OTM call options).

Why do we not consider another formula for OTM options?



I am trying to use your codes and price the same option with both HestonHullWhite characteristic function and hhw characteristic function.

I want to match both prices. For this reason, I set the correlation rho13 equal to zero in the hhw characteristic function.

But how do I get r0 so that the prices match? I tried from the ircurve but did not succeed... Some help?


Amazing book and code Sirs. Thank-you.

Just one issue: one running >> TestScriptVolSmileHeston
This error pops up:
Maximum variable size allowed by the program is exceeded.

Error in CallPricingFFT (line 53)
uvec = 1:FFT_N;

Error in TestScriptVolSmileHeston (line 52)
FFTopt(j,:) = CallPricingFFT('Heston',S,K,T(j),r,d,vInst,vLong,kappa,omega,rho);

Why is it?

Best Regards

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!