Posted by
Luigi Ballabio on
Feb 25, 2005; 6:48am
URL: http://quantlib.414.s1.nabble.com/Changes-to-daycount-conventions-in-0-3-8-tp3637p3638.html
On 02/24/05 15:45:50, Daniele De Francesco wrote:
> Hi all,
>
> I am quite stunned by the fact that the daycounting conventions have
> changed in the latest release of QuantLib and I'm trying to understand if
> anything has changed with the actual conventions, QuantLib code, or just
> the naming withing the code.
>
> I see that Act365 has been renamed to Act365Fixed and that you now
> recommend using ActAct(ISDA) instead of Act365 because they are the same.
> Are they the same because they have become the same or have they always
> been the same except in our code? There is a link in the documentation
> that points to a PDF on the ISDA website, but that link is now dead.
> Do you have any other pointers to official documentation so that I can
> clear up my mind?
Daniele,
I guess the original file is no longer provided for free by ISDA;
Nando might still have the copy he used. The closest I found on the ISDA
site was <
http://www.isda.org/publications/pdf/Day-Count-Fracation1999.pdf>
which describes the different act/act conventions. However, it doesn't
mention act/365.
Anyway, as far as the library is concerned, the changes can be summarized
as follows:
- the Act/Act day counters didn't change;
- the Act/365 day counter was renamed to Act/365 (fixed).
"Actual/365" without further qualification doesn't appear in the library
(except for the warning) and doesn't seem to be an official name; in fact,
the latest FpML specification (free, but registration required on
<
http://www.fpml.org>; I'm not sure I can quote it here verbatim) doesn't
include it as a known day counter name. As for me, I use it colloquially to
refer to Act/365 fixed, but ISDA does seem to use it as an abbreviation of
act/act (ISDA); see e.g. the oldish but freely available
<
http://www.fpml.org/spec/2002/wd-fpml-3-0-2002-04-17/html-wd-fpml-3-0-2002-04-17/schemeDefinitions.html#dayCountFractionScheme>.
As for the calculations, they remained as they were:
a) for act/365 fixed, year fraction(d1,d2) = (d2-d1)/365;
e.g., let d1 = Dec. 1st 2004 and d2 = June 1st, 2005;
year fraction = 182/365 = 0.498630
b) for act/act isda, the days inside leap years are divided by 366 instead,
even if the period doesn't include Feb. 29th;
e.g., with d1 and d2 as above,
year fraction = 31/366 + 151/365 = 0.498398
where 31 are the days in 2004 (from Dec. 1st) and 151 are those in 2005
(up to June 1st.)
The bottom line is: if by "Actual/365" you mean the calculation in a),
nothing changed except the fact that you now have to postpone "fixed" when
you name it; if you mean that in b), the library was wrong and is now
correct (provided that you use the correct name "act/act (ISDA)".)
I'll try and clarify the documentation.
Hope this helps,
Luigi
----------------------------------------
Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.