Login  Register

Re: [QuantLib-svn] SF.net SVN: quantlib: [13854] trunk/QuantLib/ql/interestrate.hpp

Posted by Ferdinando M. Ametrano-3 on Jan 02, 2008; 10:15am
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-13854-trunk-QuantLib-ql-interestrate-hpp-tp11510p11511.html

On Dec 20, 2007 11:11 PM, Luigi Ballabio <[hidden email]> 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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev