pandas-market-calendars 4.3.3__py3-none-any.whl → 4.6.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. pandas_market_calendars/__init__.py +39 -38
  2. pandas_market_calendars/calendar_registry.py +57 -53
  3. pandas_market_calendars/calendar_utils.py +1200 -261
  4. pandas_market_calendars/calendars/asx.py +66 -66
  5. pandas_market_calendars/calendars/bmf.py +223 -206
  6. pandas_market_calendars/calendars/bse.py +421 -407
  7. pandas_market_calendars/calendars/cboe.py +145 -145
  8. pandas_market_calendars/calendars/cme.py +405 -402
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -126
  10. pandas_market_calendars/calendars/cme_globex_base.py +119 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +160 -160
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +123 -123
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -136
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -101
  16. pandas_market_calendars/calendars/eurex.py +131 -139
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +98 -98
  18. pandas_market_calendars/calendars/hkex.py +429 -426
  19. pandas_market_calendars/calendars/ice.py +81 -81
  20. pandas_market_calendars/calendars/iex.py +151 -112
  21. pandas_market_calendars/calendars/jpx.py +113 -109
  22. pandas_market_calendars/calendars/lse.py +114 -114
  23. pandas_market_calendars/calendars/mirror.py +149 -130
  24. pandas_market_calendars/calendars/nyse.py +1466 -1324
  25. pandas_market_calendars/calendars/ose.py +116 -116
  26. pandas_market_calendars/calendars/sifma.py +354 -350
  27. pandas_market_calendars/calendars/six.py +132 -132
  28. pandas_market_calendars/calendars/sse.py +311 -311
  29. pandas_market_calendars/calendars/tase.py +220 -197
  30. pandas_market_calendars/calendars/tsx.py +181 -181
  31. pandas_market_calendars/holidays/cme.py +385 -385
  32. pandas_market_calendars/holidays/cme_globex.py +214 -214
  33. pandas_market_calendars/holidays/cn.py +1476 -1455
  34. pandas_market_calendars/holidays/jp.py +401 -398
  35. pandas_market_calendars/holidays/jpx_equinox.py +1 -0
  36. pandas_market_calendars/holidays/nyse.py +1536 -1531
  37. pandas_market_calendars/holidays/oz.py +63 -63
  38. pandas_market_calendars/holidays/sifma.py +350 -338
  39. pandas_market_calendars/holidays/us.py +376 -376
  40. pandas_market_calendars/market_calendar.py +1057 -895
  41. {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/METADATA +13 -9
  42. pandas_market_calendars-4.6.0.dist-info/RECORD +50 -0
  43. {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/WHEEL +1 -1
  44. pandas_market_calendars-4.3.3.dist-info/RECORD +0 -50
  45. {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/LICENSE +0 -0
  46. {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/NOTICE +0 -0
  47. {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/top_level.txt +0 -0
@@ -1,398 +1,401 @@
1
- from dateutil.relativedelta import MO
2
- from pandas import DateOffset, Timestamp
3
- from pandas.tseries.holiday import Holiday, sunday_to_monday
4
-
5
- from pandas_market_calendars.holidays.jpx_equinox import (
6
- autumnal_citizen_dates,
7
- autumnal_equinox,
8
- vernal_equinox,
9
- )
10
-
11
- AscensionDays = [
12
- Timestamp("2019-04-30", tz="UTC"), # National Holiday
13
- Timestamp("2019-05-01", tz="UTC"), # Ascension Day
14
- Timestamp("2019-05-02", tz="UTC"), # National Holiday
15
- ]
16
-
17
- MarriageDays = [
18
- Timestamp("1959-04-10", tz="UTC"), # Akihito
19
- Timestamp("1993-06-09", tz="UTC"), # Naruhito
20
- ]
21
-
22
- FuneralShowa = [
23
- Timestamp("1989-02-24", tz="UTC"),
24
- ]
25
-
26
- EnthronementDays = [
27
- Timestamp("1990-11-12", tz="UTC"), # Akihito
28
- Timestamp("2019-10-22", tz="UTC"), # Naruhito
29
- ]
30
-
31
- AutumnalCitizenDates = autumnal_citizen_dates()
32
-
33
- NoN225IndexPrices = [
34
- # source: https://indexes.nikkei.co.jp/en/nkave/archives/data
35
- # TODO: determine if these dates were also national holidays
36
- Timestamp("1951-02-15", tz="UTC"),
37
- Timestamp("1953-02-09", tz="UTC"),
38
- Timestamp("1954-10-26", tz="UTC"),
39
- Timestamp("1959-04-10", tz="UTC"),
40
- ]
41
-
42
- EquityTradingSystemFailure = [
43
- # The Failure of Equity Trading System on October 1, 2020
44
- # source: https://www.jpx.co.jp/english/corporate/news/news-releases/0060/20201019-01.html
45
- Timestamp("2020-10-01", tz="UTC"),
46
- ]
47
-
48
- JapanNewYearsDay2 = Holiday(
49
- name="New Year's Day",
50
- month=1,
51
- day=2,
52
- observance=sunday_to_monday,
53
- )
54
-
55
- JapanNewYearsDay3 = Holiday(
56
- name="New Year's Day",
57
- month=1,
58
- day=3,
59
- )
60
-
61
- JapanComingOfAgeDay1951To1973 = Holiday(
62
- name="Coming of Age Day",
63
- month=1,
64
- day=15,
65
- start_date=Timestamp(1951, 1, 1),
66
- end_date=Timestamp(1973, 12, 31),
67
- )
68
-
69
- JapanComingOfAgeDay1974To1999 = Holiday(
70
- name="Coming of Age Day",
71
- month=1,
72
- day=15,
73
- start_date=Timestamp(1974, 1, 1),
74
- end_date=Timestamp(1999, 12, 31),
75
- observance=sunday_to_monday,
76
- )
77
-
78
- JapanComingOfAgeDay = Holiday( # second monday of january
79
- name="Coming of Age Day",
80
- month=1,
81
- day=1,
82
- start_date=Timestamp(2000, 1, 1),
83
- offset=DateOffset(weekday=MO(2)),
84
- )
85
-
86
- JapanNationalFoundationDay1969To1973 = Holiday(
87
- name="National Foundation Day",
88
- month=2,
89
- day=11,
90
- start_date=Timestamp(1969, 1, 1), # also held 1872 to 1948 as Kigen-setsu
91
- end_date=Timestamp(1973, 12, 31),
92
- )
93
-
94
- JapanNationalFoundationDay = Holiday(
95
- name="National Foundation Day",
96
- month=2,
97
- day=11,
98
- start_date=Timestamp(1974, 1, 1),
99
- observance=sunday_to_monday,
100
- )
101
-
102
- JapanEmperorsBirthday = Holiday(
103
- name="The Emperor's Birthday",
104
- month=2,
105
- day=23,
106
- start_date=Timestamp(2020, 1, 1),
107
- observance=sunday_to_monday,
108
- )
109
-
110
- JapanVernalEquinox = Holiday(
111
- name="Vernal Equinox", month=3, day=20, observance=vernal_equinox
112
- )
113
-
114
- JapanShowaDayUntil1972 = Holiday(
115
- name="Showa Day", month=4, day=29, end_date=Timestamp(1972, 12, 31) # 1965
116
- )
117
-
118
- JapanShowaDay = Holiday(
119
- name="Showa Day",
120
- month=4,
121
- day=29,
122
- start_date=Timestamp(1973, 1, 1),
123
- observance=sunday_to_monday,
124
- )
125
-
126
- JapanConstitutionMemorialDayUntil1972 = Holiday(
127
- name="Constitution Memorial Day",
128
- month=5,
129
- day=3,
130
- start_date=Timestamp(1948, 1, 1),
131
- end_date=Timestamp(1972, 12, 31),
132
- )
133
-
134
- JapanConstitutionMemorialDay = Holiday(
135
- name="Constitution Memorial Day",
136
- month=5,
137
- day=3,
138
- start_date=Timestamp(1973, 1, 1),
139
- observance=sunday_to_monday,
140
- )
141
-
142
- JapanGreeneryDay = Holiday(
143
- name="Greenery Day", # prior to 1985 was a Citizen's Day
144
- month=5,
145
- day=4,
146
- start_date=Timestamp(1985, 1, 1),
147
- observance=sunday_to_monday,
148
- )
149
-
150
- JapanChildrensDayUntil1972 = Holiday(
151
- name="Children's Day",
152
- month=5,
153
- day=5,
154
- start_date=Timestamp(1948, 1, 1),
155
- end_date=Timestamp(1972, 12, 31),
156
- )
157
-
158
- JapanChildrensDay = Holiday(
159
- name="Children's Day",
160
- month=5,
161
- day=5,
162
- start_date=Timestamp(1973, 1, 1),
163
- observance=sunday_to_monday,
164
- )
165
-
166
- # starting in 2007, there can be a holiday on May 6 if May 3 or 4 falls on a Sunday
167
- JapanGoldenWeekBonusDay = Holiday(
168
- name="Golden Week Bonus Day",
169
- month=5,
170
- day=6,
171
- start_date=Timestamp(2007, 1, 1),
172
- days_of_week=(1, 2),
173
- )
174
-
175
- JapanMarineDay1996To2002 = Holiday(
176
- name="Marine Day",
177
- month=7,
178
- day=20,
179
- start_date=Timestamp(1996, 1, 1),
180
- end_date=Timestamp(2002, 12, 31),
181
- observance=sunday_to_monday,
182
- )
183
-
184
- JapanMarineDay2003To2019 = Holiday(
185
- name="Marine Day",
186
- month=7,
187
- day=1,
188
- start_date=Timestamp(2003, 1, 1),
189
- end_date=Timestamp(2019, 12, 31),
190
- offset=DateOffset(weekday=MO(3)),
191
- )
192
-
193
- JapanMarineDay2020 = Holiday(
194
- name="Marine Day", # shift for Olympics
195
- year=2020,
196
- month=7,
197
- day=23,
198
- )
199
-
200
- JapanMarineDay2021 = Holiday(
201
- name="Marine Day",
202
- # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
203
- year=2021,
204
- month=7,
205
- day=22,
206
- )
207
-
208
- JapanMarineDay = Holiday(
209
- name="Marine Day",
210
- month=7,
211
- day=1,
212
- start_date=Timestamp(2022, 1, 1),
213
- offset=DateOffset(weekday=MO(3)),
214
- )
215
-
216
- JapanMountainDay2016to2019 = Holiday(
217
- name="Mountain Day",
218
- month=8,
219
- day=11,
220
- start_date=Timestamp(2016, 1, 1),
221
- end_date=Timestamp(2019, 12, 31),
222
- observance=sunday_to_monday,
223
- )
224
-
225
- JapanMountainDay2020 = Holiday(
226
- name="Mountain Day", # shift for Olympics
227
- year=2020,
228
- month=8,
229
- day=10,
230
- )
231
-
232
- JapanMountainDay2021 = Holiday(
233
- name="Mountain Day",
234
- # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
235
- year=2021,
236
- month=8,
237
- day=8,
238
- )
239
-
240
- JapanMountainDay2021NextDay = Holiday(
241
- name="Mountain Day",
242
- # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
243
- year=2021,
244
- month=8,
245
- day=9,
246
- )
247
-
248
- JapanMountainDay = Holiday(
249
- name="Mountain Day",
250
- month=8,
251
- day=11,
252
- start_date=Timestamp(2022, 1, 1),
253
- observance=sunday_to_monday,
254
- )
255
-
256
- JapanRespectForTheAgedDay1966To1972 = Holiday(
257
- name="Respect for the Aged Day",
258
- month=9,
259
- day=15,
260
- start_date=Timestamp(1966, 1, 1),
261
- end_date=Timestamp(1972, 12, 31),
262
- )
263
-
264
- JapanRespectForTheAgedDay1973To2002 = Holiday(
265
- name="Respect for the Aged Day",
266
- month=9,
267
- day=15,
268
- start_date=Timestamp(1973, 1, 1),
269
- end_date=Timestamp(2002, 12, 31),
270
- observance=sunday_to_monday,
271
- )
272
-
273
- JapanRespectForTheAgedDay = Holiday(
274
- name="Respect for the Aged Day",
275
- month=9,
276
- day=1,
277
- start_date=Timestamp(2003, 1, 1),
278
- offset=DateOffset(weekday=MO(3)),
279
- )
280
-
281
- # Citizen's Day added in some years between Respect for Aged and Autumnal Equinox
282
-
283
- JapanAutumnalEquinox = Holiday(
284
- name="Autumnal Equinox",
285
- month=9,
286
- day=22,
287
- observance=autumnal_equinox,
288
- )
289
-
290
- JapanHealthAndSportsDay1966To1972 = Holiday(
291
- name="Health and Sports Day",
292
- month=10,
293
- day=10,
294
- start_date=Timestamp(1966, 1, 1),
295
- end_date=Timestamp(1972, 12, 31),
296
- )
297
-
298
- JapanHealthAndSportsDay1973To1999 = Holiday(
299
- name="Health and Sports Day",
300
- month=10,
301
- day=10,
302
- start_date=Timestamp(1973, 1, 1),
303
- end_date=Timestamp(1999, 12, 31),
304
- observance=sunday_to_monday,
305
- )
306
-
307
- JapanHealthAndSportsDay2000To2019 = Holiday(
308
- name="Health and Sports Day",
309
- month=10,
310
- day=1,
311
- start_date=Timestamp(2000, 1, 1),
312
- end_date=Timestamp(2019, 12, 31),
313
- offset=DateOffset(weekday=MO(2)),
314
- )
315
-
316
- JapanSportsDay2020 = Holiday(
317
- name="Sports Day", # shift for Olympics
318
- year=2020,
319
- month=7,
320
- day=24,
321
- )
322
-
323
- JapanSportsDay2021 = Holiday(
324
- name="Sports Day",
325
- # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
326
- year=2021,
327
- month=7,
328
- day=23,
329
- )
330
-
331
- JapanSportsDay = Holiday(
332
- name="Sports Day",
333
- month=10,
334
- day=1,
335
- start_date=Timestamp(2022, 1, 1),
336
- offset=DateOffset(weekday=MO(2)),
337
- )
338
-
339
- JapanCultureDayUntil1972 = Holiday(
340
- name="Culture Day", # prior to 1948 Emperor Meiji's Birthday
341
- month=11,
342
- day=3,
343
- start_date=Timestamp(1948, 1, 1),
344
- end_date=Timestamp(1972, 12, 31),
345
- )
346
-
347
- JapanCultureDay = Holiday(
348
- name="Culture Day",
349
- month=11,
350
- day=3,
351
- start_date=Timestamp(1973, 1, 1),
352
- observance=sunday_to_monday,
353
- )
354
-
355
- JapanLaborThanksgivingDayUntil1972 = Holiday(
356
- name="Labor Thanksgiving Day", # prior to 1948 harvest festival Niiname-sai
357
- month=11,
358
- day=23,
359
- end_date=Timestamp(1972, 12, 31),
360
- )
361
-
362
- JapanLaborThanksgivingDay = Holiday(
363
- name="Labor Thanksgiving Day",
364
- month=11,
365
- day=23,
366
- start_date=Timestamp(1973, 1, 1),
367
- observance=sunday_to_monday,
368
- )
369
-
370
- JapanEmperorAkahitosBirthday = Holiday(
371
- name="Emperor Akahito's Birthday",
372
- month=12,
373
- day=23,
374
- start_date=Timestamp(1990, 1, 1),
375
- end_date=Timestamp(2018, 12, 31),
376
- observance=sunday_to_monday,
377
- )
378
-
379
- JapanDecember29Until1988 = Holiday(
380
- name="Closed Decenber 29",
381
- month=12,
382
- day=29,
383
- end_date=Timestamp(1988, 12, 31),
384
- )
385
-
386
- JapanDecember30Until1988 = Holiday(
387
- name="Closed December 30",
388
- month=12,
389
- day=30,
390
- end_date=Timestamp(1988, 12, 31),
391
- )
392
-
393
- JapanBeforeNewYearsDay = Holiday(
394
- name="Before New Year's Day", # prior to 1948 harvest festival Niname-sai
395
- month=12,
396
- day=31,
397
- observance=sunday_to_monday,
398
- )
1
+ from dateutil.relativedelta import MO
2
+ from pandas import DateOffset, Timestamp
3
+ from pandas.tseries.holiday import Holiday, sunday_to_monday
4
+
5
+ from pandas_market_calendars.holidays.jpx_equinox import (
6
+ autumnal_citizen_dates,
7
+ autumnal_equinox,
8
+ vernal_equinox,
9
+ )
10
+
11
+ AscensionDays = [
12
+ Timestamp("2019-04-30", tz="UTC"), # National Holiday
13
+ Timestamp("2019-05-01", tz="UTC"), # Ascension Day
14
+ Timestamp("2019-05-02", tz="UTC"), # National Holiday
15
+ ]
16
+
17
+ MarriageDays = [
18
+ Timestamp("1959-04-10", tz="UTC"), # Akihito
19
+ Timestamp("1993-06-09", tz="UTC"), # Naruhito
20
+ ]
21
+
22
+ FuneralShowa = [
23
+ Timestamp("1989-02-24", tz="UTC"),
24
+ ]
25
+
26
+ EnthronementDays = [
27
+ Timestamp("1990-11-12", tz="UTC"), # Akihito
28
+ Timestamp("2019-10-22", tz="UTC"), # Naruhito
29
+ ]
30
+
31
+ AutumnalCitizenDates = autumnal_citizen_dates()
32
+
33
+ NoN225IndexPrices = [
34
+ # source: https://indexes.nikkei.co.jp/en/nkave/archives/data
35
+ # TODO: determine if these dates were also national holidays
36
+ Timestamp("1951-02-15", tz="UTC"),
37
+ Timestamp("1953-02-09", tz="UTC"),
38
+ Timestamp("1954-10-26", tz="UTC"),
39
+ Timestamp("1959-04-10", tz="UTC"),
40
+ ]
41
+
42
+ EquityTradingSystemFailure = [
43
+ # The Failure of Equity Trading System on October 1, 2020
44
+ # source: https://www.jpx.co.jp/english/corporate/news/news-releases/0060/20201019-01.html
45
+ Timestamp("2020-10-01", tz="UTC"),
46
+ ]
47
+
48
+ JapanNewYearsDay2 = Holiday(
49
+ name="New Year's Day",
50
+ month=1,
51
+ day=2,
52
+ observance=sunday_to_monday,
53
+ )
54
+
55
+ JapanNewYearsDay3 = Holiday(
56
+ name="New Year's Day",
57
+ month=1,
58
+ day=3,
59
+ )
60
+
61
+ JapanComingOfAgeDay1951To1973 = Holiday(
62
+ name="Coming of Age Day",
63
+ month=1,
64
+ day=15,
65
+ start_date=Timestamp(1951, 1, 1),
66
+ end_date=Timestamp(1973, 12, 31),
67
+ )
68
+
69
+ JapanComingOfAgeDay1974To1999 = Holiday(
70
+ name="Coming of Age Day",
71
+ month=1,
72
+ day=15,
73
+ start_date=Timestamp(1974, 1, 1),
74
+ end_date=Timestamp(1999, 12, 31),
75
+ observance=sunday_to_monday,
76
+ )
77
+
78
+ JapanComingOfAgeDay = Holiday( # second monday of january
79
+ name="Coming of Age Day",
80
+ month=1,
81
+ day=1,
82
+ start_date=Timestamp(2000, 1, 1),
83
+ offset=DateOffset(weekday=MO(2)),
84
+ )
85
+
86
+ JapanNationalFoundationDay1969To1973 = Holiday(
87
+ name="National Foundation Day",
88
+ month=2,
89
+ day=11,
90
+ start_date=Timestamp(1969, 1, 1), # also held 1872 to 1948 as Kigen-setsu
91
+ end_date=Timestamp(1973, 12, 31),
92
+ )
93
+
94
+ JapanNationalFoundationDay = Holiday(
95
+ name="National Foundation Day",
96
+ month=2,
97
+ day=11,
98
+ start_date=Timestamp(1974, 1, 1),
99
+ observance=sunday_to_monday,
100
+ )
101
+
102
+ JapanEmperorsBirthday = Holiday(
103
+ name="The Emperor's Birthday",
104
+ month=2,
105
+ day=23,
106
+ start_date=Timestamp(2020, 1, 1),
107
+ observance=sunday_to_monday,
108
+ )
109
+
110
+ JapanVernalEquinox = Holiday(
111
+ name="Vernal Equinox", month=3, day=20, observance=vernal_equinox
112
+ )
113
+
114
+ JapanShowaDayUntil1972 = Holiday(
115
+ name="Showa Day",
116
+ month=4,
117
+ day=29,
118
+ end_date=Timestamp(1972, 12, 31), # 1965
119
+ )
120
+
121
+ JapanShowaDay = Holiday(
122
+ name="Showa Day",
123
+ month=4,
124
+ day=29,
125
+ start_date=Timestamp(1973, 1, 1),
126
+ observance=sunday_to_monday,
127
+ )
128
+
129
+ JapanConstitutionMemorialDayUntil1972 = Holiday(
130
+ name="Constitution Memorial Day",
131
+ month=5,
132
+ day=3,
133
+ start_date=Timestamp(1948, 1, 1),
134
+ end_date=Timestamp(1972, 12, 31),
135
+ )
136
+
137
+ JapanConstitutionMemorialDay = Holiday(
138
+ name="Constitution Memorial Day",
139
+ month=5,
140
+ day=3,
141
+ start_date=Timestamp(1973, 1, 1),
142
+ observance=sunday_to_monday,
143
+ )
144
+
145
+ JapanGreeneryDay = Holiday(
146
+ name="Greenery Day", # prior to 1985 was a Citizen's Day
147
+ month=5,
148
+ day=4,
149
+ start_date=Timestamp(1985, 1, 1),
150
+ observance=sunday_to_monday,
151
+ )
152
+
153
+ JapanChildrensDayUntil1972 = Holiday(
154
+ name="Children's Day",
155
+ month=5,
156
+ day=5,
157
+ start_date=Timestamp(1948, 1, 1),
158
+ end_date=Timestamp(1972, 12, 31),
159
+ )
160
+
161
+ JapanChildrensDay = Holiday(
162
+ name="Children's Day",
163
+ month=5,
164
+ day=5,
165
+ start_date=Timestamp(1973, 1, 1),
166
+ observance=sunday_to_monday,
167
+ )
168
+
169
+ # starting in 2007, there can be a holiday on May 6 if May 3 or 4 falls on a Sunday
170
+ JapanGoldenWeekBonusDay = Holiday(
171
+ name="Golden Week Bonus Day",
172
+ month=5,
173
+ day=6,
174
+ start_date=Timestamp(2007, 1, 1),
175
+ days_of_week=(1, 2),
176
+ )
177
+
178
+ JapanMarineDay1996To2002 = Holiday(
179
+ name="Marine Day",
180
+ month=7,
181
+ day=20,
182
+ start_date=Timestamp(1996, 1, 1),
183
+ end_date=Timestamp(2002, 12, 31),
184
+ observance=sunday_to_monday,
185
+ )
186
+
187
+ JapanMarineDay2003To2019 = Holiday(
188
+ name="Marine Day",
189
+ month=7,
190
+ day=1,
191
+ start_date=Timestamp(2003, 1, 1),
192
+ end_date=Timestamp(2019, 12, 31),
193
+ offset=DateOffset(weekday=MO(3)),
194
+ )
195
+
196
+ JapanMarineDay2020 = Holiday(
197
+ name="Marine Day", # shift for Olympics
198
+ year=2020,
199
+ month=7,
200
+ day=23,
201
+ )
202
+
203
+ JapanMarineDay2021 = Holiday(
204
+ name="Marine Day",
205
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
206
+ year=2021,
207
+ month=7,
208
+ day=22,
209
+ )
210
+
211
+ JapanMarineDay = Holiday(
212
+ name="Marine Day",
213
+ month=7,
214
+ day=1,
215
+ start_date=Timestamp(2022, 1, 1),
216
+ offset=DateOffset(weekday=MO(3)),
217
+ )
218
+
219
+ JapanMountainDay2016to2019 = Holiday(
220
+ name="Mountain Day",
221
+ month=8,
222
+ day=11,
223
+ start_date=Timestamp(2016, 1, 1),
224
+ end_date=Timestamp(2019, 12, 31),
225
+ observance=sunday_to_monday,
226
+ )
227
+
228
+ JapanMountainDay2020 = Holiday(
229
+ name="Mountain Day", # shift for Olympics
230
+ year=2020,
231
+ month=8,
232
+ day=10,
233
+ )
234
+
235
+ JapanMountainDay2021 = Holiday(
236
+ name="Mountain Day",
237
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
238
+ year=2021,
239
+ month=8,
240
+ day=8,
241
+ )
242
+
243
+ JapanMountainDay2021NextDay = Holiday(
244
+ name="Mountain Day",
245
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
246
+ year=2021,
247
+ month=8,
248
+ day=9,
249
+ )
250
+
251
+ JapanMountainDay = Holiday(
252
+ name="Mountain Day",
253
+ month=8,
254
+ day=11,
255
+ start_date=Timestamp(2022, 1, 1),
256
+ observance=sunday_to_monday,
257
+ )
258
+
259
+ JapanRespectForTheAgedDay1966To1972 = Holiday(
260
+ name="Respect for the Aged Day",
261
+ month=9,
262
+ day=15,
263
+ start_date=Timestamp(1966, 1, 1),
264
+ end_date=Timestamp(1972, 12, 31),
265
+ )
266
+
267
+ JapanRespectForTheAgedDay1973To2002 = Holiday(
268
+ name="Respect for the Aged Day",
269
+ month=9,
270
+ day=15,
271
+ start_date=Timestamp(1973, 1, 1),
272
+ end_date=Timestamp(2002, 12, 31),
273
+ observance=sunday_to_monday,
274
+ )
275
+
276
+ JapanRespectForTheAgedDay = Holiday(
277
+ name="Respect for the Aged Day",
278
+ month=9,
279
+ day=1,
280
+ start_date=Timestamp(2003, 1, 1),
281
+ offset=DateOffset(weekday=MO(3)),
282
+ )
283
+
284
+ # Citizen's Day added in some years between Respect for Aged and Autumnal Equinox
285
+
286
+ JapanAutumnalEquinox = Holiday(
287
+ name="Autumnal Equinox",
288
+ month=9,
289
+ day=22,
290
+ observance=autumnal_equinox,
291
+ )
292
+
293
+ JapanHealthAndSportsDay1966To1972 = Holiday(
294
+ name="Health and Sports Day",
295
+ month=10,
296
+ day=10,
297
+ start_date=Timestamp(1966, 1, 1),
298
+ end_date=Timestamp(1972, 12, 31),
299
+ )
300
+
301
+ JapanHealthAndSportsDay1973To1999 = Holiday(
302
+ name="Health and Sports Day",
303
+ month=10,
304
+ day=10,
305
+ start_date=Timestamp(1973, 1, 1),
306
+ end_date=Timestamp(1999, 12, 31),
307
+ observance=sunday_to_monday,
308
+ )
309
+
310
+ JapanHealthAndSportsDay2000To2019 = Holiday(
311
+ name="Health and Sports Day",
312
+ month=10,
313
+ day=1,
314
+ start_date=Timestamp(2000, 1, 1),
315
+ end_date=Timestamp(2019, 12, 31),
316
+ offset=DateOffset(weekday=MO(2)),
317
+ )
318
+
319
+ JapanSportsDay2020 = Holiday(
320
+ name="Sports Day", # shift for Olympics
321
+ year=2020,
322
+ month=7,
323
+ day=24,
324
+ )
325
+
326
+ JapanSportsDay2021 = Holiday(
327
+ name="Sports Day",
328
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
329
+ year=2021,
330
+ month=7,
331
+ day=23,
332
+ )
333
+
334
+ JapanSportsDay = Holiday(
335
+ name="Sports Day",
336
+ month=10,
337
+ day=1,
338
+ start_date=Timestamp(2022, 1, 1),
339
+ offset=DateOffset(weekday=MO(2)),
340
+ )
341
+
342
+ JapanCultureDayUntil1972 = Holiday(
343
+ name="Culture Day", # prior to 1948 Emperor Meiji's Birthday
344
+ month=11,
345
+ day=3,
346
+ start_date=Timestamp(1948, 1, 1),
347
+ end_date=Timestamp(1972, 12, 31),
348
+ )
349
+
350
+ JapanCultureDay = Holiday(
351
+ name="Culture Day",
352
+ month=11,
353
+ day=3,
354
+ start_date=Timestamp(1973, 1, 1),
355
+ observance=sunday_to_monday,
356
+ )
357
+
358
+ JapanLaborThanksgivingDayUntil1972 = Holiday(
359
+ name="Labor Thanksgiving Day", # prior to 1948 harvest festival Niiname-sai
360
+ month=11,
361
+ day=23,
362
+ end_date=Timestamp(1972, 12, 31),
363
+ )
364
+
365
+ JapanLaborThanksgivingDay = Holiday(
366
+ name="Labor Thanksgiving Day",
367
+ month=11,
368
+ day=23,
369
+ start_date=Timestamp(1973, 1, 1),
370
+ observance=sunday_to_monday,
371
+ )
372
+
373
+ JapanEmperorAkahitosBirthday = Holiday(
374
+ name="Emperor Akahito's Birthday",
375
+ month=12,
376
+ day=23,
377
+ start_date=Timestamp(1990, 1, 1),
378
+ end_date=Timestamp(2018, 12, 31),
379
+ observance=sunday_to_monday,
380
+ )
381
+
382
+ JapanDecember29Until1988 = Holiday(
383
+ name="Closed Decenber 29",
384
+ month=12,
385
+ day=29,
386
+ end_date=Timestamp(1988, 12, 31),
387
+ )
388
+
389
+ JapanDecember30Until1988 = Holiday(
390
+ name="Closed December 30",
391
+ month=12,
392
+ day=30,
393
+ end_date=Timestamp(1988, 12, 31),
394
+ )
395
+
396
+ JapanBeforeNewYearsDay = Holiday(
397
+ name="Before New Year's Day", # prior to 1948 harvest festival Niname-sai
398
+ month=12,
399
+ day=31,
400
+ observance=sunday_to_monday,
401
+ )