From: SourceForge.net <no...@so...> - 2007-11-28 10:32:51
|
Bugs item #1656248, was opened at 2007-02-09 17:59 Message generated for change (Comment added) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1656248&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Luigi Ballabio (lballabio) Summary: Error in cashflowvectors if a single cash flow exists Initial Comment: Version: 0.3.14 File: cashflowvectors.cpp Error if a forward starting bond is created and the start date is Saturday and the maturity date is on the following Monday. SCHEDULE only create one cash flow date. Routines ends with an error on row with Date start = schedule.date(0), end = schedule.date(1); My Fix: int indxend = (schedule.size() <= 1) ? 0 : 1; Date start = schedule.date(0), end = schedule.date(indxend); Best regards Thomas Karlström EMAIL: tho...@fr... ---------------------------------------------------------------------- >Comment By: Luigi Ballabio (lballabio) Date: 2007-11-28 11:32 Message: Logged In: YES user_id=75450 Originator: NO The behavior is correct---If only one date is given, an error should be launched as the code does not make assumptions (such as the assumption that the given date is to be used twice.) If you really want the bond to start on a Saturday, you'll probably want to use the Unadjusted convention when you instantiate the schedule. This will keep both dates and allow you to instantiate the bond. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1656248&group_id=12740 |