Bonds

Posted by simone pilozzi on
URL: http://quantlib.414.s1.nabble.com/Bonds-tp7006.html

Hi all,
I am working on a pricer for a set of bonds with different features.
I would like to start with a shared_ptr to the generic class bond, 
then specify the type (floaters, fixed, callable ...whatever) once it is known.

Ideally the code should look like this

shared_ptr<Bond> GenericBond( new bond(..constructor for bond))

if( strcmp(bondtype.c_cstr(),"FRN")==0)
    {
          GenericBond "is now"  shared_ptr<floatingratebond>


  }

Is that possible?
Thanks in advance




------------------------------------------------------------------------------
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