(no subject)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Simon Ibbotson-2

Hi,

 

I’m investigating the pricing of CVA via the method outlined in Brigo (2009). I’ve looked through QuantLib and can’t find any reference to valuation using Fourier Transforms. I’m sure there must be something – as the Heston model is well represented in QuantLib – but simply can’t see where it would fit.

 

Can anyone advise me of where to look?

 

Thanks.

Simon



This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom

Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above

Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Bojan Nikolic

"Simon Ibbotson" <[hidden email]> writes:

> I'm investigating the pricing of CVA via the method outlined in Brigo
> (2009). I've looked through QuantLib and can't find any reference to
> valuation using Fourier Transforms. I'm sure there must be something -
> as the Heston model is well represented in QuantLib - but simply can't
> see where it would fit.

The Heston model lives in

ql/pricingengines/vanilla/analytichestonengine.hpp

The Fourier integral is evaluated by direct Gauss-Lobatto quadrature.

Best,
Bojan



--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Simon Ibbotson-2
Thanks Bojan,

I was hoping to use Fractional Fourier Transform to perform the integral
(as in Chourdakis '08).
Are there any issues with linking QuantLib to FFTW (perhaps through a
late-time binding to avoid licensing problems)?

Cheers,
Simon

-----Original Message-----
From: Bojan Nikolic [mailto:[hidden email]]
Sent: 29 September 2010 19:33
To: Simon Ibbotson
Cc: [hidden email]
Subject: Re: [Quantlib-dev] (no subject)


"Simon Ibbotson" <[hidden email]> writes:

> I'm investigating the pricing of CVA via the method outlined in Brigo
> (2009). I've looked through QuantLib and can't find any reference to
> valuation using Fourier Transforms. I'm sure there must be something -
> as the Heston model is well represented in QuantLib - but simply can't
> see where it would fit.

The Heston model lives in

ql/pricingengines/vanilla/analytichestonengine.hpp

The Fourier integral is evaluated by direct Gauss-Lobatto quadrature.

Best,
Bojan



--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql



This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.
This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom

Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above

Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Bojan Nikolic

Hi Simon,

"Simon Ibbotson" <[hidden email]> writes:

> I was hoping to use Fractional Fourier Transform to perform the integral
> (as in Chourdakis '08).
> Are there any issues with linking QuantLib to FFTW (perhaps through a
> late-time binding to avoid licensing problems)?

Since FFTW is released publicly under the GPL I believe it would indeed
create a licensing problem. With GPL I think it does not matter if is
statically or dynamically linked, it still requires the whole of the
program to be licensed under GPL.

There is a simple FFT implementation in:

 ql/experimental/math/fastfouriertransform.hpp

That should probably be enough to get you going and than if find that
speed is a big issue you can look to a specialised library.

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Simon Ibbotson-2
Thanks for the tip. I'll use the QL version.

For later notice... I've just checked and the modified BSD licence (QL)
is compatible with the GPL - according to
http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses.



-----Original Message-----
From: Bojan Nikolic [mailto:[hidden email]]
Sent: 30 September 2010 09:59
To: Simon Ibbotson
Cc: [hidden email]
Subject: Re: [Quantlib-dev] (no subject)


Hi Simon,

"Simon Ibbotson" <[hidden email]> writes:

> I was hoping to use Fractional Fourier Transform to perform the
integral
> (as in Chourdakis '08).
> Are there any issues with linking QuantLib to FFTW (perhaps through a
> late-time binding to avoid licensing problems)?

Since FFTW is released publicly under the GPL I believe it would indeed
create a licensing problem. With GPL I think it does not matter if is
statically or dynamically linked, it still requires the whole of the
program to be licensed under GPL.

There is a simple FFT implementation in:

 ql/experimental/math/fastfouriertransform.hpp

That should probably be enough to get you going and than if find that
speed is a big issue you can look to a specialised library.

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql



This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.
This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom

Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above

Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Bojan Nikolic

"Simon Ibbotson" <[hidden email]> writes:

> For later notice... I've just checked and the modified BSD licence (QL)
> is compatible with the GPL - according to
> http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses.

Right, but this compatibility works in one direction only, i.e., the
whole program, if distributed, must be licensed under the GPL:

http://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Luigi Ballabio
In reply to this post by Bojan Nikolic
On Thu, 2010-09-30 at 09:58 +0100, Bojan Nikolic wrote:
> > Are there any issues with linking QuantLib to FFTW (perhaps through a
> > late-time binding to avoid licensing problems)?
>
> Since FFTW is released publicly under the GPL I believe it would indeed
> create a licensing problem. With GPL I think it does not matter if is
> statically or dynamically linked, it still requires the whole of the
> program to be licensed under GPL.

True, but note that GPL only applies to distribution---what happens on
your computer remains on your computer.  What that means is that we
won't be using FFTW directly in QuantLib code, but if the routine
performing the integration is made generic enough that it can take
different FFT implementations, you'll be able to instantiate it with
FFTW in the code you develop. As long as you don't distribute the
resulting program, you'll be ok.

Luigi


--

There are no rules of architecture for a castle in the clouds.
-- Gilbert K. Chesterton



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Simon Ibbotson-2
In reply to this post by Bojan Nikolic
Does anyone know which version of FFT is in QL? Is it the standard
FT(1,1) or another version of the Fourier Transform?

Alternatively, if someone could direct me to a good explanation of the
FFT algorithm - I can work it out for myself...

Thanks,
Simon


-----Original Message-----
From: Bojan Nikolic [mailto:[hidden email]]
Sent: 30 September 2010 09:59
To: Simon Ibbotson
Cc: [hidden email]
Subject: Re: [Quantlib-dev] (no subject)


Hi Simon,

"Simon Ibbotson" <[hidden email]> writes:

> I was hoping to use Fractional Fourier Transform to perform the
integral
> (as in Chourdakis '08).
> Are there any issues with linking QuantLib to FFTW (perhaps through a
> late-time binding to avoid licensing problems)?

Since FFTW is released publicly under the GPL I believe it would indeed
create a licensing problem. With GPL I think it does not matter if is
statically or dynamically linked, it still requires the whole of the
program to be licensed under GPL.

There is a simple FFT implementation in:

 ql/experimental/math/fastfouriertransform.hpp

That should probably be enough to get you going and than if find that
speed is a big issue you can look to a specialised library.

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql



This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.
This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom

Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above

Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev