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.
- pandas_market_calendars/__init__.py +38 -37
- pandas_market_calendars/calendar_registry.py +53 -48
- pandas_market_calendars/calendar_utils.py +261 -225
- pandas_market_calendars/calendars/asx.py +66 -63
- pandas_market_calendars/calendars/bmf.py +206 -227
- pandas_market_calendars/calendars/bse.py +407 -409
- pandas_market_calendars/calendars/cboe.py +145 -115
- pandas_market_calendars/calendars/cme.py +402 -240
- pandas_market_calendars/calendars/cme_globex_agriculture.py +126 -103
- pandas_market_calendars/calendars/cme_globex_base.py +119 -103
- pandas_market_calendars/calendars/cme_globex_crypto.py +160 -147
- pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -138
- pandas_market_calendars/calendars/cme_globex_equities.py +123 -104
- pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -113
- pandas_market_calendars/calendars/cme_globex_fx.py +101 -78
- pandas_market_calendars/calendars/eurex.py +139 -119
- pandas_market_calendars/calendars/eurex_fixed_income.py +98 -0
- pandas_market_calendars/calendars/hkex.py +426 -408
- pandas_market_calendars/calendars/ice.py +81 -65
- pandas_market_calendars/calendars/iex.py +112 -98
- pandas_market_calendars/calendars/jpx.py +109 -103
- pandas_market_calendars/calendars/lse.py +114 -91
- pandas_market_calendars/calendars/mirror.py +130 -114
- pandas_market_calendars/calendars/nyse.py +1324 -1127
- pandas_market_calendars/calendars/ose.py +116 -150
- pandas_market_calendars/calendars/sifma.py +350 -297
- pandas_market_calendars/calendars/six.py +132 -114
- pandas_market_calendars/calendars/sse.py +311 -290
- pandas_market_calendars/calendars/tase.py +197 -195
- pandas_market_calendars/calendars/tsx.py +181 -159
- pandas_market_calendars/class_registry.py +22 -16
- pandas_market_calendars/holidays/cme.py +385 -340
- pandas_market_calendars/holidays/cme_globex.py +214 -198
- pandas_market_calendars/holidays/cn.py +1455 -1436
- pandas_market_calendars/holidays/jp.py +398 -396
- pandas_market_calendars/holidays/jpx_equinox.py +453 -95
- pandas_market_calendars/holidays/nyse.py +1531 -1472
- pandas_market_calendars/holidays/oz.py +63 -65
- pandas_market_calendars/holidays/sifma.py +338 -321
- pandas_market_calendars/holidays/uk.py +32 -26
- pandas_market_calendars/holidays/us.py +376 -360
- pandas_market_calendars/market_calendar.py +895 -789
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/METADATA +7 -5
- pandas_market_calendars-4.3.3.dist-info/RECORD +50 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/WHEEL +1 -1
- pandas_market_calendars-4.3.1.dist-info/RECORD +0 -49
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/LICENSE +0 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/NOTICE +0 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/top_level.txt +0 -0
@@ -15,103 +15,459 @@ import pandas as pd
|
|
15
15
|
from pandas.tseries.holiday import sunday_to_monday
|
16
16
|
|
17
17
|
vernal_year_to_march_mapping = {
|
18
|
-
1875: 21,
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
18
|
+
1875: 21,
|
19
|
+
1876: 20,
|
20
|
+
1877: 20,
|
21
|
+
1878: 21,
|
22
|
+
1879: 21,
|
23
|
+
1880: 20,
|
24
|
+
1881: 20,
|
25
|
+
1882: 21,
|
26
|
+
1883: 21,
|
27
|
+
1884: 20,
|
28
|
+
1885: 20,
|
29
|
+
1886: 21,
|
30
|
+
1887: 21,
|
31
|
+
1888: 20,
|
32
|
+
1889: 20,
|
33
|
+
1890: 21,
|
34
|
+
1891: 21,
|
35
|
+
1892: 20,
|
36
|
+
1893: 20,
|
37
|
+
1894: 20,
|
38
|
+
1895: 21,
|
39
|
+
1896: 20,
|
40
|
+
1897: 20,
|
41
|
+
1898: 20,
|
42
|
+
1899: 21,
|
43
|
+
1900: 21,
|
44
|
+
1901: 21,
|
45
|
+
1902: 21,
|
46
|
+
1903: 22,
|
47
|
+
1904: 21,
|
48
|
+
1905: 21,
|
49
|
+
1906: 21,
|
50
|
+
1907: 22,
|
51
|
+
1908: 21,
|
52
|
+
1909: 21,
|
53
|
+
1910: 21,
|
54
|
+
1911: 22,
|
55
|
+
1912: 21,
|
56
|
+
1913: 21,
|
57
|
+
1914: 21,
|
58
|
+
1915: 22,
|
59
|
+
1916: 21,
|
60
|
+
1917: 21,
|
61
|
+
1918: 21,
|
62
|
+
1919: 22,
|
63
|
+
1920: 21,
|
64
|
+
1921: 21,
|
65
|
+
1922: 21,
|
66
|
+
1923: 22,
|
67
|
+
1924: 21,
|
68
|
+
1925: 21,
|
69
|
+
1926: 21,
|
70
|
+
1927: 21,
|
71
|
+
1928: 21,
|
72
|
+
1929: 21,
|
73
|
+
1930: 21,
|
74
|
+
1931: 21,
|
75
|
+
1932: 21,
|
76
|
+
1933: 21,
|
77
|
+
1934: 21,
|
78
|
+
1935: 21,
|
79
|
+
1936: 21,
|
80
|
+
1937: 21,
|
81
|
+
1938: 21,
|
82
|
+
1939: 21,
|
83
|
+
1940: 21,
|
84
|
+
1941: 21,
|
85
|
+
1942: 21,
|
86
|
+
1943: 21,
|
87
|
+
1944: 21,
|
88
|
+
1945: 21,
|
89
|
+
1946: 21,
|
90
|
+
1947: 21,
|
91
|
+
1948: 21,
|
92
|
+
1949: 21,
|
93
|
+
1950: 21,
|
94
|
+
1951: 21,
|
95
|
+
1952: 21,
|
96
|
+
1953: 21,
|
97
|
+
1954: 21,
|
98
|
+
1955: 21,
|
99
|
+
1956: 21,
|
100
|
+
1957: 21,
|
101
|
+
1958: 21,
|
102
|
+
1959: 21,
|
103
|
+
1960: 20,
|
104
|
+
1961: 21,
|
105
|
+
1962: 21,
|
106
|
+
1963: 21,
|
107
|
+
1964: 20,
|
108
|
+
1965: 21,
|
109
|
+
1966: 21,
|
110
|
+
1967: 21,
|
111
|
+
1968: 20,
|
112
|
+
1969: 21,
|
113
|
+
1970: 21,
|
114
|
+
1971: 21,
|
115
|
+
1972: 20,
|
116
|
+
1973: 21,
|
117
|
+
1974: 21,
|
118
|
+
1975: 21,
|
119
|
+
1976: 20,
|
120
|
+
1977: 21,
|
121
|
+
1978: 21,
|
122
|
+
1979: 21,
|
123
|
+
1980: 20,
|
124
|
+
1981: 21,
|
125
|
+
1982: 21,
|
126
|
+
1983: 21,
|
127
|
+
1984: 20,
|
128
|
+
1985: 21,
|
129
|
+
1986: 21,
|
130
|
+
1987: 21,
|
131
|
+
1988: 20,
|
132
|
+
1989: 21,
|
133
|
+
1990: 21,
|
134
|
+
1991: 21,
|
135
|
+
1992: 20,
|
136
|
+
1993: 20,
|
137
|
+
1994: 21,
|
138
|
+
1995: 21,
|
139
|
+
1996: 20,
|
140
|
+
1997: 20,
|
141
|
+
1998: 21,
|
142
|
+
1999: 21,
|
143
|
+
2000: 20,
|
144
|
+
2001: 20,
|
145
|
+
2002: 21,
|
146
|
+
2003: 21,
|
147
|
+
2004: 20,
|
148
|
+
2005: 20,
|
149
|
+
2006: 21,
|
150
|
+
2007: 21,
|
151
|
+
2008: 20,
|
152
|
+
2009: 20,
|
153
|
+
2010: 21,
|
154
|
+
2011: 21,
|
155
|
+
2012: 20,
|
156
|
+
2013: 20,
|
157
|
+
2014: 21,
|
158
|
+
2015: 21,
|
159
|
+
2016: 20,
|
160
|
+
2017: 20,
|
161
|
+
2018: 21,
|
162
|
+
2019: 21,
|
163
|
+
2020: 20,
|
164
|
+
2021: 20,
|
165
|
+
2022: 21,
|
166
|
+
2023: 21,
|
167
|
+
2024: 20,
|
168
|
+
2025: 20,
|
169
|
+
2026: 20,
|
170
|
+
2027: 21,
|
171
|
+
2028: 20,
|
172
|
+
2029: 20,
|
173
|
+
2030: 20,
|
174
|
+
2031: 21,
|
175
|
+
2032: 20,
|
176
|
+
2033: 20,
|
177
|
+
2034: 20,
|
178
|
+
2035: 21,
|
179
|
+
2036: 20,
|
180
|
+
2037: 20,
|
181
|
+
2038: 20,
|
182
|
+
2039: 21,
|
183
|
+
2040: 20,
|
184
|
+
2041: 20,
|
185
|
+
2042: 20,
|
186
|
+
2043: 21,
|
187
|
+
2044: 20,
|
188
|
+
2045: 20,
|
189
|
+
2046: 20,
|
190
|
+
2047: 21,
|
191
|
+
2048: 20,
|
192
|
+
2049: 20,
|
193
|
+
2050: 20,
|
194
|
+
2051: 21,
|
195
|
+
2052: 20,
|
196
|
+
2053: 20,
|
197
|
+
2054: 20,
|
198
|
+
2055: 21,
|
199
|
+
2056: 20,
|
200
|
+
2057: 20,
|
201
|
+
2058: 20,
|
202
|
+
2059: 20,
|
203
|
+
2060: 20,
|
204
|
+
2061: 20,
|
205
|
+
2062: 20,
|
206
|
+
2063: 20,
|
207
|
+
2064: 20,
|
208
|
+
2065: 20,
|
209
|
+
2066: 20,
|
210
|
+
2067: 20,
|
211
|
+
2068: 20,
|
212
|
+
2069: 20,
|
213
|
+
2070: 20,
|
214
|
+
2071: 20,
|
215
|
+
2072: 20,
|
216
|
+
2073: 20,
|
217
|
+
2074: 20,
|
218
|
+
2075: 20,
|
219
|
+
2076: 20,
|
220
|
+
2077: 20,
|
221
|
+
2078: 20,
|
222
|
+
2079: 20,
|
223
|
+
2080: 20,
|
224
|
+
2081: 20,
|
225
|
+
2082: 20,
|
226
|
+
2083: 20,
|
227
|
+
2084: 20,
|
228
|
+
2085: 20,
|
229
|
+
2086: 20,
|
230
|
+
2087: 20,
|
231
|
+
2088: 20,
|
232
|
+
2089: 20,
|
233
|
+
2090: 20,
|
234
|
+
2091: 20,
|
235
|
+
2092: 19,
|
236
|
+
2093: 20,
|
237
|
+
2094: 20,
|
238
|
+
2095: 20,
|
239
|
+
2096: 19,
|
240
|
+
2097: 20,
|
241
|
+
2098: 20,
|
242
|
+
2099: 20,
|
65
243
|
}
|
66
244
|
|
67
245
|
autumnal_year_to_september_mapping = {
|
68
|
-
1875: 23,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
246
|
+
1875: 23,
|
247
|
+
1876: 23,
|
248
|
+
1877: 23,
|
249
|
+
1878: 23,
|
250
|
+
1879: 23,
|
251
|
+
1880: 23,
|
252
|
+
1881: 23,
|
253
|
+
1882: 23,
|
254
|
+
1883: 23,
|
255
|
+
1884: 23,
|
256
|
+
1885: 23,
|
257
|
+
1886: 23,
|
258
|
+
1887: 23,
|
259
|
+
1888: 22,
|
260
|
+
1889: 23,
|
261
|
+
1890: 23,
|
262
|
+
1891: 23,
|
263
|
+
1892: 22,
|
264
|
+
1893: 23,
|
265
|
+
1894: 23,
|
266
|
+
1895: 23,
|
267
|
+
1896: 22,
|
268
|
+
1897: 23,
|
269
|
+
1898: 23,
|
270
|
+
1899: 23,
|
271
|
+
1900: 23,
|
272
|
+
1901: 24,
|
273
|
+
1902: 24,
|
274
|
+
1903: 24,
|
275
|
+
1904: 23,
|
276
|
+
1905: 24,
|
277
|
+
1906: 24,
|
278
|
+
1907: 24,
|
279
|
+
1908: 23,
|
280
|
+
1909: 24,
|
281
|
+
1910: 24,
|
282
|
+
1911: 24,
|
283
|
+
1912: 23,
|
284
|
+
1913: 24,
|
285
|
+
1914: 24,
|
286
|
+
1915: 24,
|
287
|
+
1916: 23,
|
288
|
+
1917: 24,
|
289
|
+
1918: 24,
|
290
|
+
1919: 24,
|
291
|
+
1920: 23,
|
292
|
+
1921: 23,
|
293
|
+
1922: 24,
|
294
|
+
1923: 24,
|
295
|
+
1924: 23,
|
296
|
+
1925: 23,
|
297
|
+
1926: 24,
|
298
|
+
1927: 24,
|
299
|
+
1928: 23,
|
300
|
+
1929: 23,
|
301
|
+
1930: 24,
|
302
|
+
1931: 24,
|
303
|
+
1932: 23,
|
304
|
+
1933: 23,
|
305
|
+
1934: 24,
|
306
|
+
1935: 24,
|
307
|
+
1936: 23,
|
308
|
+
1937: 23,
|
309
|
+
1938: 24,
|
310
|
+
1939: 24,
|
311
|
+
1940: 23,
|
312
|
+
1941: 23,
|
313
|
+
1942: 24,
|
314
|
+
1943: 24,
|
315
|
+
1944: 23,
|
316
|
+
1945: 23,
|
317
|
+
1946: 24,
|
318
|
+
1947: 24,
|
319
|
+
1948: 23,
|
320
|
+
1949: 23,
|
321
|
+
1950: 23,
|
322
|
+
1951: 24,
|
323
|
+
1952: 23,
|
324
|
+
1953: 23,
|
325
|
+
1954: 23,
|
326
|
+
1955: 24,
|
327
|
+
1956: 23,
|
328
|
+
1957: 23,
|
329
|
+
1958: 23,
|
330
|
+
1959: 24,
|
331
|
+
1960: 23,
|
332
|
+
1961: 23,
|
333
|
+
1962: 23,
|
334
|
+
1963: 24,
|
335
|
+
1964: 23,
|
336
|
+
1965: 23,
|
337
|
+
1966: 23,
|
338
|
+
1967: 24,
|
339
|
+
1968: 23,
|
340
|
+
1969: 23,
|
341
|
+
1970: 23,
|
342
|
+
1971: 24,
|
343
|
+
1972: 23,
|
344
|
+
1973: 23,
|
345
|
+
1974: 23,
|
346
|
+
1975: 24,
|
347
|
+
1976: 23,
|
348
|
+
1977: 23,
|
349
|
+
1978: 23,
|
350
|
+
1979: 24,
|
351
|
+
1980: 23,
|
352
|
+
1981: 23,
|
353
|
+
1982: 23,
|
354
|
+
1983: 23,
|
355
|
+
1984: 23,
|
356
|
+
1985: 23,
|
357
|
+
1986: 23,
|
358
|
+
1987: 23,
|
359
|
+
1988: 23,
|
360
|
+
1989: 23,
|
361
|
+
1990: 23,
|
362
|
+
1991: 23,
|
363
|
+
1992: 23,
|
364
|
+
1993: 23,
|
365
|
+
1994: 23,
|
366
|
+
1995: 23,
|
367
|
+
1996: 23,
|
368
|
+
1997: 23,
|
369
|
+
1998: 23,
|
370
|
+
1999: 23,
|
371
|
+
2000: 23,
|
372
|
+
2001: 23,
|
373
|
+
2002: 23,
|
374
|
+
2003: 23,
|
375
|
+
2004: 23,
|
376
|
+
2005: 23,
|
377
|
+
2006: 23,
|
378
|
+
2007: 23,
|
379
|
+
2008: 23,
|
380
|
+
2009: 23,
|
381
|
+
2010: 23,
|
382
|
+
2011: 23,
|
383
|
+
2012: 22,
|
384
|
+
2013: 23,
|
385
|
+
2014: 23,
|
386
|
+
2015: 23,
|
387
|
+
2016: 22,
|
388
|
+
2017: 23,
|
389
|
+
2018: 23,
|
390
|
+
2019: 23,
|
391
|
+
2020: 22,
|
392
|
+
2021: 23,
|
393
|
+
2022: 23,
|
394
|
+
2023: 23,
|
395
|
+
2024: 22,
|
396
|
+
2025: 23,
|
397
|
+
2026: 23,
|
398
|
+
2027: 23,
|
399
|
+
2028: 22,
|
400
|
+
2029: 23,
|
401
|
+
2030: 23,
|
402
|
+
2031: 23,
|
403
|
+
2032: 22,
|
404
|
+
2033: 23,
|
405
|
+
2034: 23,
|
406
|
+
2035: 23,
|
407
|
+
2036: 22,
|
408
|
+
2037: 23,
|
409
|
+
2038: 23,
|
410
|
+
2039: 23,
|
411
|
+
2040: 22,
|
412
|
+
2041: 23,
|
413
|
+
2042: 23,
|
414
|
+
2043: 23,
|
415
|
+
2044: 22,
|
416
|
+
2045: 22,
|
417
|
+
2046: 23,
|
418
|
+
2047: 23,
|
419
|
+
2048: 22,
|
420
|
+
2049: 22,
|
421
|
+
2050: 23,
|
422
|
+
2051: 23,
|
423
|
+
2052: 22,
|
424
|
+
2053: 22,
|
425
|
+
2054: 23,
|
426
|
+
2055: 23,
|
427
|
+
2056: 22,
|
428
|
+
2057: 22,
|
429
|
+
2058: 23,
|
430
|
+
2059: 23,
|
431
|
+
2060: 22,
|
432
|
+
2061: 22,
|
433
|
+
2062: 23,
|
434
|
+
2063: 23,
|
435
|
+
2064: 22,
|
436
|
+
2065: 22,
|
437
|
+
2066: 23,
|
438
|
+
2067: 23,
|
439
|
+
2068: 22,
|
440
|
+
2069: 22,
|
441
|
+
2070: 23,
|
442
|
+
2071: 23,
|
443
|
+
2072: 22,
|
444
|
+
2073: 22,
|
445
|
+
2074: 23,
|
446
|
+
2075: 23,
|
447
|
+
2076: 22,
|
448
|
+
2077: 22,
|
449
|
+
2078: 22,
|
450
|
+
2079: 23,
|
451
|
+
2080: 22,
|
452
|
+
2081: 22,
|
453
|
+
2082: 22,
|
454
|
+
2083: 23,
|
455
|
+
2084: 22,
|
456
|
+
2085: 22,
|
457
|
+
2086: 22,
|
458
|
+
2087: 23,
|
459
|
+
2088: 22,
|
460
|
+
2089: 22,
|
461
|
+
2090: 22,
|
462
|
+
2091: 23,
|
463
|
+
2092: 22,
|
464
|
+
2093: 22,
|
465
|
+
2094: 22,
|
466
|
+
2095: 23,
|
467
|
+
2096: 22,
|
468
|
+
2097: 22,
|
469
|
+
2098: 22,
|
470
|
+
2099: 23,
|
115
471
|
}
|
116
472
|
|
117
473
|
|
@@ -140,7 +496,9 @@ def autumnal_equinox(dt):
|
|
140
496
|
def autumnal_citizen_dates(start=2003, end=2099):
|
141
497
|
dates = []
|
142
498
|
for year in range(start, end):
|
143
|
-
respect_for_aged = pd.Timestamp(year, 9, 1) + pd.offsets.WeekOfMonth(
|
499
|
+
respect_for_aged = pd.Timestamp(year, 9, 1) + pd.offsets.WeekOfMonth(
|
500
|
+
week=2, weekday=0
|
501
|
+
)
|
144
502
|
equinox = autumnal_equinox_for_year(year)
|
145
503
|
if (equinox - respect_for_aged).days == 2:
|
146
504
|
dates.append(respect_for_aged + pd.offsets.Day())
|