|
From: Ferdinando A. <na...@am...> - 2008-01-02 10:15:51
|
On Dec 20, 2007 11:11 PM, Luigi Ballabio <lui...@gm...> wrote: > > Log Message: > > ----------- > > added default parameters > > > > @@ -45,8 +45,8 @@ > > InterestRate(); > > //! Standard constructor > > InterestRate(Rate r, > > - const DayCounter& dc, > > - Compounding comp, > > + const DayCounter& dc = Actual365Fixed(), > > + Compounding comp = Continuous, > > Frequency freq = Annual); > > //@} > > //! \name conversions > > Nando, > somehow I can see that the compounding may default to Continuous, but > why should the day-count convention default to actual/365? Actual/365Fixed is the default DayCounter we use in all TermStructures, in order to minimize the inconsistency risk of using different DayCounters for differerent (vol/yield) TermStructures. In few places InterestRate is used to define a FlatForward and its DayCounter is used as the YieldTermStructure's DayCounter, so I default it to Actual365Fixed. Besides this is the usual assumption in the textbook examples (e.g. Hull), where you would want 5 years to be 5.0 (and for this reason ActualActual::ISDA would be even better...) Actually any strictly monotone DayCounter (Actual360, Actual/365Fixed, ActualActual::ISDA) would be ok as default DayCounter for TermStructures. It's quite a while that I've been considering to define the default DayCounter in userconfig.hpp (and switch to ActualActual::ISDA in the meantime): any objection if I do it? ciao -- Nando |