Re: how to get the settlement day?

Posted by Cedrick W. Johnson on
URL: http://quantlib.414.s1.nabble.com/how-to-get-the-settlement-day-tp7873p7874.html

Take a look at the samples, in particular Bonds.cpp:

Calendar calendar = TARGET();

         Date settlementDate(18, September, 2008);
         // must be a business day
         settlementDate = calendar.adjust(settlementDate);

         Integer fixingDays = 3;
         Natural settlementDays = 3;

         Date todaysDate = calendar.advance(settlementDate, -fixingDays, Days);

Also the Calendar class under ql/time/Calendar may be of assistance in specifying local holidays, etc.

HTH,
C



On 12/10/2010 03:53 PM, Le Shi wrote:

>
> Hi guys,
>
> Right now, I have the bond trade date( for example, today ). How could
> I get the bond settlement date? Let’s say settlement days =3.
>
> Does Quantlib has some API to add days depending on business schedule?
>
> Thank you all!
>
>
> ------------------------------------------------------------------------------
> Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
> new data types, scalar functions, improved concurrency, built-in packages,
> OCI, SQL*Plus, data movement tools, best practices and more.
> http://p.sf.net/sfu/oracle-sfdev2dev
>
>
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users