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,139 +1,131 @@
1
- #
2
- # kewlfft
3
- #
4
-
5
- from datetime import time
6
-
7
- from pandas.tseries.holiday import (
8
- AbstractHolidayCalendar,
9
- EasterMonday,
10
- GoodFriday,
11
- Holiday,
12
- previous_friday,
13
- )
14
- from pytz import timezone
15
-
16
- from pandas_market_calendars.market_calendar import (
17
- FRIDAY,
18
- MONDAY,
19
- MarketCalendar,
20
- THURSDAY,
21
- TUESDAY,
22
- WEDNESDAY,
23
- )
24
-
25
- # New Year's Eve
26
- EUREXNewYearsEve = Holiday(
27
- "New Year's Eve",
28
- month=12,
29
- day=31,
30
- observance=previous_friday,
31
- )
32
- # New Year's Day
33
- EUREXNewYearsDay = Holiday(
34
- "New Year's Day",
35
- month=1,
36
- day=1,
37
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
38
- )
39
- # Early May bank holiday
40
- MayBank = Holiday(
41
- "Early May Bank Holiday",
42
- month=5,
43
- day=1,
44
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
45
- )
46
- # German National Holiday (Tag der Deutschen Einheit)
47
- GermanNationalDay = Holiday(
48
- "Tag der Deutschen Einheit",
49
- month=10,
50
- day=3,
51
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
52
- )
53
- # Christmas Eve
54
- ChristmasEve = Holiday(
55
- "Christmas Eve",
56
- month=12,
57
- day=24,
58
- observance=previous_friday,
59
- )
60
- # Christmas
61
- Christmas = Holiday(
62
- "Christmas",
63
- month=12,
64
- day=25,
65
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
66
- )
67
- # If christmas day is Saturday Monday 27th is a holiday
68
- # If christmas day is sunday the Tuesday 27th is a holiday
69
- WeekendChristmas = Holiday(
70
- "Weekend Christmas",
71
- month=12,
72
- day=27,
73
- days_of_week=(MONDAY, TUESDAY),
74
- )
75
- # Boxing day
76
- BoxingDay = Holiday(
77
- "Boxing Day",
78
- month=12,
79
- day=26,
80
- )
81
- # If boxing day is saturday then Monday 28th is a holiday
82
- # If boxing day is sunday then Tuesday 28th is a holiday
83
- WeekendBoxingDay = Holiday(
84
- "Weekend Boxing Day",
85
- month=12,
86
- day=28,
87
- days_of_week=(MONDAY, TUESDAY),
88
- )
89
-
90
-
91
- class EUREXExchangeCalendar(MarketCalendar):
92
- """
93
- Exchange calendar for EUREX
94
-
95
- """
96
-
97
- aliases = ["EUREX"]
98
- regular_market_times = {
99
- "market_open": ((None, time(9)),),
100
- "market_close": ((None, time(17, 30)),),
101
- }
102
-
103
- @property
104
- def name(self):
105
- return "EUREX"
106
-
107
- @property
108
- def tz(self):
109
- return timezone("Europe/Berlin")
110
-
111
- @property
112
- def regular_holidays(self):
113
- return AbstractHolidayCalendar(
114
- rules=[
115
- EUREXNewYearsDay,
116
- GoodFriday,
117
- EasterMonday,
118
- MayBank,
119
- GermanNationalDay,
120
- Christmas,
121
- WeekendChristmas,
122
- BoxingDay,
123
- WeekendBoxingDay,
124
- ]
125
- )
126
-
127
- @property
128
- def special_closes(self):
129
- return [
130
- (
131
- time(12, 30),
132
- AbstractHolidayCalendar(
133
- rules=[
134
- ChristmasEve,
135
- EUREXNewYearsEve,
136
- ]
137
- ),
138
- )
139
- ]
1
+ #
2
+ # kewlfft
3
+ #
4
+
5
+ from datetime import time
6
+
7
+ from pandas.tseries.holiday import (
8
+ AbstractHolidayCalendar,
9
+ EasterMonday,
10
+ GoodFriday,
11
+ Holiday,
12
+ previous_friday,
13
+ )
14
+ from pytz import timezone
15
+
16
+ from pandas_market_calendars.market_calendar import (
17
+ FRIDAY,
18
+ MONDAY,
19
+ MarketCalendar,
20
+ THURSDAY,
21
+ TUESDAY,
22
+ WEDNESDAY,
23
+ )
24
+
25
+ # New Year's Eve
26
+ EUREXNewYearsEve = Holiday(
27
+ "New Year's Eve",
28
+ month=12,
29
+ day=31,
30
+ observance=previous_friday,
31
+ )
32
+ # New Year's Day
33
+ EUREXNewYearsDay = Holiday(
34
+ "New Year's Day",
35
+ month=1,
36
+ day=1,
37
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
38
+ )
39
+ # Early May bank holiday
40
+ MayBank = Holiday(
41
+ "Early May Bank Holiday",
42
+ month=5,
43
+ day=1,
44
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
45
+ )
46
+ # Christmas Eve
47
+ ChristmasEve = Holiday(
48
+ "Christmas Eve",
49
+ month=12,
50
+ day=24,
51
+ observance=previous_friday,
52
+ )
53
+ # Christmas
54
+ Christmas = Holiday(
55
+ "Christmas",
56
+ month=12,
57
+ day=25,
58
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
59
+ )
60
+ # If christmas day is Saturday Monday 27th is a holiday
61
+ # If christmas day is sunday the Tuesday 27th is a holiday
62
+ WeekendChristmas = Holiday(
63
+ "Weekend Christmas",
64
+ month=12,
65
+ day=27,
66
+ days_of_week=(MONDAY, TUESDAY),
67
+ )
68
+ # Boxing day
69
+ BoxingDay = Holiday(
70
+ "Boxing Day",
71
+ month=12,
72
+ day=26,
73
+ )
74
+ # If boxing day is saturday then Monday 28th is a holiday
75
+ # If boxing day is sunday then Tuesday 28th is a holiday
76
+ WeekendBoxingDay = Holiday(
77
+ "Weekend Boxing Day",
78
+ month=12,
79
+ day=28,
80
+ days_of_week=(MONDAY, TUESDAY),
81
+ )
82
+
83
+
84
+ class EUREXExchangeCalendar(MarketCalendar):
85
+ """
86
+ Exchange calendar for EUREX
87
+
88
+ """
89
+
90
+ aliases = ["EUREX"]
91
+ regular_market_times = {
92
+ "market_open": ((None, time(9)),),
93
+ "market_close": ((None, time(17, 30)),),
94
+ }
95
+
96
+ @property
97
+ def name(self):
98
+ return "EUREX"
99
+
100
+ @property
101
+ def tz(self):
102
+ return timezone("Europe/Berlin")
103
+
104
+ @property
105
+ def regular_holidays(self):
106
+ return AbstractHolidayCalendar(
107
+ rules=[
108
+ EUREXNewYearsDay,
109
+ GoodFriday,
110
+ EasterMonday,
111
+ MayBank,
112
+ Christmas,
113
+ WeekendChristmas,
114
+ BoxingDay,
115
+ WeekendBoxingDay,
116
+ ]
117
+ )
118
+
119
+ @property
120
+ def special_closes(self):
121
+ return [
122
+ (
123
+ time(12, 30),
124
+ AbstractHolidayCalendar(
125
+ rules=[
126
+ ChristmasEve,
127
+ EUREXNewYearsEve,
128
+ ]
129
+ ),
130
+ )
131
+ ]
@@ -1,98 +1,98 @@
1
- from datetime import time
2
-
3
- from pandas.tseries.holiday import (
4
- AbstractHolidayCalendar,
5
- EasterMonday,
6
- GoodFriday,
7
- Holiday,
8
- )
9
- from pytz import timezone
10
-
11
- from pandas_market_calendars.market_calendar import (
12
- FRIDAY,
13
- MONDAY,
14
- MarketCalendar,
15
- THURSDAY,
16
- TUESDAY,
17
- WEDNESDAY,
18
- )
19
-
20
- # New Year's Day
21
- EUREXNewYearsDay = Holiday(
22
- "New Year's Day",
23
- month=1,
24
- day=1,
25
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
26
- )
27
- # Early May bank holiday
28
- MayBank = Holiday(
29
- "Early May Bank Holiday",
30
- month=5,
31
- day=1,
32
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
33
- )
34
- # Christmas Eve
35
- ChristmasEve = Holiday(
36
- "Christmas Eve",
37
- month=12,
38
- day=24,
39
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
40
- )
41
- # Christmas
42
- Christmas = Holiday(
43
- "Christmas",
44
- month=12,
45
- day=25,
46
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
47
- )
48
- # Boxing day
49
- BoxingDay = Holiday(
50
- "Boxing Day",
51
- month=12,
52
- day=26,
53
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
54
- )
55
- # New Year's Eve
56
- NewYearsEve = Holiday(
57
- "New Year's Eve",
58
- month=12,
59
- day=31,
60
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
61
- )
62
-
63
-
64
- class EUREXFixedIncomeCalendar(MarketCalendar):
65
- """
66
- Trading calendar available here:
67
- https://www.eurex.com/resource/blob/3378814/910cf372738890f691bc1bfbccfd3aef/data/tradingcalendar_2023_en.pdf
68
- """
69
-
70
- aliases = ["EUREX_Bond"]
71
-
72
- regular_market_times = {
73
- "market_open": ((None, time(1, 10)), ("2018-12-10", time(8, 0))),
74
- "market_close": ((None, time(22)),),
75
- }
76
-
77
- @property
78
- def name(self):
79
- return "EUREX_Bond"
80
-
81
- @property
82
- def tz(self):
83
- return timezone("Europe/Berlin")
84
-
85
- @property
86
- def regular_holidays(self):
87
- return AbstractHolidayCalendar(
88
- rules=[
89
- EUREXNewYearsDay,
90
- GoodFriday,
91
- EasterMonday,
92
- MayBank,
93
- ChristmasEve,
94
- Christmas,
95
- BoxingDay,
96
- NewYearsEve,
97
- ]
98
- )
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import (
4
+ AbstractHolidayCalendar,
5
+ EasterMonday,
6
+ GoodFriday,
7
+ Holiday,
8
+ )
9
+ from pytz import timezone
10
+
11
+ from pandas_market_calendars.market_calendar import (
12
+ FRIDAY,
13
+ MONDAY,
14
+ MarketCalendar,
15
+ THURSDAY,
16
+ TUESDAY,
17
+ WEDNESDAY,
18
+ )
19
+
20
+ # New Year's Day
21
+ EUREXNewYearsDay = Holiday(
22
+ "New Year's Day",
23
+ month=1,
24
+ day=1,
25
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
26
+ )
27
+ # Early May bank holiday
28
+ MayBank = Holiday(
29
+ "Early May Bank Holiday",
30
+ month=5,
31
+ day=1,
32
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
33
+ )
34
+ # Christmas Eve
35
+ ChristmasEve = Holiday(
36
+ "Christmas Eve",
37
+ month=12,
38
+ day=24,
39
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
40
+ )
41
+ # Christmas
42
+ Christmas = Holiday(
43
+ "Christmas",
44
+ month=12,
45
+ day=25,
46
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
47
+ )
48
+ # Boxing day
49
+ BoxingDay = Holiday(
50
+ "Boxing Day",
51
+ month=12,
52
+ day=26,
53
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
54
+ )
55
+ # New Year's Eve
56
+ NewYearsEve = Holiday(
57
+ "New Year's Eve",
58
+ month=12,
59
+ day=31,
60
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
61
+ )
62
+
63
+
64
+ class EUREXFixedIncomeCalendar(MarketCalendar):
65
+ """
66
+ Trading calendar available here:
67
+ https://www.eurex.com/resource/blob/3378814/910cf372738890f691bc1bfbccfd3aef/data/tradingcalendar_2023_en.pdf
68
+ """
69
+
70
+ aliases = ["EUREX_Bond"]
71
+
72
+ regular_market_times = {
73
+ "market_open": ((None, time(1, 10)), ("2018-12-10", time(8, 0))),
74
+ "market_close": ((None, time(22)),),
75
+ }
76
+
77
+ @property
78
+ def name(self):
79
+ return "EUREX_Bond"
80
+
81
+ @property
82
+ def tz(self):
83
+ return timezone("Europe/Berlin")
84
+
85
+ @property
86
+ def regular_holidays(self):
87
+ return AbstractHolidayCalendar(
88
+ rules=[
89
+ EUREXNewYearsDay,
90
+ GoodFriday,
91
+ EasterMonday,
92
+ MayBank,
93
+ ChristmasEve,
94
+ Christmas,
95
+ BoxingDay,
96
+ NewYearsEve,
97
+ ]
98
+ )