Business Days problem in IborIndex maturity

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

Business Days problem in IborIndex maturity

MAZZOCCHI PAOLO

Hi all,

 

I want to build an index with a specified maturity using “iborindex”, but if I want to define the tenor using business days I have some errors:

 

 

I have this error every time that the number of business days is equal to a multiple of 7.

This is due to the fact that the function iborindex use this code  to determine its maturity: (iborindex.cpp lines 54-59):

 

Date IborIndex::maturityDate(const Date& valueDate) const {

        return fixingCalendar().advance(valueDate,

                                        tenor_,

                                        convention_,

                                        endOfMonth_);

    }

 

And “tenor” is of the type:  const Period& tenor.

The problem is that in file period.cpp, lines 110-114, we have:

 

case Days:

                if (!(length_%7)) {

                    length_/=7;

                    units_ = Weeks;

                }

And so if we have a number of business day equals to a multiple of 7 we have a different behavior.

 

How can we solve this problem?

Should we have to distinguish between days and business days?

 

Thank you in advance

 

Paolo



Prima di stampare, pensa all'ambiente ** Think about the environment before printing



Il presente messaggio, inclusi gli eventuali allegati, ha natura aziendale e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo ricevesse per errore, è pregato di avvisare tempestivamente il mittente e di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o diffusione non autorizzata del contenuto di questo messaggio o di parte di esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni controlli sui documenti allegati al presente messaggio. Non si assume alcuna responsabilità per eventuali danni o perdite derivanti dalla presenza di virus.

Per lo svolgimento delle attività di investimento nel Regno Unito, la società è autorizzata da Banca d'Italia ed è soggetta alla vigilanza limitata della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) . Maggiori informazioni in merito ai poteri di vigilanza della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) sono a disposizione previa richiesta.

Nel Regno Unito Intesa Sanpaolo S.p.A. opera attraverso la filiale di Londra, sita in 90 Queen Street, London EC4N 1SA, registrata in Inghilterra & Galles sotto No.FC016201, Branch No.BR000036

In osservanza dei requisito imposti dal Internal Revenue Service (Agenzia delle Entrate degli Stati Uniti), qualunque discussione relativa a temi di natura fiscale contenuta in questo messaggio o nei suoi allegati non e’ intesa ne’ e’ stata scritta per essere utilizzata, ne’ puo’ essere utilizata per (i) evitare l’imposizione di gravami fiscali secondo il codice tributario vigente negli Stati Uniti o (ii) per promuovere, sollecitare o raccomandare una operazione finanziaria o altra transazione indirizzata ad un altro destinatario.

Nella Repubblica d’Irlanda, Intesa Sanpaolo Bank Ireland plc è regolamentata dalla Banca Centrale d’Irlanda ed è parte del Gruppo Bancario Intesa Sanpaolo S.p.A. Registrata in Irlanda come società numero 125216 – IVA Reg. IE4817418C IE, sita in, KBC House, 4 George Dock, IFSC, Dublino 1, Irlanda.

***



This email (including any attachment) is a corporate message and may contain confidential and/or privileged and/or proprietary information. If you have received this email in error, please notify the sender immediately, do not use or share it and destroy this email. Any unauthorised use, copying or disclosure of the material in this email or of parts hereof (including reliance thereon) is strictly forbidden.
We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment of this message. We accept no liability for loss or damage caused by software viruses.

For the conduct of investment business in the UK, the Company is authorised by Banca d’Italia and subject to limited regulation in the UK by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ). Details about the extent of our regulation by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ) are available from us on request.

In the UK Intesa Sanpaolo S.p.A. operates through its London Branch, located at 90 Queen Street, London EC4N 1SA. Registered in England & Wales under No.FC016201, Branch No.BR000036

To comply with requirements imposed by the IRS, we inform you that any discussion of U.S. federal tax issues contained herein (including any attachments) was not intended or written to be used, and cannot be used by you, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending any transaction or matter addressed herein to another party.

In the Republic of Ireland, Intesa Sanpaolo Bank Ireland plc is regulated by the Central Bank of Ireland and is a member of the Intesa Sanpaolo Group. It is registered in Ireland as company no.125216 – VAT Reg. No. IE 4817418C and located at, 3rd Floor, KBC House, 4 George’s Dock, IFSC, Dublin 1, Ireland.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Business Days problem in IborIndex maturity

Peter Caspers-4
Hi Paolo,

your request seems to be to create an ibor index without normalizing the tenor (which is done in interestrateindex.cpp L38). This option would be easy to add, e.g. with an addtional parameter ... bool normalizedTenor = true ... in the interest rate index constructor and the ibor index constructor.

I guess there might be voices against it, saying that there is no x-ibor index with 7 business days tenor (or is there ?). On the other hand, if it is useful, why not.

best regards, see you soon
Peter
 

On 10 October 2014 17:41, MAZZOCCHI PAOLO <[hidden email]> wrote:

Hi all,

 

I want to build an index with a specified maturity using “iborindex”, but if I want to define the tenor using business days I have some errors:

 

 

I have this error every time that the number of business days is equal to a multiple of 7.

This is due to the fact that the function iborindex use this code  to determine its maturity: (iborindex.cpp lines 54-59):

 

Date IborIndex::maturityDate(const Date& valueDate) const {

        return fixingCalendar().advance(valueDate,

                                        tenor_,

                                        convention_,

                                        endOfMonth_);

    }

 

And “tenor” is of the type:  const Period& tenor.

The problem is that in file period.cpp, lines 110-114, we have:

 

case Days:

                if (!(length_%7)) {

                    length_/=7;

                    units_ = Weeks;

                }

And so if we have a number of business day equals to a multiple of 7 we have a different behavior.

 

How can we solve this problem?

Should we have to distinguish between days and business days?

 

Thank you in advance

 

Paolo



Prima di stampare, pensa all'ambiente ** Think about the environment before printing



Il presente messaggio, inclusi gli eventuali allegati, ha natura aziendale e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo ricevesse per errore, è pregato di avvisare tempestivamente il mittente e di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o diffusione non autorizzata del contenuto di questo messaggio o di parte di esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni controlli sui documenti allegati al presente messaggio. Non si assume alcuna responsabilità per eventuali danni o perdite derivanti dalla presenza di virus.

Per lo svolgimento delle attività di investimento nel Regno Unito, la società è autorizzata da Banca d'Italia ed è soggetta alla vigilanza limitata della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) . Maggiori informazioni in merito ai poteri di vigilanza della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) sono a disposizione previa richiesta.

Nel Regno Unito Intesa Sanpaolo S.p.A. opera attraverso la filiale di Londra, sita in 90 Queen Street, London EC4N 1SA, registrata in Inghilterra & Galles sotto No.FC016201, Branch No.BR000036

In osservanza dei requisito imposti dal Internal Revenue Service (Agenzia delle Entrate degli Stati Uniti), qualunque discussione relativa a temi di natura fiscale contenuta in questo messaggio o nei suoi allegati non e’ intesa ne’ e’ stata scritta per essere utilizzata, ne’ puo’ essere utilizata per (i) evitare l’imposizione di gravami fiscali secondo il codice tributario vigente negli Stati Uniti o (ii) per promuovere, sollecitare o raccomandare una operazione finanziaria o altra transazione indirizzata ad un altro destinatario.

Nella Repubblica d’Irlanda, Intesa Sanpaolo Bank Ireland plc è regolamentata dalla Banca Centrale d’Irlanda ed è parte del Gruppo Bancario Intesa Sanpaolo S.p.A. Registrata in Irlanda come società numero 125216 – IVA Reg. IE4817418C IE, sita in, KBC House, 4 George Dock, IFSC, Dublino 1, Irlanda.

***



This email (including any attachment) is a corporate message and may contain confidential and/or privileged and/or proprietary information. If you have received this email in error, please notify the sender immediately, do not use or share it and destroy this email. Any unauthorised use, copying or disclosure of the material in this email or of parts hereof (including reliance thereon) is strictly forbidden.
We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment of this message. We accept no liability for loss or damage caused by software viruses.

For the conduct of investment business in the UK, the Company is authorised by Banca d’Italia and subject to limited regulation in the UK by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ). Details about the extent of our regulation by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ) are available from us on request.

In the UK Intesa Sanpaolo S.p.A. operates through its London Branch, located at 90 Queen Street, London EC4N 1SA. Registered in England & Wales under No.FC016201, Branch No.BR000036

To comply with requirements imposed by the IRS, we inform you that any discussion of U.S. federal tax issues contained herein (including any attachments) was not intended or written to be used, and cannot be used by you, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending any transaction or matter addressed herein to another party.

In the Republic of Ireland, Intesa Sanpaolo Bank Ireland plc is regulated by the Central Bank of Ireland and is a member of the Intesa Sanpaolo Group. It is registered in Ireland as company no.125216 – VAT Reg. No. IE 4817418C and located at, 3rd Floor, KBC House, 4 George’s Dock, IFSC, Dublin 1, Ireland.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Business Days problem in IborIndex maturity

Ferdinando M. Ametrano-2
with Paolo we agreed that for the time being to suppress period normalization is an effective remedy and a proper bug fix: 7D is not 1W, since in QuantLib D are meant to be business days.

Then one could object that D should be calendar days to be homogeneous with W, M, and Y, and business days should be a different BD enumeration value. But this is left for that list of non backward compatible fixes that I'm sure Luigi is maintaining somewhere for QuantLib 2.0 :-) 

On Sat, Oct 11, 2014 at 8:48 PM, Peter Caspers <[hidden email]> wrote:
Hi Paolo,

your request seems to be to create an ibor index without normalizing the tenor (which is done in interestrateindex.cpp L38). This option would be easy to add, e.g. with an addtional parameter ... bool normalizedTenor = true ... in the interest rate index constructor and the ibor index constructor.

I guess there might be voices against it, saying that there is no x-ibor index with 7 business days tenor (or is there ?). On the other hand, if it is useful, why not.

best regards, see you soon
Peter
 

On 10 October 2014 17:41, MAZZOCCHI PAOLO <[hidden email]> wrote:

Hi all,

 

I want to build an index with a specified maturity using “iborindex”, but if I want to define the tenor using business days I have some errors:

 

 

I have this error every time that the number of business days is equal to a multiple of 7.

This is due to the fact that the function iborindex use this code  to determine its maturity: (iborindex.cpp lines 54-59):

 

Date IborIndex::maturityDate(const Date& valueDate) const {

        return fixingCalendar().advance(valueDate,

                                        tenor_,

                                        convention_,

                                        endOfMonth_);

    }

 

And “tenor” is of the type:  const Period& tenor.

The problem is that in file period.cpp, lines 110-114, we have:

 

case Days:

                if (!(length_%7)) {

                    length_/=7;

                    units_ = Weeks;

                }

And so if we have a number of business day equals to a multiple of 7 we have a different behavior.

 

How can we solve this problem?

Should we have to distinguish between days and business days?

 

Thank you in advance

 

Paolo



Prima di stampare, pensa all'ambiente ** Think about the environment before printing



Il presente messaggio, inclusi gli eventuali allegati, ha natura aziendale e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo ricevesse per errore, è pregato di avvisare tempestivamente il mittente e di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o diffusione non autorizzata del contenuto di questo messaggio o di parte di esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni controlli sui documenti allegati al presente messaggio. Non si assume alcuna responsabilità per eventuali danni o perdite derivanti dalla presenza di virus.

Per lo svolgimento delle attività di investimento nel Regno Unito, la società è autorizzata da Banca d'Italia ed è soggetta alla vigilanza limitata della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) . Maggiori informazioni in merito ai poteri di vigilanza della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) sono a disposizione previa richiesta.

Nel Regno Unito Intesa Sanpaolo S.p.A. opera attraverso la filiale di Londra, sita in 90 Queen Street, London EC4N 1SA, registrata in Inghilterra & Galles sotto No.FC016201, Branch No.BR000036

In osservanza dei requisito imposti dal Internal Revenue Service (Agenzia delle Entrate degli Stati Uniti), qualunque discussione relativa a temi di natura fiscale contenuta in questo messaggio o nei suoi allegati non e’ intesa ne’ e’ stata scritta per essere utilizzata, ne’ puo’ essere utilizata per (i) evitare l’imposizione di gravami fiscali secondo il codice tributario vigente negli Stati Uniti o (ii) per promuovere, sollecitare o raccomandare una operazione finanziaria o altra transazione indirizzata ad un altro destinatario.

Nella Repubblica d’Irlanda, Intesa Sanpaolo Bank Ireland plc è regolamentata dalla Banca Centrale d’Irlanda ed è parte del Gruppo Bancario Intesa Sanpaolo S.p.A. Registrata in Irlanda come società numero 125216 – IVA Reg. IE4817418C IE, sita in, KBC House, 4 George Dock, IFSC, Dublino 1, Irlanda.

***



This email (including any attachment) is a corporate message and may contain confidential and/or privileged and/or proprietary information. If you have received this email in error, please notify the sender immediately, do not use or share it and destroy this email. Any unauthorised use, copying or disclosure of the material in this email or of parts hereof (including reliance thereon) is strictly forbidden.
We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment of this message. We accept no liability for loss or damage caused by software viruses.

For the conduct of investment business in the UK, the Company is authorised by Banca d’Italia and subject to limited regulation in the UK by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ). Details about the extent of our regulation by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ) are available from us on request.

In the UK Intesa Sanpaolo S.p.A. operates through its London Branch, located at 90 Queen Street, London EC4N 1SA. Registered in England & Wales under No.FC016201, Branch No.BR000036

To comply with requirements imposed by the IRS, we inform you that any discussion of U.S. federal tax issues contained herein (including any attachments) was not intended or written to be used, and cannot be used by you, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending any transaction or matter addressed herein to another party.

In the Republic of Ireland, Intesa Sanpaolo Bank Ireland plc is regulated by the Central Bank of Ireland and is a member of the Intesa Sanpaolo Group. It is registered in Ireland as company no.125216 – VAT Reg. No. IE 4817418C and located at, 3rd Floor, KBC House, 4 George’s Dock, IFSC, Dublin 1, Ireland.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Business Days problem in IborIndex maturity

cheng li

Hi Ferdinando,

 

Maybe a backward compatible fix is to add a new type called Calendar Day ( aka, CD)?

 

Regards

Cheng


2014-10-14 1:04 GMT+08:00 Ferdinando M. Ametrano <[hidden email]>:
with Paolo we agreed that for the time being to suppress period normalization is an effective remedy and a proper bug fix: 7D is not 1W, since in QuantLib D are meant to be business days.

Then one could object that D should be calendar days to be homogeneous with W, M, and Y, and business days should be a different BD enumeration value. But this is left for that list of non backward compatible fixes that I'm sure Luigi is maintaining somewhere for QuantLib 2.0 :-) 

On Sat, Oct 11, 2014 at 8:48 PM, Peter Caspers <[hidden email]> wrote:
Hi Paolo,

your request seems to be to create an ibor index without normalizing the tenor (which is done in interestrateindex.cpp L38). This option would be easy to add, e.g. with an addtional parameter ... bool normalizedTenor = true ... in the interest rate index constructor and the ibor index constructor.

I guess there might be voices against it, saying that there is no x-ibor index with 7 business days tenor (or is there ?). On the other hand, if it is useful, why not.

best regards, see you soon
Peter
 

On 10 October 2014 17:41, MAZZOCCHI PAOLO <[hidden email]> wrote:

Hi all,

 

I want to build an index with a specified maturity using “iborindex”, but if I want to define the tenor using business days I have some errors:

 

 

I have this error every time that the number of business days is equal to a multiple of 7.

This is due to the fact that the function iborindex use this code  to determine its maturity: (iborindex.cpp lines 54-59):

 

Date IborIndex::maturityDate(const Date& valueDate) const {

        return fixingCalendar().advance(valueDate,

                                        tenor_,

                                        convention_,

                                        endOfMonth_);

    }

 

And “tenor” is of the type:  const Period& tenor.

The problem is that in file period.cpp, lines 110-114, we have:

 

case Days:

                if (!(length_%7)) {

                    length_/=7;

                    units_ = Weeks;

                }

And so if we have a number of business day equals to a multiple of 7 we have a different behavior.

 

How can we solve this problem?

Should we have to distinguish between days and business days?

 

Thank you in advance

 

Paolo



Prima di stampare, pensa all'ambiente ** Think about the environment before printing



Il presente messaggio, inclusi gli eventuali allegati, ha natura aziendale e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo ricevesse per errore, è pregato di avvisare tempestivamente il mittente e di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o diffusione non autorizzata del contenuto di questo messaggio o di parte di esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni controlli sui documenti allegati al presente messaggio. Non si assume alcuna responsabilità per eventuali danni o perdite derivanti dalla presenza di virus.

Per lo svolgimento delle attività di investimento nel Regno Unito, la società è autorizzata da Banca d'Italia ed è soggetta alla vigilanza limitata della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) . Maggiori informazioni in merito ai poteri di vigilanza della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) sono a disposizione previa richiesta.

Nel Regno Unito Intesa Sanpaolo S.p.A. opera attraverso la filiale di Londra, sita in 90 Queen Street, London EC4N 1SA, registrata in Inghilterra & Galles sotto No.FC016201, Branch No.BR000036

In osservanza dei requisito imposti dal Internal Revenue Service (Agenzia delle Entrate degli Stati Uniti), qualunque discussione relativa a temi di natura fiscale contenuta in questo messaggio o nei suoi allegati non e’ intesa ne’ e’ stata scritta per essere utilizzata, ne’ puo’ essere utilizata per (i) evitare l’imposizione di gravami fiscali secondo il codice tributario vigente negli Stati Uniti o (ii) per promuovere, sollecitare o raccomandare una operazione finanziaria o altra transazione indirizzata ad un altro destinatario.

Nella Repubblica d’Irlanda, Intesa Sanpaolo Bank Ireland plc è regolamentata dalla Banca Centrale d’Irlanda ed è parte del Gruppo Bancario Intesa Sanpaolo S.p.A. Registrata in Irlanda come società numero 125216 – IVA Reg. IE4817418C IE, sita in, KBC House, 4 George Dock, IFSC, Dublino 1, Irlanda.

***



This email (including any attachment) is a corporate message and may contain confidential and/or privileged and/or proprietary information. If you have received this email in error, please notify the sender immediately, do not use or share it and destroy this email. Any unauthorised use, copying or disclosure of the material in this email or of parts hereof (including reliance thereon) is strictly forbidden.
We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment of this message. We accept no liability for loss or damage caused by software viruses.

For the conduct of investment business in the UK, the Company is authorised by Banca d’Italia and subject to limited regulation in the UK by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ). Details about the extent of our regulation by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ) are available from us on request.

In the UK Intesa Sanpaolo S.p.A. operates through its London Branch, located at 90 Queen Street, London EC4N 1SA. Registered in England & Wales under No.FC016201, Branch No.BR000036

To comply with requirements imposed by the IRS, we inform you that any discussion of U.S. federal tax issues contained herein (including any attachments) was not intended or written to be used, and cannot be used by you, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending any transaction or matter addressed herein to another party.

In the Republic of Ireland, Intesa Sanpaolo Bank Ireland plc is regulated by the Central Bank of Ireland and is a member of the Intesa Sanpaolo Group. It is registered in Ireland as company no.125216 – VAT Reg. No. IE 4817418C and located at, 3rd Floor, KBC House, 4 George’s Dock, IFSC, Dublin 1, Ireland.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Business Days problem in IborIndex maturity

Luigi Ballabio
It would be tricky to get correct. Currently, the "Days" enumeration works in some functions as calendar days and in some others as business days. A less confusing (and possibly backward compatible) option would be to add both CalendarDays and BusinessDays, and deprecate Days (which would continue to work as it does).

For the time being, inhibiting normalization of days to weeks will fix the immediate problem.

Luigi


On Wed, Oct 15, 2014 at 3:47 AM, Cheng Li <[hidden email]> wrote:

Hi Ferdinando,

 

Maybe a backward compatible fix is to add a new type called Calendar Day ( aka, CD)?

 

Regards

Cheng


2014-10-14 1:04 GMT+08:00 Ferdinando M. Ametrano <[hidden email]>:
with Paolo we agreed that for the time being to suppress period normalization is an effective remedy and a proper bug fix: 7D is not 1W, since in QuantLib D are meant to be business days.

Then one could object that D should be calendar days to be homogeneous with W, M, and Y, and business days should be a different BD enumeration value. But this is left for that list of non backward compatible fixes that I'm sure Luigi is maintaining somewhere for QuantLib 2.0 :-) 

On Sat, Oct 11, 2014 at 8:48 PM, Peter Caspers <[hidden email]> wrote:
Hi Paolo,

your request seems to be to create an ibor index without normalizing the tenor (which is done in interestrateindex.cpp L38). This option would be easy to add, e.g. with an addtional parameter ... bool normalizedTenor = true ... in the interest rate index constructor and the ibor index constructor.

I guess there might be voices against it, saying that there is no x-ibor index with 7 business days tenor (or is there ?). On the other hand, if it is useful, why not.

best regards, see you soon
Peter
 

On 10 October 2014 17:41, MAZZOCCHI PAOLO <[hidden email]> wrote:

Hi all,

 

I want to build an index with a specified maturity using “iborindex”, but if I want to define the tenor using business days I have some errors:

 

 

I have this error every time that the number of business days is equal to a multiple of 7.

This is due to the fact that the function iborindex use this code  to determine its maturity: (iborindex.cpp lines 54-59):

 

Date IborIndex::maturityDate(const Date& valueDate) const {

        return fixingCalendar().advance(valueDate,

                                        tenor_,

                                        convention_,

                                        endOfMonth_);

    }

 

And “tenor” is of the type:  const Period& tenor.

The problem is that in file period.cpp, lines 110-114, we have:

 

case Days:

                if (!(length_%7)) {

                    length_/=7;

                    units_ = Weeks;

                }

And so if we have a number of business day equals to a multiple of 7 we have a different behavior.

 

How can we solve this problem?

Should we have to distinguish between days and business days?

 

Thank you in advance

 

Paolo



Prima di stampare, pensa all'ambiente ** Think about the environment before printing



Il presente messaggio, inclusi gli eventuali allegati, ha natura aziendale e potrebbe contenere informazioni confidenziali e/o riservate. Chiunque lo ricevesse per errore, è pregato di avvisare tempestivamente il mittente e di cancellarlo.
E’ strettamente vietata qualsiasi forma di utilizzo, riproduzione o diffusione non autorizzata del contenuto di questo messaggio o di parte di esso.
Pur essendo state assunte le dovute precauzioni per ridurre al minimo il rischio di trasmissione di virus, si suggerisce di effettuare gli opportuni controlli sui documenti allegati al presente messaggio. Non si assume alcuna responsabilità per eventuali danni o perdite derivanti dalla presenza di virus.

Per lo svolgimento delle attività di investimento nel Regno Unito, la società è autorizzata da Banca d'Italia ed è soggetta alla vigilanza limitata della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) . Maggiori informazioni in merito ai poteri di vigilanza della Financial Conduct Authority ( FCA ) e della Prudential Regulation Authority ( PRA ) sono a disposizione previa richiesta.

Nel Regno Unito Intesa Sanpaolo S.p.A. opera attraverso la filiale di Londra, sita in 90 Queen Street, London EC4N 1SA, registrata in Inghilterra & Galles sotto No.FC016201, Branch No.BR000036

In osservanza dei requisito imposti dal Internal Revenue Service (Agenzia delle Entrate degli Stati Uniti), qualunque discussione relativa a temi di natura fiscale contenuta in questo messaggio o nei suoi allegati non e’ intesa ne’ e’ stata scritta per essere utilizzata, ne’ puo’ essere utilizata per (i) evitare l’imposizione di gravami fiscali secondo il codice tributario vigente negli Stati Uniti o (ii) per promuovere, sollecitare o raccomandare una operazione finanziaria o altra transazione indirizzata ad un altro destinatario.

Nella Repubblica d’Irlanda, Intesa Sanpaolo Bank Ireland plc è regolamentata dalla Banca Centrale d’Irlanda ed è parte del Gruppo Bancario Intesa Sanpaolo S.p.A. Registrata in Irlanda come società numero 125216 – IVA Reg. IE4817418C IE, sita in, KBC House, 4 George Dock, IFSC, Dublino 1, Irlanda.

***



This email (including any attachment) is a corporate message and may contain confidential and/or privileged and/or proprietary information. If you have received this email in error, please notify the sender immediately, do not use or share it and destroy this email. Any unauthorised use, copying or disclosure of the material in this email or of parts hereof (including reliance thereon) is strictly forbidden.
We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment of this message. We accept no liability for loss or damage caused by software viruses.

For the conduct of investment business in the UK, the Company is authorised by Banca d’Italia and subject to limited regulation in the UK by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ). Details about the extent of our regulation by the Financial Conduct Authority ( FCA ) and the Prudential Regulation Authority ( PRA ) are available from us on request.

In the UK Intesa Sanpaolo S.p.A. operates through its London Branch, located at 90 Queen Street, London EC4N 1SA. Registered in England & Wales under No.FC016201, Branch No.BR000036

To comply with requirements imposed by the IRS, we inform you that any discussion of U.S. federal tax issues contained herein (including any attachments) was not intended or written to be used, and cannot be used by you, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending any transaction or matter addressed herein to another party.

In the Republic of Ireland, Intesa Sanpaolo Bank Ireland plc is regulated by the Central Bank of Ireland and is a member of the Intesa Sanpaolo Group. It is registered in Ireland as company no.125216 – VAT Reg. No. IE 4817418C and located at, 3rd Floor, KBC House, 4 George’s Dock, IFSC, Dublin 1, Ireland.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev




--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev