Posted by
Ferdinando M. Ametrano-3 on
Jan 25, 2011; 12:05pm
URL: http://quantlib.414.s1.nabble.com/Irritated-about-dates-in-DiscountingSwapEngine-tp12035p12036.html
Hi Henner
> So why is the default date in DiscountingSwapEngine
> (*discountCurve_)->referenceDate();
> and not
> Settings::instance().evaluationDate(); ?
because the discount curve reference date is tautologically the
reference date to which all cashflows should be discounted. The usual
usage if for discountCurve_)->referenceDate() >
Settings::instance().evaluationDate(), since you might want to
discount to today or some future date, not to a date into the past
> So every time i run a swap evaluation using the DiscountingSwapEngine,
> the Settings::evaluationDate is totally ignored, since all dates are set to
> the reference date of the discounting curve.
> That leads to really unwanted behavior, if the curve's reference date is
> earlier
> than the Settings::evaluationDate and there are cashflows in between.
> Now even the cashflows placed before Settings::evaluationDate a included
> into the NPV.
mmm... you surely have some good point for this usage, but I must
confess I don't see how the curve's reference date can be earlier than
the Settings::evaluationDate
> If this is not an error, i would appreciate any help getting the full
> constructor of
> DiscountingSwapEngine (discountCurve, includeSettlementDateFlows,
> settlementDate, npvDate)
> to work in SWIG or to evaluate a VanillaSwap without
> using DiscountingSwapEngine.
this is a legitimate request. I'm pretty sure Luigi will oblige to it.
> i would like to thank the people responsible,
> especially Luigi and Ferdinando, for the forum last
> week in London. I enjoyed it.
you're welcome
ciao -- Nando
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev