pandas-market-calendars 4.3.0__py3-none-any.whl → 4.3.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pandas_market_calendars/calendars/__init__.py +0 -0
- pandas_market_calendars/calendars/asx.py +63 -0
- pandas_market_calendars/calendars/bmf.py +227 -0
- pandas_market_calendars/calendars/bse.py +409 -0
- pandas_market_calendars/calendars/cboe.py +115 -0
- pandas_market_calendars/calendars/cme.py +240 -0
- pandas_market_calendars/calendars/cme_globex_agriculture.py +103 -0
- pandas_market_calendars/calendars/cme_globex_base.py +103 -0
- pandas_market_calendars/calendars/cme_globex_crypto.py +147 -0
- pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +138 -0
- pandas_market_calendars/calendars/cme_globex_equities.py +104 -0
- pandas_market_calendars/calendars/cme_globex_fixed_income.py +113 -0
- pandas_market_calendars/calendars/cme_globex_fx.py +78 -0
- pandas_market_calendars/calendars/eurex.py +119 -0
- pandas_market_calendars/calendars/hkex.py +408 -0
- pandas_market_calendars/calendars/ice.py +65 -0
- pandas_market_calendars/calendars/iex.py +98 -0
- pandas_market_calendars/calendars/jpx.py +103 -0
- pandas_market_calendars/calendars/lse.py +91 -0
- pandas_market_calendars/calendars/mirror.py +114 -0
- pandas_market_calendars/calendars/nyse.py +1127 -0
- pandas_market_calendars/calendars/ose.py +150 -0
- pandas_market_calendars/calendars/sifma.py +297 -0
- pandas_market_calendars/calendars/six.py +114 -0
- pandas_market_calendars/calendars/sse.py +290 -0
- pandas_market_calendars/calendars/tase.py +195 -0
- pandas_market_calendars/calendars/tsx.py +159 -0
- pandas_market_calendars/holidays/__init__.py +0 -0
- pandas_market_calendars/holidays/cme.py +340 -0
- pandas_market_calendars/holidays/cme_globex.py +198 -0
- pandas_market_calendars/holidays/cn.py +1436 -0
- pandas_market_calendars/holidays/jp.py +396 -0
- pandas_market_calendars/holidays/jpx_equinox.py +147 -0
- pandas_market_calendars/holidays/nyse.py +1472 -0
- pandas_market_calendars/holidays/oz.py +65 -0
- pandas_market_calendars/holidays/sifma.py +321 -0
- pandas_market_calendars/holidays/uk.py +180 -0
- pandas_market_calendars/holidays/us.py +360 -0
- {pandas_market_calendars-4.3.0.dist-info → pandas_market_calendars-4.3.1.dist-info}/METADATA +1 -1
- pandas_market_calendars-4.3.1.dist-info/RECORD +49 -0
- pandas_market_calendars-4.3.0.dist-info/RECORD +0 -11
- {pandas_market_calendars-4.3.0.dist-info → pandas_market_calendars-4.3.1.dist-info}/LICENSE +0 -0
- {pandas_market_calendars-4.3.0.dist-info → pandas_market_calendars-4.3.1.dist-info}/NOTICE +0 -0
- {pandas_market_calendars-4.3.0.dist-info → pandas_market_calendars-4.3.1.dist-info}/WHEEL +0 -0
- {pandas_market_calendars-4.3.0.dist-info → pandas_market_calendars-4.3.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,409 @@
|
|
1
|
+
"""
|
2
|
+
Bombay Stock Exchnage
|
3
|
+
"""
|
4
|
+
|
5
|
+
from pandas import Timestamp
|
6
|
+
from pytz import timezone
|
7
|
+
from datetime import time
|
8
|
+
from pandas_market_calendars.market_calendar import MarketCalendar
|
9
|
+
|
10
|
+
|
11
|
+
BSEClosedDay = [
|
12
|
+
Timestamp('1997-01-23', tz='UTC'),
|
13
|
+
Timestamp('1997-03-07', tz='UTC'),
|
14
|
+
Timestamp('1997-03-24', tz='UTC'),
|
15
|
+
Timestamp('1997-04-08', tz='UTC'),
|
16
|
+
Timestamp('1997-04-14', tz='UTC'),
|
17
|
+
Timestamp('1997-04-16', tz='UTC'),
|
18
|
+
Timestamp('1997-04-18', tz='UTC'),
|
19
|
+
Timestamp('1997-05-01', tz='UTC'),
|
20
|
+
Timestamp('1997-05-08', tz='UTC'),
|
21
|
+
Timestamp('1997-08-15', tz='UTC'),
|
22
|
+
Timestamp('1997-08-18', tz='UTC'),
|
23
|
+
Timestamp('1997-08-25', tz='UTC'),
|
24
|
+
Timestamp('1997-10-02', tz='UTC'),
|
25
|
+
Timestamp('1997-10-28', tz='UTC'),
|
26
|
+
Timestamp('1997-10-29', tz='UTC'),
|
27
|
+
Timestamp('1997-10-31', tz='UTC'),
|
28
|
+
Timestamp('1997-12-25', tz='UTC'),
|
29
|
+
Timestamp('1998-04-09', tz='UTC'),
|
30
|
+
Timestamp('1998-04-14', tz='UTC'),
|
31
|
+
Timestamp('1998-04-28', tz='UTC'),
|
32
|
+
Timestamp('1998-12-25', tz='UTC'),
|
33
|
+
Timestamp('1999-01-01', tz='UTC'),
|
34
|
+
Timestamp('1999-01-20', tz='UTC'),
|
35
|
+
Timestamp('1999-01-26', tz='UTC'),
|
36
|
+
Timestamp('1999-03-02', tz='UTC'),
|
37
|
+
Timestamp('1999-03-18', tz='UTC'),
|
38
|
+
Timestamp('1999-03-25', tz='UTC'),
|
39
|
+
Timestamp('1999-03-29', tz='UTC'),
|
40
|
+
Timestamp('1999-04-02', tz='UTC'),
|
41
|
+
Timestamp('1999-04-14', tz='UTC'),
|
42
|
+
Timestamp('1999-04-27', tz='UTC'),
|
43
|
+
Timestamp('1999-04-30', tz='UTC'),
|
44
|
+
Timestamp('1999-09-13', tz='UTC'),
|
45
|
+
Timestamp('1999-10-19', tz='UTC'),
|
46
|
+
Timestamp('1999-11-08', tz='UTC'),
|
47
|
+
Timestamp('1999-11-10', tz='UTC'),
|
48
|
+
Timestamp('1999-11-23', tz='UTC'),
|
49
|
+
Timestamp('1999-12-31', tz='UTC'),
|
50
|
+
Timestamp('2000-01-26', tz='UTC'),
|
51
|
+
Timestamp('2000-03-17', tz='UTC'),
|
52
|
+
Timestamp('2000-03-20', tz='UTC'),
|
53
|
+
Timestamp('2000-04-14', tz='UTC'),
|
54
|
+
Timestamp('2000-04-21', tz='UTC'),
|
55
|
+
Timestamp('2000-05-01', tz='UTC'),
|
56
|
+
Timestamp('2000-08-15', tz='UTC'),
|
57
|
+
Timestamp('2000-09-01', tz='UTC'),
|
58
|
+
Timestamp('2000-10-02', tz='UTC'),
|
59
|
+
Timestamp('2000-12-25', tz='UTC'),
|
60
|
+
Timestamp('2001-01-01', tz='UTC'),
|
61
|
+
Timestamp('2001-01-26', tz='UTC'),
|
62
|
+
Timestamp('2001-03-06', tz='UTC'),
|
63
|
+
Timestamp('2001-04-05', tz='UTC'),
|
64
|
+
Timestamp('2001-04-13', tz='UTC'),
|
65
|
+
Timestamp('2001-05-01', tz='UTC'),
|
66
|
+
Timestamp('2001-08-15', tz='UTC'),
|
67
|
+
Timestamp('2001-08-22', tz='UTC'),
|
68
|
+
Timestamp('2001-10-02', tz='UTC'),
|
69
|
+
Timestamp('2001-10-26', tz='UTC'),
|
70
|
+
Timestamp('2001-11-16', tz='UTC'),
|
71
|
+
Timestamp('2001-11-30', tz='UTC'),
|
72
|
+
Timestamp('2001-12-17', tz='UTC'),
|
73
|
+
Timestamp('2001-12-25', tz='UTC'),
|
74
|
+
Timestamp('2002-03-25', tz='UTC'),
|
75
|
+
Timestamp('2002-03-29', tz='UTC'),
|
76
|
+
Timestamp('2002-05-01', tz='UTC'),
|
77
|
+
Timestamp('2002-08-15', tz='UTC'),
|
78
|
+
Timestamp('2002-09-10', tz='UTC'),
|
79
|
+
Timestamp('2002-10-02', tz='UTC'),
|
80
|
+
Timestamp('2002-10-15', tz='UTC'),
|
81
|
+
Timestamp('2002-11-06', tz='UTC'),
|
82
|
+
Timestamp('2002-11-19', tz='UTC'),
|
83
|
+
Timestamp('2002-12-25', tz='UTC'),
|
84
|
+
Timestamp('2003-02-13', tz='UTC'),
|
85
|
+
Timestamp('2003-03-14', tz='UTC'),
|
86
|
+
Timestamp('2003-03-18', tz='UTC'),
|
87
|
+
Timestamp('2003-04-14', tz='UTC'),
|
88
|
+
Timestamp('2003-04-18', tz='UTC'),
|
89
|
+
Timestamp('2003-05-01', tz='UTC'),
|
90
|
+
Timestamp('2003-08-15', tz='UTC'),
|
91
|
+
Timestamp('2003-10-02', tz='UTC'),
|
92
|
+
Timestamp('2003-11-26', tz='UTC'),
|
93
|
+
Timestamp('2003-12-25', tz='UTC'),
|
94
|
+
Timestamp('2004-01-01', tz='UTC'),
|
95
|
+
Timestamp('2004-01-26', tz='UTC'),
|
96
|
+
Timestamp('2004-02-02', tz='UTC'),
|
97
|
+
Timestamp('2004-03-02', tz='UTC'),
|
98
|
+
Timestamp('2004-04-09', tz='UTC'),
|
99
|
+
Timestamp('2004-04-14', tz='UTC'),
|
100
|
+
Timestamp('2004-04-26', tz='UTC'),
|
101
|
+
Timestamp('2004-10-13', tz='UTC'),
|
102
|
+
Timestamp('2004-10-22', tz='UTC'),
|
103
|
+
Timestamp('2004-11-15', tz='UTC'),
|
104
|
+
Timestamp('2004-11-26', tz='UTC'),
|
105
|
+
Timestamp('2005-01-21', tz='UTC'),
|
106
|
+
Timestamp('2005-01-26', tz='UTC'),
|
107
|
+
Timestamp('2005-03-25', tz='UTC'),
|
108
|
+
Timestamp('2005-04-14', tz='UTC'),
|
109
|
+
Timestamp('2005-07-28', tz='UTC'),
|
110
|
+
Timestamp('2005-08-15', tz='UTC'),
|
111
|
+
Timestamp('2005-09-07', tz='UTC'),
|
112
|
+
Timestamp('2005-10-12', tz='UTC'),
|
113
|
+
Timestamp('2005-11-03', tz='UTC'),
|
114
|
+
Timestamp('2005-11-04', tz='UTC'),
|
115
|
+
Timestamp('2005-11-15', tz='UTC'),
|
116
|
+
Timestamp('2006-01-11', tz='UTC'),
|
117
|
+
Timestamp('2006-01-26', tz='UTC'),
|
118
|
+
Timestamp('2006-02-09', tz='UTC'),
|
119
|
+
Timestamp('2006-03-15', tz='UTC'),
|
120
|
+
Timestamp('2006-04-06', tz='UTC'),
|
121
|
+
Timestamp('2006-04-11', tz='UTC'),
|
122
|
+
Timestamp('2006-04-14', tz='UTC'),
|
123
|
+
Timestamp('2006-05-01', tz='UTC'),
|
124
|
+
Timestamp('2006-08-15', tz='UTC'),
|
125
|
+
Timestamp('2006-10-02', tz='UTC'),
|
126
|
+
Timestamp('2006-10-24', tz='UTC'),
|
127
|
+
Timestamp('2006-10-25', tz='UTC'),
|
128
|
+
Timestamp('2006-12-25', tz='UTC'),
|
129
|
+
Timestamp('2007-01-01', tz='UTC'),
|
130
|
+
Timestamp('2007-01-26', tz='UTC'),
|
131
|
+
Timestamp('2007-01-30', tz='UTC'),
|
132
|
+
Timestamp('2007-02-16', tz='UTC'),
|
133
|
+
Timestamp('2007-03-27', tz='UTC'),
|
134
|
+
Timestamp('2007-04-06', tz='UTC'),
|
135
|
+
Timestamp('2007-05-01', tz='UTC'),
|
136
|
+
Timestamp('2007-05-02', tz='UTC'),
|
137
|
+
Timestamp('2007-08-15', tz='UTC'),
|
138
|
+
Timestamp('2007-10-02', tz='UTC'),
|
139
|
+
Timestamp('2007-12-21', tz='UTC'),
|
140
|
+
Timestamp('2007-12-25', tz='UTC'),
|
141
|
+
Timestamp('2008-03-06', tz='UTC'),
|
142
|
+
Timestamp('2008-03-20', tz='UTC'),
|
143
|
+
Timestamp('2008-03-21', tz='UTC'),
|
144
|
+
Timestamp('2008-04-14', tz='UTC'),
|
145
|
+
Timestamp('2008-04-18', tz='UTC'),
|
146
|
+
Timestamp('2008-05-01', tz='UTC'),
|
147
|
+
Timestamp('2008-05-19', tz='UTC'),
|
148
|
+
Timestamp('2008-08-15', tz='UTC'),
|
149
|
+
Timestamp('2008-09-03', tz='UTC'),
|
150
|
+
Timestamp('2008-10-02', tz='UTC'),
|
151
|
+
Timestamp('2008-10-09', tz='UTC'),
|
152
|
+
Timestamp('2008-10-30', tz='UTC'),
|
153
|
+
Timestamp('2008-11-13', tz='UTC'),
|
154
|
+
Timestamp('2008-11-27', tz='UTC'),
|
155
|
+
Timestamp('2008-12-09', tz='UTC'),
|
156
|
+
Timestamp('2008-12-25', tz='UTC'),
|
157
|
+
Timestamp('2009-01-08', tz='UTC'),
|
158
|
+
Timestamp('2009-01-26', tz='UTC'),
|
159
|
+
Timestamp('2009-02-23', tz='UTC'),
|
160
|
+
Timestamp('2009-03-10', tz='UTC'),
|
161
|
+
Timestamp('2009-03-11', tz='UTC'),
|
162
|
+
Timestamp('2009-04-03', tz='UTC'),
|
163
|
+
Timestamp('2009-04-07', tz='UTC'),
|
164
|
+
Timestamp('2009-04-10', tz='UTC'),
|
165
|
+
Timestamp('2009-04-14', tz='UTC'),
|
166
|
+
Timestamp('2009-04-30', tz='UTC'),
|
167
|
+
Timestamp('2009-05-01', tz='UTC'),
|
168
|
+
Timestamp('2009-09-21', tz='UTC'),
|
169
|
+
Timestamp('2009-09-28', tz='UTC'),
|
170
|
+
Timestamp('2009-10-02', tz='UTC'),
|
171
|
+
Timestamp('2009-10-13', tz='UTC'),
|
172
|
+
Timestamp('2009-10-19', tz='UTC'),
|
173
|
+
Timestamp('2009-11-02', tz='UTC'),
|
174
|
+
Timestamp('2009-12-25', tz='UTC'),
|
175
|
+
Timestamp('2009-12-28', tz='UTC'),
|
176
|
+
Timestamp('2010-01-01', tz='UTC'),
|
177
|
+
Timestamp('2010-01-26', tz='UTC'),
|
178
|
+
Timestamp('2010-02-12', tz='UTC'),
|
179
|
+
Timestamp('2010-03-01', tz='UTC'),
|
180
|
+
Timestamp('2010-03-24', tz='UTC'),
|
181
|
+
Timestamp('2010-04-02', tz='UTC'),
|
182
|
+
Timestamp('2010-04-14', tz='UTC'),
|
183
|
+
Timestamp('2010-09-10', tz='UTC'),
|
184
|
+
Timestamp('2010-11-17', tz='UTC'),
|
185
|
+
Timestamp('2010-12-17', tz='UTC'),
|
186
|
+
Timestamp('2011-01-26', tz='UTC'),
|
187
|
+
Timestamp('2011-03-02', tz='UTC'),
|
188
|
+
Timestamp('2011-04-12', tz='UTC'),
|
189
|
+
Timestamp('2011-04-14', tz='UTC'),
|
190
|
+
Timestamp('2011-04-22', tz='UTC'),
|
191
|
+
Timestamp('2011-08-15', tz='UTC'),
|
192
|
+
Timestamp('2011-08-31', tz='UTC'),
|
193
|
+
Timestamp('2011-09-01', tz='UTC'),
|
194
|
+
Timestamp('2011-10-06', tz='UTC'),
|
195
|
+
Timestamp('2011-10-27', tz='UTC'),
|
196
|
+
Timestamp('2011-11-07', tz='UTC'),
|
197
|
+
Timestamp('2011-11-10', tz='UTC'),
|
198
|
+
Timestamp('2011-12-06', tz='UTC'),
|
199
|
+
Timestamp('2012-01-26', tz='UTC'),
|
200
|
+
Timestamp('2012-02-20', tz='UTC'),
|
201
|
+
Timestamp('2012-03-08', tz='UTC'),
|
202
|
+
Timestamp('2012-04-05', tz='UTC'),
|
203
|
+
Timestamp('2012-04-06', tz='UTC'),
|
204
|
+
Timestamp('2012-05-01', tz='UTC'),
|
205
|
+
Timestamp('2012-08-15', tz='UTC'),
|
206
|
+
Timestamp('2012-08-20', tz='UTC'),
|
207
|
+
Timestamp('2012-09-19', tz='UTC'),
|
208
|
+
Timestamp('2012-10-02', tz='UTC'),
|
209
|
+
Timestamp('2012-10-24', tz='UTC'),
|
210
|
+
Timestamp('2012-11-14', tz='UTC'),
|
211
|
+
Timestamp('2012-11-28', tz='UTC'),
|
212
|
+
Timestamp('2012-12-25', tz='UTC'),
|
213
|
+
Timestamp('2013-03-27', tz='UTC'),
|
214
|
+
Timestamp('2013-03-29', tz='UTC'),
|
215
|
+
Timestamp('2013-04-19', tz='UTC'),
|
216
|
+
Timestamp('2013-04-24', tz='UTC'),
|
217
|
+
Timestamp('2013-05-01', tz='UTC'),
|
218
|
+
Timestamp('2013-08-09', tz='UTC'),
|
219
|
+
Timestamp('2013-08-15', tz='UTC'),
|
220
|
+
Timestamp('2013-09-09', tz='UTC'),
|
221
|
+
Timestamp('2013-10-02', tz='UTC'),
|
222
|
+
Timestamp('2013-10-16', tz='UTC'),
|
223
|
+
Timestamp('2013-11-04', tz='UTC'),
|
224
|
+
Timestamp('2013-11-15', tz='UTC'),
|
225
|
+
Timestamp('2013-12-25', tz='UTC'),
|
226
|
+
Timestamp('2014-02-27', tz='UTC'),
|
227
|
+
Timestamp('2014-03-17', tz='UTC'),
|
228
|
+
Timestamp('2014-04-08', tz='UTC'),
|
229
|
+
Timestamp('2014-04-14', tz='UTC'),
|
230
|
+
Timestamp('2014-04-18', tz='UTC'),
|
231
|
+
Timestamp('2014-04-24', tz='UTC'),
|
232
|
+
Timestamp('2014-05-01', tz='UTC'),
|
233
|
+
Timestamp('2014-07-29', tz='UTC'),
|
234
|
+
Timestamp('2014-08-15', tz='UTC'),
|
235
|
+
Timestamp('2014-08-29', tz='UTC'),
|
236
|
+
Timestamp('2014-10-02', tz='UTC'),
|
237
|
+
Timestamp('2014-10-03', tz='UTC'),
|
238
|
+
Timestamp('2014-10-06', tz='UTC'),
|
239
|
+
Timestamp('2014-10-15', tz='UTC'),
|
240
|
+
Timestamp('2014-10-24', tz='UTC'),
|
241
|
+
Timestamp('2014-11-04', tz='UTC'),
|
242
|
+
Timestamp('2014-11-06', tz='UTC'),
|
243
|
+
Timestamp('2014-12-25', tz='UTC'),
|
244
|
+
Timestamp('2015-01-26', tz='UTC'),
|
245
|
+
Timestamp('2015-02-17', tz='UTC'),
|
246
|
+
Timestamp('2015-03-06', tz='UTC'),
|
247
|
+
Timestamp('2015-04-02', tz='UTC'),
|
248
|
+
Timestamp('2015-04-03', tz='UTC'),
|
249
|
+
Timestamp('2015-04-14', tz='UTC'),
|
250
|
+
Timestamp('2015-05-01', tz='UTC'),
|
251
|
+
Timestamp('2015-09-17', tz='UTC'),
|
252
|
+
Timestamp('2015-09-25', tz='UTC'),
|
253
|
+
Timestamp('2015-10-02', tz='UTC'),
|
254
|
+
Timestamp('2015-10-22', tz='UTC'),
|
255
|
+
Timestamp('2015-11-12', tz='UTC'),
|
256
|
+
Timestamp('2015-11-25', tz='UTC'),
|
257
|
+
Timestamp('2015-12-25', tz='UTC'),
|
258
|
+
Timestamp('2016-01-26', tz='UTC'),
|
259
|
+
Timestamp('2016-03-07', tz='UTC'),
|
260
|
+
Timestamp('2016-03-24', tz='UTC'),
|
261
|
+
Timestamp('2016-03-25', tz='UTC'),
|
262
|
+
Timestamp('2016-04-14', tz='UTC'),
|
263
|
+
Timestamp('2016-04-15', tz='UTC'),
|
264
|
+
Timestamp('2016-04-19', tz='UTC'),
|
265
|
+
Timestamp('2016-07-06', tz='UTC'),
|
266
|
+
Timestamp('2016-08-15', tz='UTC'),
|
267
|
+
Timestamp('2016-09-05', tz='UTC'),
|
268
|
+
Timestamp('2016-09-13', tz='UTC'),
|
269
|
+
Timestamp('2016-10-11', tz='UTC'),
|
270
|
+
Timestamp('2016-10-12', tz='UTC'),
|
271
|
+
Timestamp('2016-10-31', tz='UTC'),
|
272
|
+
Timestamp('2016-11-14', tz='UTC'),
|
273
|
+
Timestamp('2017-01-26', tz='UTC'),
|
274
|
+
Timestamp('2017-02-24', tz='UTC'),
|
275
|
+
Timestamp('2017-03-13', tz='UTC'),
|
276
|
+
Timestamp('2017-04-04', tz='UTC'),
|
277
|
+
Timestamp('2017-04-14', tz='UTC'),
|
278
|
+
Timestamp('2017-05-01', tz='UTC'),
|
279
|
+
Timestamp('2017-06-26', tz='UTC'),
|
280
|
+
Timestamp('2017-08-15', tz='UTC'),
|
281
|
+
Timestamp('2017-08-25', tz='UTC'),
|
282
|
+
Timestamp('2017-10-02', tz='UTC'),
|
283
|
+
Timestamp('2017-10-20', tz='UTC'),
|
284
|
+
Timestamp('2017-12-25', tz='UTC'),
|
285
|
+
Timestamp('2018-01-26', tz='UTC'),
|
286
|
+
Timestamp('2018-02-13', tz='UTC'),
|
287
|
+
Timestamp('2018-03-02', tz='UTC'),
|
288
|
+
Timestamp('2018-03-29', tz='UTC'),
|
289
|
+
Timestamp('2018-03-30', tz='UTC'),
|
290
|
+
Timestamp('2018-05-01', tz='UTC'),
|
291
|
+
Timestamp('2018-08-15', tz='UTC'),
|
292
|
+
Timestamp('2018-08-22', tz='UTC'),
|
293
|
+
Timestamp('2018-09-13', tz='UTC'),
|
294
|
+
Timestamp('2018-09-20', tz='UTC'),
|
295
|
+
Timestamp('2018-10-02', tz='UTC'),
|
296
|
+
Timestamp('2018-10-18', tz='UTC'),
|
297
|
+
Timestamp('2018-11-08', tz='UTC'),
|
298
|
+
Timestamp('2018-11-23', tz='UTC'),
|
299
|
+
Timestamp('2018-12-25', tz='UTC'),
|
300
|
+
Timestamp('2019-01-26', tz='UTC'),
|
301
|
+
Timestamp('2019-03-02', tz='UTC'),
|
302
|
+
Timestamp('2019-03-04', tz='UTC'),
|
303
|
+
Timestamp('2019-03-21', tz='UTC'),
|
304
|
+
Timestamp('2019-04-17', tz='UTC'),
|
305
|
+
Timestamp('2019-04-19', tz='UTC'),
|
306
|
+
Timestamp('2019-04-29', tz='UTC'),
|
307
|
+
Timestamp('2019-05-01', tz='UTC'),
|
308
|
+
Timestamp('2019-06-05', tz='UTC'),
|
309
|
+
Timestamp('2019-08-12', tz='UTC'),
|
310
|
+
Timestamp('2019-08-15', tz='UTC'),
|
311
|
+
Timestamp('2019-09-02', tz='UTC'),
|
312
|
+
Timestamp('2019-09-10', tz='UTC'),
|
313
|
+
Timestamp('2019-10-02', tz='UTC'),
|
314
|
+
Timestamp('2019-10-08', tz='UTC'),
|
315
|
+
Timestamp('2019-10-21', tz='UTC'),
|
316
|
+
Timestamp('2019-10-28', tz='UTC'),
|
317
|
+
Timestamp('2019-11-12', tz='UTC'),
|
318
|
+
Timestamp('2019-12-25', tz='UTC'),
|
319
|
+
Timestamp('2020-02-21', tz='UTC'),
|
320
|
+
Timestamp('2020-03-10', tz='UTC'),
|
321
|
+
Timestamp('2020-04-02', tz='UTC'),
|
322
|
+
Timestamp('2020-04-06', tz='UTC'),
|
323
|
+
Timestamp('2020-04-10', tz='UTC'),
|
324
|
+
Timestamp('2020-04-14', tz='UTC'),
|
325
|
+
Timestamp('2020-05-01', tz='UTC'),
|
326
|
+
Timestamp('2020-07-31', tz='UTC'),
|
327
|
+
Timestamp('2020-10-02', tz='UTC'),
|
328
|
+
Timestamp('2020-11-16', tz='UTC'),
|
329
|
+
Timestamp('2020-11-30', tz='UTC'),
|
330
|
+
Timestamp('2020-12-25', tz='UTC'),
|
331
|
+
Timestamp('2021-01-26', tz='UTC'), # Republic Day
|
332
|
+
Timestamp('2021-03-11', tz='UTC'), # Maha Shivaratri
|
333
|
+
Timestamp('2021-03-29', tz='UTC'), # Holi
|
334
|
+
Timestamp('2021-04-02', tz='UTC'), # Good Friday
|
335
|
+
Timestamp('2021-04-14', tz='UTC'), # Dr.Baba Saheb Ambedkar Jayanti
|
336
|
+
Timestamp('2021-04-21', tz='UTC'), # Ram Navami
|
337
|
+
Timestamp('2021-05-13', tz='UTC'), # Id-ul-Fitr
|
338
|
+
Timestamp('2021-07-21', tz='UTC'), # Id-al-Adha
|
339
|
+
Timestamp('2021-08-19', tz='UTC'), # Ashura
|
340
|
+
Timestamp('2021-09-10', tz='UTC'), # Ganesh Chaturthi
|
341
|
+
Timestamp('2021-10-15', tz='UTC'), # Vijaya Dashami
|
342
|
+
Timestamp('2021-11-04', tz='UTC'), # Diwali/Laxmi Puja. muhurat trading day
|
343
|
+
Timestamp('2021-11-05', tz='UTC'), # Diwali/Laxmi Puja
|
344
|
+
Timestamp('2021-11-19', tz='UTC'), # Guru Nanak Jayanti
|
345
|
+
Timestamp('2022-01-26', tz='UTC'), # Republic Day
|
346
|
+
Timestamp('2022-03-01', tz='UTC'), # Maha Shivaratri
|
347
|
+
Timestamp('2022-03-18', tz='UTC'), # Holi
|
348
|
+
Timestamp('2022-04-14', tz='UTC'), # Dr.Baba Saheb Ambedkar Jayanti
|
349
|
+
Timestamp('2022-04-15', tz='UTC'), # Good Friday
|
350
|
+
Timestamp('2022-05-03', tz='UTC'), # Id-ul-Fitr
|
351
|
+
Timestamp('2022-08-09', tz='UTC'), # Moharram
|
352
|
+
Timestamp('2022-08-15', tz='UTC'), # Independence Day
|
353
|
+
Timestamp('2022-08-31', tz='UTC'), # Ganesh Chaturthi
|
354
|
+
Timestamp('2022-10-05', tz='UTC'), # Vijaya Dashami
|
355
|
+
Timestamp('2022-10-24', tz='UTC'), # Diwali/Laxmi Puja. muhurat trading day
|
356
|
+
Timestamp('2022-10-26', tz='UTC'), # Diwali-Balipratipada
|
357
|
+
Timestamp('2022-11-08', tz='UTC'), # Guru Nanak Jayanti
|
358
|
+
Timestamp('2023-01-26', tz='UTC'), # Thu, Republic Day
|
359
|
+
Timestamp('2023-03-07', tz='UTC'), # Wed, Holi
|
360
|
+
Timestamp('2023-03-18', tz='UTC'), # Sat, Maha Shivaratri
|
361
|
+
Timestamp('2023-03-30', tz='UTC'), # Thu, Ramanavami
|
362
|
+
Timestamp('2023-04-04', tz='UTC'), # Tue, Mahavir Jayanthi
|
363
|
+
Timestamp('2023-04-07', tz='UTC'), # Fri, Good Friday
|
364
|
+
Timestamp('2023-04-14', tz='UTC'), # Fri, Ambedkar Jayanti
|
365
|
+
Timestamp('2023-04-22', tz='UTC'), # Sat, EID AL FITR
|
366
|
+
Timestamp('2023-05-01', tz='UTC'), # Mon, Maharashtra Din
|
367
|
+
Timestamp('2023-06-28', tz='UTC'), # Wed, Bakri Id / Eid ul-Adha
|
368
|
+
Timestamp('2023-08-15', tz='UTC'), # Tue, Independence Day
|
369
|
+
Timestamp('2023-08-29', tz='UTC'), # Tue, Muharram
|
370
|
+
Timestamp('2023-09-19', tz='UTC'), # Tue, Ganesh Chaturthi
|
371
|
+
Timestamp('2023-10-02', tz='UTC'), # Mon, Gandhi Jayanti
|
372
|
+
Timestamp('2023-10-24', tz='UTC'), # Tue, Dussehra
|
373
|
+
Timestamp('2023-11-12', tz='UTC'), # Sun, Diwali
|
374
|
+
Timestamp('2023-11-14', tz='UTC'), # Tue, Diwali
|
375
|
+
Timestamp('2023-11-27', tz='UTC'), # Mon, Guru Nanak's Birthday
|
376
|
+
Timestamp('2023-12-25', tz='UTC'), # Mon, Christmas
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
]
|
381
|
+
|
382
|
+
|
383
|
+
class BSEExchangeCalendar(MarketCalendar):
|
384
|
+
"""
|
385
|
+
Exchange calendar for the Bombay Stock Exchange (BSE, XBOM).
|
386
|
+
Open Time: 9:15 AM, Asia/Calcutta
|
387
|
+
Close Time: 3:30 PM, Asia/Calcutta
|
388
|
+
|
389
|
+
Due to the complexity around the BSE holidays, we are hardcoding a list
|
390
|
+
of holidays back to 1997, and forward through 2020. There are no known
|
391
|
+
early closes or late opens.
|
392
|
+
"""
|
393
|
+
aliases = ['BSE', 'NSE']
|
394
|
+
regular_market_times = {
|
395
|
+
"market_open": ((None, time(9, 15)),),
|
396
|
+
"market_close": ((None, time(15, 30)),)
|
397
|
+
}
|
398
|
+
|
399
|
+
@property
|
400
|
+
def name(self):
|
401
|
+
return "BSE"
|
402
|
+
|
403
|
+
@property
|
404
|
+
def tz(self):
|
405
|
+
return timezone('Asia/Calcutta')
|
406
|
+
|
407
|
+
@property
|
408
|
+
def adhoc_holidays(self):
|
409
|
+
return BSEClosedDay
|
@@ -0,0 +1,115 @@
|
|
1
|
+
from datetime import time
|
2
|
+
|
3
|
+
from pandas.tseries.holiday import AbstractHolidayCalendar, \
|
4
|
+
GoodFriday, USLaborDay, USPresidentsDay, USThanksgivingDay, Holiday
|
5
|
+
from pytz import timezone
|
6
|
+
from itertools import chain
|
7
|
+
import pandas as pd
|
8
|
+
|
9
|
+
from pandas_market_calendars.holidays.us import (Christmas, USBlackFridayInOrAfter1993, USIndependenceDay, USMartinLutherKingJrAfter1998,
|
10
|
+
USMemorialDay, USNewYearsDay, HurricaneSandyClosings, USNationalDaysofMourning,
|
11
|
+
USJuneteenthAfter2022)
|
12
|
+
from pandas_market_calendars.market_calendar import MarketCalendar
|
13
|
+
|
14
|
+
|
15
|
+
def good_friday_unless_christmas_nye_friday(dt):
|
16
|
+
"""
|
17
|
+
Good Friday is a valid trading day if Christmas Day or New Years Day fall
|
18
|
+
on a Friday.
|
19
|
+
"""
|
20
|
+
if isinstance(dt, pd.DatetimeIndex):
|
21
|
+
# Pandas < 2.1.0 will call with an index and fall-back to element by element
|
22
|
+
# Pandas == 2.1.0 will only call element by element
|
23
|
+
raise NotImplementedError()
|
24
|
+
|
25
|
+
year = dt.year
|
26
|
+
christmas_weekday = Christmas.observance(pd.Timestamp(year=year, month=12, day=25)).weekday()
|
27
|
+
nyd_weekday = USNewYearsDay.observance(pd.Timestamp(year=year, month=1, day=1)).weekday()
|
28
|
+
if christmas_weekday != 4 and nyd_weekday != 4:
|
29
|
+
return GoodFriday.dates(pd.Timestamp(year=year, month=1, day=1), pd.Timestamp(year=year, month=12, day=31))[0]
|
30
|
+
else:
|
31
|
+
# Not a holiday so use NaT to ensure it gets removed
|
32
|
+
return pd.NaT
|
33
|
+
|
34
|
+
|
35
|
+
GoodFridayUnlessChristmasNYEFriday = Holiday(
|
36
|
+
name="Good Friday CFE",
|
37
|
+
month=1,
|
38
|
+
day=1,
|
39
|
+
observance=good_friday_unless_christmas_nye_friday,
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
class CFEExchangeCalendar(MarketCalendar):
|
44
|
+
"""
|
45
|
+
Exchange calendar for the CBOE Futures Exchange (CFE).
|
46
|
+
|
47
|
+
http://cfe.cboe.com/aboutcfe/expirationcalendar.aspx
|
48
|
+
|
49
|
+
Open Time: 8:30am, America/Chicago
|
50
|
+
Close Time: 3:15pm, America/Chicago
|
51
|
+
|
52
|
+
(We are ignoring extended trading hours for now)
|
53
|
+
"""
|
54
|
+
aliases = ['CFE', "CBOE_Futures"]
|
55
|
+
regular_market_times = {
|
56
|
+
"market_open": ((None, time(8, 30)),),
|
57
|
+
"market_close": ((None, time(15, 15)),)
|
58
|
+
}
|
59
|
+
|
60
|
+
@property
|
61
|
+
def name(self):
|
62
|
+
return "CFE"
|
63
|
+
|
64
|
+
@property
|
65
|
+
def tz(self):
|
66
|
+
return timezone("America/Chicago")
|
67
|
+
|
68
|
+
@property
|
69
|
+
def regular_holidays(self):
|
70
|
+
return AbstractHolidayCalendar(rules=[
|
71
|
+
USNewYearsDay,
|
72
|
+
USMartinLutherKingJrAfter1998,
|
73
|
+
USPresidentsDay,
|
74
|
+
GoodFridayUnlessChristmasNYEFriday,
|
75
|
+
USJuneteenthAfter2022,
|
76
|
+
USIndependenceDay,
|
77
|
+
USMemorialDay,
|
78
|
+
USLaborDay,
|
79
|
+
USThanksgivingDay,
|
80
|
+
Christmas
|
81
|
+
])
|
82
|
+
|
83
|
+
@property
|
84
|
+
def special_closes(self):
|
85
|
+
return [(
|
86
|
+
time(12, 15),
|
87
|
+
AbstractHolidayCalendar(rules=[
|
88
|
+
USBlackFridayInOrAfter1993,
|
89
|
+
])
|
90
|
+
)]
|
91
|
+
|
92
|
+
@property
|
93
|
+
def adhoc_holidays(self):
|
94
|
+
return list(chain(
|
95
|
+
HurricaneSandyClosings,
|
96
|
+
USNationalDaysofMourning,
|
97
|
+
))
|
98
|
+
|
99
|
+
|
100
|
+
class CBOEEquityOptionsExchangeCalendar(CFEExchangeCalendar):
|
101
|
+
name = "CBOE_Equity_Options"
|
102
|
+
aliases = [name]
|
103
|
+
regular_market_times = {
|
104
|
+
"market_open": ((None, time(8, 30)),),
|
105
|
+
"market_close": ((None, time(15)),)
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
class CBOEIndexOptionsExchangeCalendar(CFEExchangeCalendar):
|
110
|
+
name = "CBOE_Index_Options"
|
111
|
+
aliases = [name]
|
112
|
+
regular_market_times = {
|
113
|
+
"market_open": ((None, time(8, 30)),),
|
114
|
+
"market_close": ((None, time(15, 15)),)
|
115
|
+
}
|