|
From: Jose Aparicio-N. <ja...@fr...> - 2009-10-05 11:30:41
|
Quoting Luigi Ballabio <lui...@gm...>:
> On Mon, 2009-10-05 at 11:31 +0200, Jose Aparicio-Navarro wrote:
> > Quoting Luigi Ballabio <lui...@gm...>:
> > 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.
>
> Except I'd leave the start date alone and correct the default date
> instead, if possible. No?
>
> Luigi
>
Right, not to mix things. But theres a potential problem with
Probability P = probability_->defaultProbability(
effectiveStartDate, ///<<<<<
endDate);
if "effectiveStartDate" lies before the probability curve reference date (I am
thinking: startAccrual < refProb < refTS < endAccrual). Now negative times come
from the probability TS instead.
We can add :
defaultEffectiveStartPeriod =
effectiveStartDate < refProb ? refProb : effectiveStartDate;
Regards
Pepe
|