Template based Hull White model

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

Template based Hull White model

sebastian-106
Hi,

I coded a Hull White model in the QuantLib framework which I would like to contribute to the experimental folder. I am aware that there is already a Hull White model in QuantLib. Nevertheless I think it is not duplicate work.

The key feature of my approach is that the model is completely template based. That is also the reason why (unfortunately) I can not inherit from the existing model classes. The reason for the template approach is that I intent to apply Automatic Differentiation tools (see e.g. www.autodiff.org) to evaluate derivatives (i.e. Greeks), in particular w.r.t. the volatility (Bermudan Vegas).

The model features replication of the observed yield curve (of course), constant mean reversion, and piece-wise constant short rate volatility. It allows the evaluation of and calibration to European bond options. Moreover, it allows to price Bermudan bond options by successive (numerical) evaluation of the expected payoff (and discounting). It is not intended to price these derivatives on a tree because the model allows more accurate (semi-) analytical expressions.

In addition to the (template based) model class I coded a bond option instrument and a pricing engine which manages the calibration of the model to coterminal European swaptions (which is to my knowledge the market standard calibration approach). The Excel interface is configured and an example workbook demonstrates the approach.

I would like to know if I should simply submit a patch and/or if you would like to discuss the approach first in the mailing list.

I would appreciate any comments.

Sebastian
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Template based Hull White model

Luigi Ballabio
On Tue, 2010-12-28 at 14:05 +0000, [hidden email] wrote:
> I coded a Hull White model in the QuantLib framework which I would
> like to contribute to the experimental folder. I am aware that there
> is already a Hull White model in QuantLib. Nevertheless I think it is
> not duplicate work. [...] I would like to know if I should simply
> submit a patch and/or if you would like to discuss the approach first
> in the mailing list.

Hi Sebastian,
        I guess any discussion would require seeing the code anyway, so please
go ahead and submit the patch.

Thanks,
        Luigi


--

A little inaccuracy sometimes saves tons of explanation.
-- H.H. Munro, "Saki"



------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Template based Hull White model

sebastian-106

Hi Luigi,

thanks for your response. I just submitted a patch and an example XL workbook.

Please let me know if you have any questions or remarks.

Sebastian


On Jan 7, 2011, Luigi Ballabio <[hidden email]> wrote:

On Tue, 2010-12-28 at 14:05 +0000, [hidden email] wrote:
> I coded a Hull White model in the QuantLib framework which I would
> like to contribute to the experimental folder. I am aware that there
> is already a Hull White model in QuantLib. Nevertheless I think it is
> not duplicate work. [...] I would like to know if I should simply
> submit a patch and/or if you would like to discuss the approach first
> in the mailing list.

Hi Sebastian,
I guess any discussion would require seeing the code anyway, so please
go ahead and submit the patch.

Thanks,
Luigi


--

A little inaccuracy sometimes saves tons of explanation.
-- H.H. Munro, "Saki"



------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Template based Hull White model

Arthur Pham
Hi Sebastian,

I have some trouble to compile this.
Did you svn add everything ? Seems that i miss some files in QuantLib\ql\experimental\templatehullwhite after I apply the patch.

 I've personally used automatic differentiation for conjugate gradient minization and also for certain greeks calculations (with closed formed formula for the premium). It looks much better than the classic "finite difference" calculation for greeks.

Cheers,

Arthur PHAM
On Mon, Jan 10, 2011 at 6:40 AM, Sebastian Schlenkrich <[hidden email]> wrote:

Hi Luigi,

thanks for your response. I just submitted a patch and an example XL workbook.

Please let me know if you have any questions or remarks.

Sebastian


On Jan 7, 2011, Luigi Ballabio <[hidden email]> wrote:

On Tue, 2010-12-28 at 14:05 +0000, [hidden email] wrote:
> I coded a Hull White model in the QuantLib framework which I would
> like to contribute to the experimental folder. I am aware that there
> is already a Hull White model in QuantLib. Nevertheless I think it is
> not duplicate work. [...] I would like to know if I should simply
> submit a patch and/or if you would like to discuss the approach first
> in the mailing list.

Hi Sebastian,
I guess any discussion would require seeing the code anyway, so please
go ahead and submit the patch.

Thanks,
Luigi


--

A little inaccuracy sometimes saves tons of explanation.
-- H.H. Munro, "Saki"



------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Template based Hull White model

sebastian-106
Hi Arthur,

thank you for your comment. Indeed the patch file was not complete. Sorry for that.
I just submitted a revised patch file. In case my SVN tool again misses something I
also added the source files I added/modified.

Unfortunately I had some trouble with the patch tool. Therefore I added a duplicate
item instead of a new attachment.

Meanwhile I also coded an AD enabled HW model. Since I use an unpublished tool
by a collegue I can not submit the complete code. However I added my QL files to
the ZIP (NOT in the diff-patch). This illustrates how Automatic Differentiation may
work in this context in principle. I think it would be easy to adapt it to an open source
AD tool like ADOL-C for example.

Please let me know if you have any comments or problems with the patch.

Sebastian


On Jan 13, 2011, Arthur Pham <[hidden email]> wrote:

Hi Sebastian,
I have some trouble to compile this.Did you svn add everything ? Seems that i miss some files in QuantLib\ql\experimental\templatehullwhite after I apply the patch.

 I've personally used automatic differentiation for conjugate gradient minization and also for certain greeks calculations (with closed formed formula for the premium). It looks much better than the classic "finite difference" calculation for greeks.

Cheers,
Arthur [hidden email]
On Mon, Jan 10, 2011 at 6:40 AM, Sebastian Schlenkrich <[hidden email]> wrote:




Hi Luigi,



thanks for your response. I just submitted a patch and an example XL workbook.



Please let me know if you have any questions or remarks.



Sebastian





On Jan 7, 2011, Luigi Ballabio <[hidden email]> wrote:



On Tue, 2010-12-28 at 14:05 +0000, [hidden email] wrote:

> I coded a Hull White model in the QuantLib framework which I would

> like to contribute to the experimental folder. I am aware that there

> is already a Hull White model in QuantLib. Nevertheless I think it is

> not duplicate work. [...] I would like to know if I should simply

> submit a patch and/or if you would like to discuss the approach first

> in the mailing list.



Hi Sebastian,

I guess any discussion would require seeing the code anyway, so please

go ahead and submit the patch.



Thanks,

Luigi





--



A little inaccuracy sometimes saves tons of explanation.

-- H.H. Munro, "Saki"







------------------------------------------------------------------------------

Gaining the trust of online customers is vital for the success of any company

that requires sensitive data to be transmitted over the Web.   Learn how to

best implement a security strategy that keeps consumers' information secure

and instills the confidence they need to proceed with transactions.

http://p.sf.net/sfu/oracle-sfdevnl

_______________________________________________

QuantLib-dev mailing list

[hidden email]

https://lists.sourceforge.net/lists/listinfo/quantlib-dev




------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev