pandas-market-calendars 4.3.2__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 (46) hide show
  1. pandas_market_calendars/__init__.py +38 -38
  2. pandas_market_calendars/calendar_registry.py +53 -52
  3. pandas_market_calendars/calendar_utils.py +261 -261
  4. pandas_market_calendars/calendars/asx.py +66 -66
  5. pandas_market_calendars/calendars/bmf.py +206 -206
  6. pandas_market_calendars/calendars/bse.py +407 -407
  7. pandas_market_calendars/calendars/cboe.py +145 -145
  8. pandas_market_calendars/calendars/cme.py +402 -402
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +126 -127
  10. pandas_market_calendars/calendars/cme_globex_base.py +119 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +160 -147
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +123 -121
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -134
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -92
  16. pandas_market_calendars/calendars/eurex.py +139 -139
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +98 -0
  18. pandas_market_calendars/calendars/hkex.py +426 -426
  19. pandas_market_calendars/calendars/ice.py +81 -81
  20. pandas_market_calendars/calendars/iex.py +112 -111
  21. pandas_market_calendars/calendars/jpx.py +109 -109
  22. pandas_market_calendars/calendars/lse.py +114 -114
  23. pandas_market_calendars/calendars/mirror.py +130 -129
  24. pandas_market_calendars/calendars/nyse.py +1324 -1324
  25. pandas_market_calendars/calendars/ose.py +116 -116
  26. pandas_market_calendars/calendars/sifma.py +350 -335
  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 +197 -195
  30. pandas_market_calendars/calendars/tsx.py +181 -181
  31. pandas_market_calendars/holidays/cme.py +385 -372
  32. pandas_market_calendars/holidays/cme_globex.py +214 -223
  33. pandas_market_calendars/holidays/cn.py +1455 -1455
  34. pandas_market_calendars/holidays/jp.py +398 -394
  35. pandas_market_calendars/holidays/nyse.py +1531 -1539
  36. pandas_market_calendars/holidays/oz.py +63 -65
  37. pandas_market_calendars/holidays/sifma.py +338 -350
  38. pandas_market_calendars/holidays/us.py +376 -377
  39. pandas_market_calendars/market_calendar.py +895 -895
  40. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/METADATA +3 -3
  41. pandas_market_calendars-4.3.3.dist-info/RECORD +50 -0
  42. pandas_market_calendars-4.3.2.dist-info/RECORD +0 -49
  43. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/LICENSE +0 -0
  44. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/NOTICE +0 -0
  45. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/WHEEL +0 -0
  46. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/top_level.txt +0 -0
@@ -1,121 +1,123 @@
1
- from .cme_globex_base import CMEGlobexBaseExchangeCalendar
2
-
3
- from datetime import time
4
- from pandas.tseries.holiday import AbstractHolidayCalendar
5
- from pytz import timezone
6
-
7
- from pandas_market_calendars.holidays.cme import (
8
- USMartinLutherKingJrAfter1998Before2015,
9
- USMartinLutherKingJrAfter2015,
10
- USPresidentsDayBefore2015,
11
- USPresidentsDayAfter2015,
12
- GoodFridayBefore2021NotEarlyClose,
13
- GoodFridayAfter2021,
14
- GoodFriday2010,
15
- GoodFriday2012,
16
- GoodFriday2015,
17
- GoodFriday2021,
18
- USMemorialDay2013AndPrior,
19
- USMemorialDayAfter2013,
20
- USIndependenceDayBefore2022PreviousDay,
21
- USIndependenceDayBefore2014,
22
- USIndependenceDayAfter2014,
23
- USLaborDayStarting1887Before2014,
24
- USLaborDayStarting1887After2014,
25
- USThanksgivingBefore2014,
26
- USThanksgivingAfter2014,
27
- USThanksgivingFriday,
28
- )
29
- from pandas_market_calendars.holidays.us import (
30
- USNewYearsDay,
31
- ChristmasEveInOrAfter1993,
32
- Christmas,
33
- USJuneteenthAfter2022,
34
- )
35
-
36
-
37
- class CMEGlobexEquitiesExchangeCalendar(CMEGlobexBaseExchangeCalendar):
38
- aliases = ["CME Globex Equity"]
39
-
40
- regular_market_times = {
41
- "market_open": ((None, time(17), -1),), # offset by -1 day
42
- "market_close": ((None, time(16)),),
43
- }
44
-
45
- @property
46
- def tz(self):
47
- return timezone("America/Chicago")
48
-
49
- @property
50
- def name(self):
51
- """
52
- Name of the market
53
-
54
- :return: string name
55
- """
56
- return "CME Globex Equities"
57
-
58
- @property
59
- def regular_holidays(self):
60
- return AbstractHolidayCalendar(
61
- rules=[
62
- USNewYearsDay,
63
- GoodFridayBefore2021NotEarlyClose,
64
- GoodFridayAfter2021,
65
- Christmas,
66
- ]
67
- )
68
-
69
- @property
70
- def special_closes(self):
71
- # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
72
- return [
73
- (
74
- time(10, 30),
75
- AbstractHolidayCalendar(
76
- rules=[
77
- USMartinLutherKingJrAfter1998Before2015,
78
- USPresidentsDayBefore2015,
79
- USMemorialDay2013AndPrior,
80
- USIndependenceDayBefore2014,
81
- USLaborDayStarting1887Before2014,
82
- USThanksgivingBefore2014,
83
- ]
84
- ),
85
- ),
86
- (
87
- time(12, 15),
88
- AbstractHolidayCalendar(
89
- rules=[
90
- USIndependenceDayBefore2022PreviousDay,
91
- USThanksgivingFriday,
92
- ChristmasEveInOrAfter1993,
93
- ]
94
- ),
95
- ),
96
- (
97
- time(12),
98
- AbstractHolidayCalendar(
99
- rules=[
100
- USMartinLutherKingJrAfter2015,
101
- USPresidentsDayAfter2015,
102
- USMemorialDayAfter2013,
103
- USIndependenceDayAfter2014,
104
- USLaborDayStarting1887After2014,
105
- USThanksgivingAfter2014,
106
- USJuneteenthAfter2022,
107
- ]
108
- ),
109
- ),
110
- (
111
- time(8, 15),
112
- AbstractHolidayCalendar(
113
- rules=[
114
- GoodFriday2010,
115
- GoodFriday2012,
116
- GoodFriday2015,
117
- GoodFriday2021,
118
- ]
119
- ),
120
- ),
121
- ]
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import AbstractHolidayCalendar
4
+ from pytz import timezone
5
+
6
+ from pandas_market_calendars.holidays.cme import (
7
+ USMartinLutherKingJrAfter1998Before2015,
8
+ USMartinLutherKingJrAfter2015,
9
+ USPresidentsDayBefore2015,
10
+ USPresidentsDayAfter2015,
11
+ GoodFridayBefore2021NotEarlyClose,
12
+ GoodFriday2010,
13
+ GoodFriday2012,
14
+ GoodFriday2015,
15
+ GoodFriday2021,
16
+ GoodFriday2022,
17
+ GoodFridayAfter2022,
18
+ USMemorialDay2013AndPrior,
19
+ USMemorialDayAfter2013,
20
+ USIndependenceDayBefore2022PreviousDay,
21
+ USIndependenceDayBefore2014,
22
+ USIndependenceDayAfter2014,
23
+ USLaborDayStarting1887Before2014,
24
+ USLaborDayStarting1887After2014,
25
+ USThanksgivingBefore2014,
26
+ USThanksgivingAfter2014,
27
+ USThanksgivingFriday,
28
+ )
29
+ from pandas_market_calendars.holidays.us import (
30
+ USNewYearsDay,
31
+ ChristmasEveInOrAfter1993,
32
+ Christmas,
33
+ USJuneteenthAfter2022,
34
+ )
35
+ from .cme_globex_base import CMEGlobexBaseExchangeCalendar
36
+
37
+
38
+ class CMEGlobexEquitiesExchangeCalendar(CMEGlobexBaseExchangeCalendar):
39
+ aliases = ["CME Globex Equity"]
40
+
41
+ regular_market_times = {
42
+ "market_open": ((None, time(17), -1),), # offset by -1 day
43
+ "market_close": ((None, time(16)),),
44
+ }
45
+
46
+ @property
47
+ def tz(self):
48
+ return timezone("America/Chicago")
49
+
50
+ @property
51
+ def name(self):
52
+ """
53
+ Name of the market
54
+
55
+ :return: string name
56
+ """
57
+ return "CME Globex Equities"
58
+
59
+ @property
60
+ def regular_holidays(self):
61
+ return AbstractHolidayCalendar(
62
+ rules=[
63
+ USNewYearsDay,
64
+ GoodFridayBefore2021NotEarlyClose,
65
+ GoodFriday2022,
66
+ Christmas,
67
+ ]
68
+ )
69
+
70
+ @property
71
+ def special_closes(self):
72
+ # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
73
+ return [
74
+ (
75
+ time(10, 30),
76
+ AbstractHolidayCalendar(
77
+ rules=[
78
+ USMartinLutherKingJrAfter1998Before2015,
79
+ USPresidentsDayBefore2015,
80
+ USMemorialDay2013AndPrior,
81
+ USIndependenceDayBefore2014,
82
+ USLaborDayStarting1887Before2014,
83
+ USThanksgivingBefore2014,
84
+ ]
85
+ ),
86
+ ),
87
+ (
88
+ time(12, 15),
89
+ AbstractHolidayCalendar(
90
+ rules=[
91
+ USIndependenceDayBefore2022PreviousDay,
92
+ USThanksgivingFriday,
93
+ ChristmasEveInOrAfter1993,
94
+ ]
95
+ ),
96
+ ),
97
+ (
98
+ time(12),
99
+ AbstractHolidayCalendar(
100
+ rules=[
101
+ USMartinLutherKingJrAfter2015,
102
+ USPresidentsDayAfter2015,
103
+ USMemorialDayAfter2013,
104
+ USIndependenceDayAfter2014,
105
+ USLaborDayStarting1887After2014,
106
+ USThanksgivingAfter2014,
107
+ USJuneteenthAfter2022,
108
+ ]
109
+ ),
110
+ ),
111
+ (
112
+ time(8, 15),
113
+ AbstractHolidayCalendar(
114
+ rules=[
115
+ GoodFriday2010,
116
+ GoodFriday2012,
117
+ GoodFriday2015,
118
+ GoodFriday2021,
119
+ GoodFridayAfter2022,
120
+ ]
121
+ ),
122
+ ),
123
+ ]
@@ -1,134 +1,136 @@
1
- from .cme_globex_base import CMEGlobexBaseExchangeCalendar
2
-
3
- from datetime import time
4
- from pandas.tseries.holiday import AbstractHolidayCalendar
5
-
6
- from pandas_market_calendars.holidays.cme import (
7
- USMartinLutherKingJrAfter1998Before2015,
8
- USMartinLutherKingJrAfter1998Before2016FridayBefore,
9
- USMartinLutherKingJrAfter2015,
10
- USPresidentsDayBefore2016FridayBefore,
11
- USPresidentsDayBefore2015,
12
- USPresidentsDayAfter2015,
13
- GoodFridayBefore2021NotEarlyClose,
14
- GoodFridayAfter2021,
15
- GoodFriday2009,
16
- GoodFriday2010,
17
- GoodFriday2012,
18
- GoodFriday2015,
19
- GoodFriday2021,
20
- USMemorialDay2013AndPrior,
21
- USMemorialDayAfter2013,
22
- USMemorialDay2015AndPriorFridayBefore,
23
- USIndependenceDayBefore2014,
24
- USIndependenceDayAfter2014,
25
- USLaborDayStarting1887Before2014,
26
- USLaborDayStarting1887Before2015FridayBefore,
27
- USLaborDayStarting1887After2014,
28
- USThanksgivingBefore2014,
29
- USThanksgivingAfter2014,
30
- USThanksgivingFriday,
31
- )
32
- from pandas_market_calendars.holidays.us import (
33
- USNewYearsDay,
34
- ChristmasEveInOrAfter1993,
35
- Christmas,
36
- USJuneteenthAfter2022,
37
- )
38
-
39
-
40
- class CMEGlobexFixedIncomeCalendar(CMEGlobexBaseExchangeCalendar):
41
- aliases = ["CME Globex Fixed Income", "CME Globex Interest Rate Products"]
42
-
43
- regular_market_times = {
44
- "market_open": ((None, time(18), -1),),
45
- "market_close": ((None, time(17)),),
46
- }
47
-
48
- """
49
- Not yet implemented:
50
- Christmas/New_Years
51
- 5am special open for a couple years (see tests)
52
-
53
- regular market_open/market_close changed from 17/16 to 18/17?
54
- """
55
-
56
- @property
57
- def name(self):
58
- return "CME Globex Fixed Income"
59
-
60
- @property
61
- def regular_holidays(self):
62
- return AbstractHolidayCalendar(
63
- rules=[
64
- USNewYearsDay,
65
- GoodFridayBefore2021NotEarlyClose,
66
- GoodFridayAfter2021,
67
- Christmas,
68
- ]
69
- )
70
-
71
- @property
72
- def special_closes_adhoc(self):
73
- return [
74
- (time(15, 15), ["2010-07-02", "2011-07-01"]),
75
- (time(12, 15), ["2010-12-31"]),
76
- ]
77
-
78
- @property
79
- def special_closes(self):
80
- # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
81
- return [
82
- (
83
- time(12),
84
- AbstractHolidayCalendar(
85
- rules=[
86
- USMartinLutherKingJrAfter1998Before2015,
87
- USMartinLutherKingJrAfter2015,
88
- USPresidentsDayBefore2015,
89
- USPresidentsDayAfter2015,
90
- USMemorialDay2013AndPrior,
91
- USMemorialDayAfter2013,
92
- USIndependenceDayBefore2014,
93
- USIndependenceDayAfter2014,
94
- USLaborDayStarting1887Before2014,
95
- USLaborDayStarting1887After2014,
96
- USThanksgivingBefore2014,
97
- USThanksgivingAfter2014,
98
- USJuneteenthAfter2022,
99
- ]
100
- ),
101
- ),
102
- (
103
- time(15, 15),
104
- AbstractHolidayCalendar(
105
- rules=[
106
- USMartinLutherKingJrAfter1998Before2016FridayBefore,
107
- USPresidentsDayBefore2016FridayBefore,
108
- GoodFriday2009,
109
- USMemorialDay2015AndPriorFridayBefore,
110
- USLaborDayStarting1887Before2015FridayBefore,
111
- ]
112
- ),
113
- ),
114
- (
115
- time(12, 15),
116
- AbstractHolidayCalendar(
117
- rules=[
118
- USThanksgivingFriday,
119
- ChristmasEveInOrAfter1993,
120
- ]
121
- ),
122
- ),
123
- (
124
- time(10, 15),
125
- AbstractHolidayCalendar(
126
- rules=[
127
- GoodFriday2010,
128
- GoodFriday2012,
129
- GoodFriday2015,
130
- GoodFriday2021,
131
- ]
132
- ),
133
- ),
134
- ]
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import AbstractHolidayCalendar
4
+
5
+ from pandas_market_calendars.holidays.cme import (
6
+ USMartinLutherKingJrAfter1998Before2015,
7
+ USMartinLutherKingJrAfter1998Before2016FridayBefore,
8
+ USMartinLutherKingJrAfter2015,
9
+ USPresidentsDayBefore2016FridayBefore,
10
+ USPresidentsDayBefore2015,
11
+ USPresidentsDayAfter2015,
12
+ GoodFridayBefore2021NotEarlyClose,
13
+ GoodFriday2009,
14
+ GoodFriday2010,
15
+ GoodFriday2012,
16
+ GoodFriday2015,
17
+ GoodFriday2021,
18
+ GoodFriday2022,
19
+ GoodFridayAfter2022,
20
+ USMemorialDay2013AndPrior,
21
+ USMemorialDayAfter2013,
22
+ USMemorialDay2015AndPriorFridayBefore,
23
+ USIndependenceDayBefore2014,
24
+ USIndependenceDayAfter2014,
25
+ USLaborDayStarting1887Before2014,
26
+ USLaborDayStarting1887Before2015FridayBefore,
27
+ USLaborDayStarting1887After2014,
28
+ USThanksgivingBefore2014,
29
+ USThanksgivingAfter2014,
30
+ USThanksgivingFriday,
31
+ )
32
+ from pandas_market_calendars.holidays.us import (
33
+ USNewYearsDay,
34
+ ChristmasEveInOrAfter1993,
35
+ Christmas,
36
+ USJuneteenthAfter2022,
37
+ )
38
+ from .cme_globex_base import CMEGlobexBaseExchangeCalendar
39
+
40
+
41
+ class CMEGlobexFixedIncomeCalendar(CMEGlobexBaseExchangeCalendar):
42
+ aliases = ["CME Globex Fixed Income", "CME Globex Interest Rate Products"]
43
+
44
+ regular_market_times = {
45
+ "market_open": ((None, time(18), -1),),
46
+ "market_close": ((None, time(17)),),
47
+ }
48
+
49
+ """
50
+ Not yet implemented:
51
+ Christmas/New_Years
52
+ 5am special open for a couple years (see tests)
53
+
54
+ regular market_open/market_close changed from 17/16 to 18/17?
55
+ """
56
+
57
+ @property
58
+ def name(self):
59
+ return "CME Globex Fixed Income"
60
+
61
+ @property
62
+ def regular_holidays(self):
63
+ return AbstractHolidayCalendar(
64
+ rules=[
65
+ USNewYearsDay,
66
+ GoodFridayBefore2021NotEarlyClose,
67
+ GoodFriday2022,
68
+ Christmas,
69
+ ]
70
+ )
71
+
72
+ @property
73
+ def special_closes_adhoc(self):
74
+ return [
75
+ (time(15, 15), ["2010-07-02", "2011-07-01"]),
76
+ (time(12, 15), ["2010-12-31"]),
77
+ ]
78
+
79
+ @property
80
+ def special_closes(self):
81
+ # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
82
+ return [
83
+ (
84
+ time(12),
85
+ AbstractHolidayCalendar(
86
+ rules=[
87
+ USMartinLutherKingJrAfter1998Before2015,
88
+ USMartinLutherKingJrAfter2015,
89
+ USPresidentsDayBefore2015,
90
+ USPresidentsDayAfter2015,
91
+ USMemorialDay2013AndPrior,
92
+ USMemorialDayAfter2013,
93
+ USIndependenceDayBefore2014,
94
+ USIndependenceDayAfter2014,
95
+ USLaborDayStarting1887Before2014,
96
+ USLaborDayStarting1887After2014,
97
+ USThanksgivingBefore2014,
98
+ USThanksgivingAfter2014,
99
+ USJuneteenthAfter2022,
100
+ ]
101
+ ),
102
+ ),
103
+ (
104
+ time(15, 15),
105
+ AbstractHolidayCalendar(
106
+ rules=[
107
+ USMartinLutherKingJrAfter1998Before2016FridayBefore,
108
+ USPresidentsDayBefore2016FridayBefore,
109
+ GoodFriday2009,
110
+ USMemorialDay2015AndPriorFridayBefore,
111
+ USLaborDayStarting1887Before2015FridayBefore,
112
+ ]
113
+ ),
114
+ ),
115
+ (
116
+ time(12, 15),
117
+ AbstractHolidayCalendar(
118
+ rules=[
119
+ USThanksgivingFriday,
120
+ ChristmasEveInOrAfter1993,
121
+ ]
122
+ ),
123
+ ),
124
+ (
125
+ time(10, 15),
126
+ AbstractHolidayCalendar(
127
+ rules=[
128
+ GoodFriday2010,
129
+ GoodFriday2012,
130
+ GoodFriday2015,
131
+ GoodFriday2021,
132
+ GoodFridayAfter2022,
133
+ ]
134
+ ),
135
+ ),
136
+ ]