Login  Register

Re: [Quantlib-dev] credit modeling, Issuer, etc.

Posted by Luigi Ballabio on Feb 20, 2009; 5:15pm
URL: http://quantlib.414.s1.nabble.com/credit-modeling-Issuer-etc-tp7165p7167.html

On Fri, 2009-02-20 at 08:30 +0100, Jose Aparicio-Navarro wrote:
> The other subject was the data structure, am I the only one having a problem
> with a one to one reltaion between issuer and recovery?

No, you're not the only one.  The data structure is wrong.

However, I'm not sure that I would commit to a given class interface at
this time.  It would probably take some trials to get it right, and
since I'd like to get release 1.0 out in a few months (and doing so, to
freeze the existing interfaces) I don't think we have the time for that.

Then again, the current Issuer class is wrong and should not go into
release 1.0 either.  What I would do at this time is to remove the class
from the library and pass its components to the methods that were
accepting it.  For instance, instead of

MidPointCdsEngine(const Issuer& issuer,
                  const Handle<YieldTermStructure>& discountCurve);

I would write

MidPointCdsEngine(
    const Handle<DefaultProbabilityTermStructure>& probability,
    Real recoveryRate,
    const Handle<YieldTermStructure>& discountCurve,
    const std::vector<boost::shared_ptr<DefaultEvent> >& events);

which is no longer so wrong---it just assumes that the correct
probability curve and recovery rate were chosen externally.  Once we
experiment a bit and settle on an Issuer design, we can add the old
constructor back without breaking existing code.

Thoughts?

Luigi


--

Every solution breeds new problems.
-- unknown



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users