Hi Luigi, Nando,
the methods Cashflows::accruedPeriod(), accruedDays() and accruedAmount() default the settlementDate to Date(), which I guess should mean to take the evaluation date as the settlement date. However this does not work with the methods in Coupon invoked from here. As a result 0.0 is returned always, when no settlement date is specified. I think therefore that if (settlementDate == Date()) settlementDate = Settings::instance().evaluationDate(); should be added to the methods mentioned above. I observe this in 1.1. Regards Peter ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Yes, you're right. Thanks for the heads-up.
Luigi On Mon, Sep 17, 2012 at 10:06 PM, Peter Caspers <[hidden email]> wrote: > Hi Luigi, Nando, > > the methods Cashflows::accruedPeriod(), accruedDays() and accruedAmount() > default the settlementDate to Date(), which I guess should mean to take the > evaluation date as the settlement date. However this does not work with the > methods in Coupon invoked from here. As a result 0.0 is returned always, > when no settlement date is specified. > > I think therefore that > > if (settlementDate == Date()) > settlementDate = Settings::instance().evaluationDate(); > > should be added to the methods mentioned above. I observe this in 1.1. > > Regards > Peter > ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Fixed in subversion.
Thanks, Luigi On Wed, Oct 3, 2012 at 5:11 PM, Luigi Ballabio <[hidden email]> wrote: > Yes, you're right. Thanks for the heads-up. > > Luigi > > On Mon, Sep 17, 2012 at 10:06 PM, Peter Caspers <[hidden email]> wrote: >> Hi Luigi, Nando, >> >> the methods Cashflows::accruedPeriod(), accruedDays() and accruedAmount() >> default the settlementDate to Date(), which I guess should mean to take the >> evaluation date as the settlement date. However this does not work with the >> methods in Coupon invoked from here. As a result 0.0 is returned always, >> when no settlement date is specified. >> >> I think therefore that >> >> if (settlementDate == Date()) >> settlementDate = Settings::instance().evaluationDate(); >> >> should be added to the methods mentioned above. I observe this in 1.1. >> >> Regards >> Peter >> ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |