AlpacaTechJP / trading_calendars

Calendars for various securities exchanges.
Apache License 2.0
0 stars 0 forks source link

Add vernal and autumnal equinox 2022 #27

Closed beppe712 closed 2 years ago

beppe712 commented 2 years ago

The 2 missing dates for XTKS for 2022 are the vernal and autumnal equinoxes. Written as a comment in the code:

# The dates on which the vernal/autumnal equinox will be observed
# are announced on the first weekday of February of the previous
# year, so we treat them as ad-hoc holidays, even though they
# occur every year. For more info, see:
# https://en.wikipedia.org/wiki/Public_holidays_in_Japan#cite_note-3
# See:
# https://www.timeanddate.com/holidays/japan/
# https://www.timeanddate.com/holidays/japan/spring-equinox
sercant commented 2 years ago

@beppe712 please always refer to the following calendar to add trading holidays. This is the ground truth: https://www.jpx.co.jp/english/corporate/about-jpx/calendar/

We don't care about third party source (e.g. wikipedia)

beppe712 commented 2 years ago

@beppe712 please always refer to the following calendar to add trading holidays. This is the ground truth: https://www.jpx.co.jp/english/corporate/about-jpx/calendar/

We don't care about third party source (e.g. wikipedia)

The comment was already in the code 😅 They treat equinoxes as ad-hoc holidays so they'd have to be added each year.

beppe712 commented 2 years ago

tests are missing.

@sercant Done in 94bdc324b0cce3a6daa5c5973da4f2bfdee085cd 😊

sercant commented 2 years ago

@beppe712 you merged this?

beppe712 commented 2 years ago

@beppe712 you merged this?

Yes I have merged mistakenly into exchange-calendars-head, and from that branch I am making the PR https://github.com/gerrymanoim/exchange_calendars/pull/135