From: Luigi B. <lui...@gm...> - 2010-12-13 11:02:32
|
On Mon, 2010-12-13 at 05:15 -0500, Johnson, Cedrick W. wrote: > 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); > But in your case, you might want it backwards: Date settlementDate = calendar.advance(tradeDate, settlementDays, Days); or, if you instantiated the bond already, just call bond.settlementDate(tradeDate); Luigi -- Barker's Proof: Proofreading is more effective after publication. |