Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NYSE Holidays #458

Closed
Z223I opened this issue Apr 9, 2021 · 9 comments
Closed

NYSE Holidays #458

Z223I opened this issue Apr 9, 2021 · 9 comments

Comments

@Z223I
Copy link

Z223I commented Apr 9, 2021

I wish to add holidays for the NYSE. Should I refer to it as a Country, Providence, or State. I wish to also do NASDAQ.

The NYSE and NASDAQ both have early close days like the day after US Thanksgiving. How would you suggest I do that?

Thanks in advance!

Z223I

@mborsetti
Copy link
Contributor

I wish to add holidays for the NYSE. Should I refer to it as a Country, Providence, or State. I wish to also do NASDAQ.

@Z223I thanks for the contribution!! dr-prodigy will give the definitive answer here, but below are my suggestions.

@dr-prodigy to keep with ISO standardization, I suggest we use ISO 10383 (the standard which "specifies a universal method of identifying exchanges, trading platforms and regulated or non-regulated markets as sources of prices and related information in order to facilitate automated processing"). These codes are at https://www.iso20022.org/market-identifier-codes.

Maybe we create a pseudo-country called "MIC" (for Market Identifier Code) and use the ISO 10383 operating MIC as the identifier, so that it would look like this:

nyse_holidays = holidays.MIC('XNYS')
nasdaq_holidays = holidays.MIC('XNAS')

Alternatively we can keep the market within the country it belongs to (as listed in ISO 10383), hoping that there is no collision with a ISO 3166-2 subdivision code (see #374), so that it would look like this:

nyse_holidays = holidays.US('XNYS')
nasdaq_holidays = holidays.US('XNAS')

Personally, I prefer option 1, not only because there's no risk of collisions, but also because it's one less implementation step for anyone using this package (i.e. all they need is the MIC, they don't have to keep track, or look up, where that exchange is located; plus markets, which are mostly electronic anyway, may relocate to a different country, e.g. post-Brexit or whatever, creating maintenance and implementation headaches).

The NYSE and NASDAQ both have early close days like the day after US Thanksgiving. How would you suggest I do that?

Ugh. @dr-prodigy any ideas? That's actually really useful information!

@Z223I
Copy link
Author

Z223I commented Apr 9, 2021

@mborsetti That info looks really good. I will wait for @dr-prodigy to also respond.

Thanks!!

Z223I

@Z223I
Copy link
Author

Z223I commented Apr 9, 2021

Maybe the short market days can be handled like "Holiday Observed". I need to dive into your code.

@Z223I
Copy link
Author

Z223I commented Apr 10, 2021

@dr-prodigy I went with option 1. Inherited from Holidays so it may be easily used for any country.

For "Short Trading Days", I put it in the name just like "Observed."

Now I will write some tests.

Thanks again,

Z223I

@dr-prodigy
Copy link
Collaborator

Hey there sorry, I've been off for quite a long time.. more and more difficult to find time for python-holidays!

First of all, thank you both.. I really like this initiative, and I agree with you: option 1 seems definitely the best to me too.

I opened a new beta course today.. I'll be waiting for your work @Z223I !

Thx again, cheers everyone!
dr-p

@JustinKurland
Copy link

Any updates on this I think this would be a fantastic addition to an already incredibly useful package!

@mborsetti
Copy link
Contributor

@JustinKurland

Any updates on this I think this would be a fantastic addition to an already incredibly useful package!

It follows, then, that a contribution would therefore be extremely fantastic!

Do you have some spare time to contribute?

@JustinKurland
Copy link

JustinKurland commented Oct 8, 2021

@mborsetti I would love to help contribute, and will do, but at this precise moment I am particularly swamped. Will check in with a friend who has implemented something similar in an R package he developed to see where/how he is pulling this from and circle back to try and assist on this very thing. 🙌🏻

dr-prodigy added a commit that referenced this issue Apr 28, 2022
…al() method (dr-p)

Support for NY Stock Exchange #651, #458 (nadime, dr-p)
@dr-prodigy
Copy link
Collaborator

Just released in beta thru #651 . Closing this, thanks! 👍

dr-prodigy added a commit that referenced this issue Jun 5, 2022
Version 0.14
============

Released June 5, 2022

- Drop support for EOL Python 3.6 #328 (hugovk, dr-p)
- Package review #662 (dimbleby)
- Added financial markets support: ECB and NYSE, list_supported_financial() method (dr-p)
- Support for NY Stock Exchange #651, #458 (nadime, dr-p)
- Support for Malta #612, #630 (rafelbev)
- Support for Madagascar #656 (fav007)
- Support for Cyprus #410, #665 (digidestination, avnigo)
- Ireland as standalone country #636, #639 (TeoTN, dr-p, javicalle)
- Australia fixes #631 (jeremychrimes)
- Singapore updates #652 (mborsetti)
- Saudi Arabia fixes #642 (OsaydAbdu)
- Spain fixes #634 (javicalle)
- US fixes #648 (dashdrum)
- Greece fixes #659 (tudorvaran)
- India doc fixes #657 (dr-p)
- Poland fix #663 (kfsz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants