US Exchange Calendar

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

US Exchange Calendar

Hasmet Akgun
I was doing some backtesting and noticed a slight
discrepancy betwen the business days generated by
UnitedStates::ExchangeImpl::isBusinessDay and our
pricing database. The problem results from the fact
that isBusinessDay implements current NYSE
regulations, which have not been constant. Based on
what I have:

1) Washington's birthday has been an exchange holiday
only since 1998.
2) Until 1984, US Presidential Election Days were
exchange holidays.

Also, I am wondering if the intention behind leaving
out special closings (mainly due to presidential
funerals) is performance reasons: Most users are
expected to use the calendar for dates in the future,
thus anyone using this class for past dates pays a
small price by adding prior closings through
Calendar::addHoliday?

Anyway, I modified unitedstates.cpp to incorporate
what I need and would be happy to help others on this
issue. In any case, the modifications are
straightforward once the exceptions are known.

Regards,

Hasmet



Reply | Threaded
Open this post in threaded view
|

Re: US Exchange Calendar

Ferdinando M. Ametrano-3
Hi Hasmet

>1) Washington's birthday has been an exchange holiday
>only since 1998.
>2) Until 1984, US Presidential Election Days were
>exchange holidays.

thank you for pointing this out. We will fix them

>Also, I am wondering if the intention behind leaving
>out special closings (mainly due to presidential
>funerals) is performance reasons: Most users are
>expected to use the calendar for dates in the future,
>thus anyone using this class for past dates pays a
>small price by adding prior closings through
>Calendar::addHoliday?
not really. I think the penalty of adding past closing is minor and could
be made almost null if needed. So I would include past closing.

>Anyway, I modified unitedstates.cpp to incorporate
>what I need and would be happy to help others on this
>issue.
I'll fix point 1 and 2 above. Are there more exceptions?

thank you

ciao -- Nando



Reply | Threaded
Open this post in threaded view
|

RE: US Exchange Calendar

Hasmet Akgun
Here's a diff that smooths the irregularities since 1975. More special
closings are available at http://www.nyse.com/about/1022221392381.html but
unfortunately, holiday rule changes have not been incorporated into that
document. Note that the diff corrects an error in my previous post: The
holiday in (1) is MLK's birthday, not Washington's.

Regards,

Hasmet

> -----Original Message-----
> From: Ferdinando Ametrano [mailto:[hidden email]]
> Sent: Friday, January 21, 2005 1:50 PM
> To: Hasmet Akgun; [hidden email]
> Subject: Re: [Quantlib-dev] US Exchange Calendar
>
> Hi Hasmet
>
> >1) Washington's birthday has been an exchange holiday
> >only since 1998.
> >2) Until 1984, US Presidential Election Days were
> >exchange holidays.
>
> thank you for pointing this out. We will fix them
>
> >Also, I am wondering if the intention behind leaving
> >out special closings (mainly due to presidential
> >funerals) is performance reasons: Most users are
> >expected to use the calendar for dates in the future,
> >thus anyone using this class for past dates pays a
> >small price by adding prior closings through
> >Calendar::addHoliday?
> not really. I think the penalty of adding past closing is
> minor and could
> be made almost null if needed. So I would include past closing.
>
> >Anyway, I modified unitedstates.cpp to incorporate
> >what I need and would be happy to help others on this
> >issue.
> I'll fix point 1 and 2 above. Are there more exceptions?
>
> thank you
>
> ciao -- Nando
>

diff.txt (962 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: US Exchange Calendar

Ferdinando M. Ametrano-3
In reply to this post by Hasmet Akgun
sent to quantlib-users instead of quantlib-dev. Sorry.

>Hasmet,
>
>I've applied your patch to the CVS and I've also included the special
>closings available on the nyse web site.
>
>Would you mind checking if the attached file is ok with regard to what you
>know/need?
>
>Thank you for your help.
>
>ciao -- Nando

unitedstates.cpp (8K) Download Attachment