xavier g ueit, romain r ousseau 3 rd year student project @ ensae 2011/2012

10
Xavier GUEIT, Romain ROUSSEAU C++ HULL – WHITE PRICER 3 rd year student project @ ENSAE 2011/2012

Upload: elwin-watkins

Post on 29-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

C++ HULL – WHITE PRICER3rd year student project @ ENSAE 2011/2012

Page 2: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Model

EDS :

Page 3: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Background

Banks need : Parcimony3-params is already a lot to interpret

Flexibilitymodel should be able to produce the ≠ historical curve

shapes(+ volatility humps, Bermuda squeeze, … )

Tractabilityformulas for bonds & swaps options

Speedcalibration, pricing & risks (semi-) explicit methods

Page 4: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Class Hierarchy Outline

Page 5: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Implementation details

Everything is computed on the same tree

Page 6: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Nifty Tricks

Root Finder Algorithm will accept :

a Functor a λ-Function a Member Function Pointer

is also templatized on the <x,y> pair type

Page 7: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Code Engineering

SVN Versionning Main Repository : Google Code project Externals for Boost & GTest libraries

Unit Tests Requires a library (static or dynamic) Less helpful for mathematical features TDD very hard in practice

Trade-Of induced by file splitting + : less versioning conflicts + : more efficient build - : increased cost of trial & errors

Page 8: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Failures

The address of an element in a STL Vector is not constant

Time indexes can be tricky ( & an error can have a huge impact if the grid is irregular)

= vs. == was the cause of 3 major bugs !

Page 9: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Possible Extensions

Hull – White parameters : Calibration on a Swaptions market-data Effect on Black implied surfaces ?

Risk computations : Greeks (Δ by buckets, sensitivity to σ

and a) VaR (curve stress-test scenarios

importation) Performance :

Trace expensive calls Cache them ?

Page 10: Xavier G UEIT, Romain R OUSSEAU 3 rd year student project @ ENSAE 2011/2012

Xavie

r G

UEIT

,

Rom

ain

RO

USSEA

U

Bibliography

Interest Rates Theory Brigo, Mercurio (book) Hull, White (1994, 1996a, 1996b articles)

Numerical Implementation Both

http://ramneekhanda.wordpress.com/2011/09/27/hull-white-model-for-interest-rate-derivatives/