Stochastic volatility and jumps engine

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stochastic volatility and jumps engine

Niels Elken Sønderby
Hi all

I've cleaned up my code for my pricing engine for pricing options in a SVJD
model and made it fit with the QuantLib 0.3.3 release. I think it's pretty
much ready for inclusion in the library. Have a look at
http://www.nielses.dk/quantlib/nesquant

However, as it needs more market parameters than the standard Black-Scholes
model, it doesn't fit with the VanillaOption Instrument, and some other
solution has to be found.

Also in order to make complex numbers work in Visual C++ 6.0, I include the
below code. This obviously belongs in a more central place. Perhaps our
library designer magician Luigi could make a good decision about this.

// ----------------------------

#include <complex>
using std::complex;

// really belongs in quantlib.h
#define QL_IMAG std::imag
#define QL_REAL std::real

// this won't work!
// #define QL_EXP std::exp
// #define QL_LOG std::log
// so we treat complex<double> seperately
#define QL_COMPLEX_EXP std::exp
#define QL_COMPLEX_LOG std::log

// this works, but issues a warning-message (macro redefinition)
// #define QL_SQRT std::sqrt
// #define QL_POW std::pow
// so we make a complex version as well (probably not really needed)
#define QL_COMPLEX_SQRT std::sqrt
#define QL_COMPLEX_POW std::pow

// ----------------------------

Best regards... Niels

--
http://www.nielses.dk/