QuantlibXL: Xibor style rates definition -- day counter name and frequency definition

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

QuantlibXL: Xibor style rates definition -- day counter name and frequency definition

Wilkie Lai
Hi Eric and all,
1.) After defining an Xibor object and retrieving its
name by qlIndexName() I have found that the name
contains a day counter that is different from what has
been specified during object creation.  It seems to
suggest the object is actually making use of a
different day count and can cause problem later on in
calculation.  After further investigation the problem
seems to be limited in scope to the following day
count type:
* 360/360 -> shown as 30/360
* ACT/365 -> shown as ACT/ACT (ISDA)
Is it just a displayed problem?  Is there any function
which can actually retrieve the day count setting?
On a separate note, I am wondering if the ACT/ACT here
is the same as ACT/nACT which is used in US
Treasuries. Anyone can confirm that?

2.) I have found that qlFrequency() also cannot
display any frequency shorter than 1 month.  Again is
this just a display problem, or the object is not
defaulting the refix frequency to be same as the
tenor?  If it's the latter case than how can rate like
Overnight Index (as in OIS) can be handled?

Wilkie Lai

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] QuantlibXL: Xibor style rates definition -- day counter name and frequency definition

eric ehlers
Hi Wilkie,

On 9/3/06, Wilkie Lai <[hidden email]> wrote:

> Hi Eric and all,
> 1.) After defining an Xibor object and retrieving its
> name by qlIndexName() I have found that the name
> contains a day counter that is different from what has
> been specified during object creation.  It seems to
> suggest the object is actually making use of a
> different day count and can cause problem later on in
> calculation.  After further investigation the problem
> seems to be limited in scope to the following day
> count type:
> * 360/360 -> shown as 30/360
> * ACT/365 -> shown as ACT/ACT (ISDA)
> Is it just a displayed problem?  Is there any function
> which can actually retrieve the day count setting?

This is a display problem, you can see it more directly with
=qlDayCounterName("Actual/360")
which returns "act/360"

Perhaps we need some mechanism whereby the day counter returns the
same string used to create it e.g.
=qlDayCounterName("Actual/360")  ->  "Actual/360"
=qlDayCounterName("Act/360")  ->  "Act/360"

Regarding the two cases you mentioned, please see

http://www.quantlibaddin.org/auto/enums.html

Note for example that the following strings

30/360
30/360BondBasis
360/360
Thirty360::EurobondBasis

Are synonymous and all point to the same underlying object.

> On a separate note, I am wondering if the ACT/ACT here
> is the same as ACT/nACT which is used in US
> Treasuries. Anyone can confirm that?

I don't know, I can't find a reference anywhere to "ACT/nACT".  Here
is the documentation for QL's implementation of ACT/ACT including a
pointer to the source documentation:

http://quantlib.org/reference/class_quant_lib_1_1_actual_actual.html

> 2.) I have found that qlFrequency() also cannot
> display any frequency shorter than 1 month.  Again is
> this just a display problem, or the object is not
> defaulting the refix frequency to be same as the
> tenor?  If it's the latter case than how can rate like
> Overnight Index (as in OIS) can be handled?

At first glance this appears to me to be a display problem, a glitch
in the underlying code (QuantLib::Xibor::frequency) - the method
returns "undefined frequency" for frequencies shorter than one month,
even when the Xibor object contains a perfectly valid tenor of, say,
1W.

Regards,
Eric


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] QuantlibXL: Xibor style rates definition -- day counter name and frequency definition

Ferdinando M. Ametrano-3
> > * 360/360 -> shown as 30/360
> > * ACT/365 -> shown as ACT/ACT (ISDA)

this is correct, as per ISDA definitions. I.e. Act/365 is the same as
ACT/ACT. You might be interested to knoe that "Act/365 (Fixed)" is the
daycounter to use if you want a denominator always equal to 365.
Similar argument for 360/360.

> =qlDayCounterName("Actual/360")
> which returns "act/360"

this has been fixed in the CVS: qlDayCounterName now returns a valid
string that can be used later on as input paramet. It can be a string
litterally different from the one it has been used instantiating the
object, but it should always be an ISDA equivalent string.

> Perhaps we need some mechanism whereby the day counter returns the
> same string used to create it e.g.
> =qlDayCounterName("Actual/360")  ->  "Actual/360"
> =qlDayCounterName("Act/360")  ->  "Act/360"
I don't think so, as long as the returned string is ISDA equivalent.

> > On a separate note, I am wondering if the ACT/ACT here
> > is the same as ACT/nACT which is used in US
> > Treasuries. Anyone can confirm that?
please point to an ATC/nACT definition.

> > 2.) I have found that qlFrequency() also cannot
> > display any frequency shorter than 1 month.  Again is
> > this just a display problem

yes it is. I don't remember if it was already available in 0.3.13 but
you should/will use qlInterestRateIndexTenor() instead, which will
properly return 3M, 6M, etc and will also work for tenor as 5M, 7M
which are not defined as frequency. qlFrequency() will probably be
deprecated.

ciao -- Nando