File Exchange

image thumbnail

CFH Toolbox (Characteristic Function Option Pricing)

version (1.9 MB) by Matthias Held
Implementation of Option Pricing Transform Methods


Updated 12 Aug 2014

View License

The CFH toolbox is a collection of characteristic function transform methods in finance that can be used for example for pricing American/European style options in affine jump diffusion models such as Heston or Pan, risk free bonds or CDS spread pricing in CIR or Vasicek specifications and many other models.

The toolbox is a collection of characteristic function transform methods in finance. It combines the seminal approach of Affine-Jump-Diffusion (AJD) option pricing of Duffie/Pan/Singleton (2000) with the Fast Fourier Transform methods of Carr/Madan (1999) and Chourdakis (2004).
The thoroughly documented CFH Toolbox...
- allows the user to evaluate all possible AJD processes in terms of their resulting characteristic function and extended characteristic function, call option prices and implied densities. The AJD processes may possess any number of jump components.
- can obtain European call option prices from user supplied characteristic functions.

- can obtain American call and put option prices from user supplied characteristic functions of Lévy processes.

- can obtain spread call and put option prices from user supplied characteristic functions.

- can obtain conditional expectations on any linear combination of state variables for any given characteristic function.

- can compute implied densities from any characteristic function.

- contains a (yet small) collection of commonly encountered characteristic functions.

- contains a (yet small) collection of commonly encountered jump distributions in finance.

- contains a function to compute zero bond prices from AJD dynamics or characteristic functions.

- contains a function to compute the extended transform of DPS2000 and is thus applicable to the pricing of CDS contracts and Asian options.

- contains a GUI for easy application of most components of this toolbox.

After copying all files into a folder, you might want to run 'install.m' or at least add the relevant folder to your list of paths.

This toolbox is still a work in progress, any comment is highly appreciated! Thank you.

- Duffie/Pan/Singleton (2000) Transform Analysis and Asset Pricing for Affine Jump-Diffusions, in: Econometrica 68/6.
- Carr/Madan (1999) Option Pricing and the Fast Fourier Transform, in: Journal of Computational Finance 2/4.
- Chourdakis (2004) Option Pricing using the fractional FFT, in: Journal of Computational Finance, 8/2.

Comments and Ratings (8)

Carme Frau

York Yang

Hi Henry,
thanks. At the moment, you can get sensitivity analysis for your model (first order greeks) from the "cfh" GUI function.

I will add a sensitivity function in an upcoming update, though! thanks for the hint.


Hi Matthias,
thank you for such a great toolbox. I would like to suggest to include a sensitivity analysis function to calculate the greeks.
Thanks again.

Hi Marcel,

the upper range of integration can be specified see, for example,

>> help cf2call

I have embodied a double exponential jump specification, but will update this part some time in the near future as well. Hints are always appreciated.


Great Toolbox



Hi Matthias,

thanks for this very helpful toolbox. I have a few more questions:

Can you manually change numerical accuracy in the evaluation of the characteristic function?

Is it possibel to add a few other jump distributions, e.g. mixture exponential distributions (those can give you more flexibility in modelling the jump densitiy due to more paramters)?

Would it be possible to provide a slightly more detailled explanation of the four examples in the GUI (i.e. BlackScholes, Heston, SVJ, DefaultRisk)?



changed description and file title

added a GUI

added arbitray payoff function capability to cf2spread

added American option for Lévy models;
added spread option pricing for any characteristic function;
various bug fixes;
updated help files

updated readmes

added the extended transform function and its inverse transform, allowing for pricing of Asian options. Updated the jump library. Updated the help files.

Added Kou's model
Added Double exponential jump distribution
Further Debugging

- Added FFT capability to the Conditional Expectation function CF2GABY
- Updated the help files
- Changed the upper integration limits to 200.
- Added a readme

- Introduced the extended transform
- Added bond option pricing to the documentation

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

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor