(no subject)

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

(no subject)

Niels Nygaard-2
There seems to be an error in the formula for A(t,T) in the hullwhite.cpp file:
 
Real value = B(t,T)*forward - 0.25*temp*temp*B(0.0,2.0*t);
 
As far as I can tell t
he last term: 0.25*temp*temp*B(0.0,2.0*t) should be divided by the speed a, so should be
 
 0.25*temp*temp*B(0.0,2.0*t)/a();
 
and maybe also add some code to guard against dividing by 0;
 
Niels O. Nygaard

------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Giorgio Pazmandi

Hi, there is no error in the formula, the division for a() is already in the B(0, 2*t) term

 

 

Regards

 

Giorgio Pazmandi

 

 

 

From: Niels Nygaard [mailto:[hidden email]]
Sent: lunedì, 20. settembre 2010 03:33
To: [hidden email]
Subject: [Quantlib-users] (no subject)

 

There seems to be an error in the formula for A(t,T) in the hullwhite.cpp file:
 
Real value = B(t,T)*forward - 0.25*temp*temp*B(0.0,2.0*t);
 
As far as I can tell the last term: 0.25*temp*temp*B(0.0,2.0*t) should be divided by the speed a, so should be
 
 0.25*temp*temp*B(0.0,2.0*t)/a();
 
and maybe also add some code to guard against dividing by 0;
 
Niels O. Nygaard


------------------------------------------------------------------------------
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-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users