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

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