Login  Register

Re: [Quantlib-dev] Fwd: Re: CreditDefaultSwap throws RuntimeError

Posted by japari on Oct 05, 2009; 9:31am
URL: http://quantlib.414.s1.nabble.com/Fwd-Re-CreditDefaultSwap-throws-RuntimeError-tp8028p8030.html

Quoting Luigi Ballabio <[hidden email]>:

> Before the evaluation date or the default date? If it's the evaluation
> date, I wouldn't add a strict requirement as the engine worked for most
> dates.  If it's the mid-period default date, we can think about it.  Do
> we require it to be after the curve reference, or we adjust it a day or
> two so that it falls on the reference date?
>

Yep, lets make it the TS ref date. Moving this

Date effectiveStartDate =
   (startDate <= today && today <= endDate) ? today : startDate;

into:

Date effectiveStartDate =
    (startDate <= settlementDate && settlementDate <= endDate) ?
        settlementDate : startDate;

works for both cds engines.

There will still be problems if:
 probability_->referenceDate() > discountCurve_->referenceDate()

I havent tested it much though.
Regards
Pepe


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users