pandas-market-calendars 5.1.0__py3-none-any.whl → 5.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. pandas_market_calendars/__init__.py +39 -39
  2. pandas_market_calendars/calendar_registry.py +57 -57
  3. pandas_market_calendars/calendar_utils.py +1151 -1151
  4. pandas_market_calendars/calendars/asx.py +77 -70
  5. pandas_market_calendars/calendars/bmf.py +226 -219
  6. pandas_market_calendars/calendars/bse.py +432 -425
  7. pandas_market_calendars/calendars/cboe.py +156 -149
  8. pandas_market_calendars/calendars/cme.py +412 -405
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -172
  10. pandas_market_calendars/calendars/cme_globex_base.py +126 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +165 -158
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +223 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +130 -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 +138 -131
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +105 -98
  18. pandas_market_calendars/calendars/hkex.py +438 -431
  19. pandas_market_calendars/calendars/ice.py +88 -81
  20. pandas_market_calendars/calendars/iex.py +162 -155
  21. pandas_market_calendars/calendars/jpx.py +124 -117
  22. pandas_market_calendars/calendars/lse.py +125 -118
  23. pandas_market_calendars/calendars/mirror.py +144 -144
  24. pandas_market_calendars/calendars/nyse.py +1472 -1466
  25. pandas_market_calendars/calendars/ose.py +125 -118
  26. pandas_market_calendars/calendars/sifma.py +390 -383
  27. pandas_market_calendars/calendars/six.py +143 -136
  28. pandas_market_calendars/calendars/sse.py +322 -315
  29. pandas_market_calendars/calendars/tase.py +231 -224
  30. pandas_market_calendars/calendars/tsx.py +192 -185
  31. pandas_market_calendars/class_registry.py +115 -115
  32. pandas_market_calendars/holidays/cme.py +385 -385
  33. pandas_market_calendars/holidays/cme_globex.py +214 -214
  34. pandas_market_calendars/holidays/cn.py +1476 -1476
  35. pandas_market_calendars/holidays/jp.py +401 -401
  36. pandas_market_calendars/holidays/jpx_equinox.py +506 -506
  37. pandas_market_calendars/holidays/nyse.py +1536 -1536
  38. pandas_market_calendars/holidays/oz.py +63 -63
  39. pandas_market_calendars/holidays/sifma.py +350 -350
  40. pandas_market_calendars/holidays/us.py +376 -376
  41. pandas_market_calendars/market_calendar.py +1008 -1008
  42. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/METADATA +3 -1
  43. pandas_market_calendars-5.1.1.dist-info/RECORD +50 -0
  44. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/WHEEL +1 -1
  45. pandas_market_calendars-5.1.0.dist-info/RECORD +0 -50
  46. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/LICENSE +0 -0
  47. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/NOTICE +0 -0
  48. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/top_level.txt +0 -0
@@ -1,118 +1,125 @@
1
- from datetime import time
2
-
3
- from pandas.tseries.holiday import (
4
- AbstractHolidayCalendar,
5
- EasterMonday,
6
- GoodFriday,
7
- Holiday,
8
- )
9
- from pandas.tseries.offsets import Day, Easter
10
- from zoneinfo import ZoneInfo
11
-
12
- from pandas_market_calendars.market_calendar import MarketCalendar
13
-
14
- OSENewYearsDay = Holiday("New Year's Day", month=1, day=1)
15
-
16
- OSEWednesdayBeforeEaster = Holiday(
17
- "Wednesday before Easter", month=1, day=1, offset=[Easter(), Day(-4)]
18
- )
19
-
20
- OSEMaundyThursday = Holiday("Maundy Thursday", month=1, day=1, offset=[Easter(), Day(-3)])
21
-
22
- OSEGoodFriday = GoodFriday
23
-
24
- OSEEasterMonday = EasterMonday
25
-
26
- OSELabourDay = Holiday("Labour Day", month=5, day=1)
27
-
28
- OSEConstitutionDay = Holiday("Constitution Day", month=5, day=17)
29
-
30
- OSEWhitMonday = Holiday("Whit Monday", month=1, day=1, offset=[Easter(), Day(50)])
31
-
32
- OSEAscensionDay = Holiday("Ascension Day", month=1, day=1, offset=[Easter(), Day(39)])
33
-
34
- OSEChristmasEve = Holiday(
35
- "Christmas Eve",
36
- month=12,
37
- day=24,
38
- )
39
-
40
- OSEChristmasDay = Holiday("Christmas Day", month=12, day=25)
41
-
42
- OSEBoxingDay = Holiday("Boxing Day", month=12, day=26)
43
-
44
- OSENewYearsEve = Holiday("New Year's Eve", month=12, day=31)
45
-
46
-
47
- class OSEExchangeCalendar(MarketCalendar):
48
- """
49
- Exchange calendar for Oslo Stock Exchange
50
-
51
- Note these dates are only checked against 2017, 2018 and 2019
52
- https://www.oslobors.no/ob_eng/Oslo-Boers/About-Oslo-Boers/Opening-hours
53
-
54
- Opening times for the regular trading of equities (not including closing auction call)
55
- Open Time: 9:00 AM, CEST/EST
56
- Close Time: 4:20 PM, CEST/EST
57
-
58
- Regularly-Observed Holidays (not necessarily in order):
59
- - New Years Day
60
- - Wednesday before Easter (Half trading day)
61
- - Maundy Thursday
62
- - Good Friday
63
- - Easter Monday
64
- - Labour Day
65
- - Ascension Day
66
- - Constitution Day
67
- - Whit Monday
68
- - Christmas Eve
69
- - Christmas Day
70
- - Boxing Day
71
- - New Year's Eve
72
- """
73
-
74
- aliases = ["OSE"]
75
- regular_market_times = {
76
- "market_open": ((None, time(9)),),
77
- "market_close": ((None, time(16, 20)),),
78
- }
79
-
80
- @property
81
- def name(self):
82
- return "OSE"
83
-
84
- @property
85
- def full_name(self):
86
- return "Oslo Stock Exchange"
87
-
88
- @property
89
- def tz(self):
90
- return ZoneInfo("Europe/Oslo")
91
-
92
- @property
93
- def regular_holidays(self):
94
- return AbstractHolidayCalendar(
95
- rules=[
96
- OSENewYearsDay,
97
- OSEMaundyThursday,
98
- OSEGoodFriday,
99
- OSEEasterMonday,
100
- OSELabourDay,
101
- OSEConstitutionDay,
102
- OSEWhitMonday,
103
- OSEAscensionDay,
104
- OSEChristmasEve,
105
- OSEChristmasDay,
106
- OSEBoxingDay,
107
- OSENewYearsEve,
108
- ]
109
- )
110
-
111
- @property
112
- def special_closes(self):
113
- return [
114
- (
115
- time(13, 0, tzinfo=self.tz),
116
- AbstractHolidayCalendar(rules=[OSEWednesdayBeforeEaster]),
117
- )
118
- ]
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import (
4
+ AbstractHolidayCalendar,
5
+ EasterMonday,
6
+ GoodFriday,
7
+ Holiday,
8
+ )
9
+ from pandas.tseries.offsets import Day, Easter
10
+ import sys
11
+ # check python versiOn aNd import accordingly
12
+ if sys.version_info >= (3, 9):
13
+ # For Python 3.9 and later, import directly
14
+ from zoneinfo import ZoneInfo
15
+ else:
16
+ # For Python 3.8 and earlier, import from backports
17
+ from backports.zoneinfo import ZoneInfo
18
+
19
+ from pandas_market_calendars.market_calendar import MarketCalendar
20
+
21
+ OSENewYearsDay = Holiday("New Year's Day", month=1, day=1)
22
+
23
+ OSEWednesdayBeforeEaster = Holiday(
24
+ "Wednesday before Easter", month=1, day=1, offset=[Easter(), Day(-4)]
25
+ )
26
+
27
+ OSEMaundyThursday = Holiday("Maundy Thursday", month=1, day=1, offset=[Easter(), Day(-3)])
28
+
29
+ OSEGoodFriday = GoodFriday
30
+
31
+ OSEEasterMonday = EasterMonday
32
+
33
+ OSELabourDay = Holiday("Labour Day", month=5, day=1)
34
+
35
+ OSEConstitutionDay = Holiday("Constitution Day", month=5, day=17)
36
+
37
+ OSEWhitMonday = Holiday("Whit Monday", month=1, day=1, offset=[Easter(), Day(50)])
38
+
39
+ OSEAscensionDay = Holiday("Ascension Day", month=1, day=1, offset=[Easter(), Day(39)])
40
+
41
+ OSEChristmasEve = Holiday(
42
+ "Christmas Eve",
43
+ month=12,
44
+ day=24,
45
+ )
46
+
47
+ OSEChristmasDay = Holiday("Christmas Day", month=12, day=25)
48
+
49
+ OSEBoxingDay = Holiday("Boxing Day", month=12, day=26)
50
+
51
+ OSENewYearsEve = Holiday("New Year's Eve", month=12, day=31)
52
+
53
+
54
+ class OSEExchangeCalendar(MarketCalendar):
55
+ """
56
+ Exchange calendar for Oslo Stock Exchange
57
+
58
+ Note these dates are only checked against 2017, 2018 and 2019
59
+ https://www.oslobors.no/ob_eng/Oslo-Boers/About-Oslo-Boers/Opening-hours
60
+
61
+ Opening times for the regular trading of equities (not including closing auction call)
62
+ Open Time: 9:00 AM, CEST/EST
63
+ Close Time: 4:20 PM, CEST/EST
64
+
65
+ Regularly-Observed Holidays (not necessarily in order):
66
+ - New Years Day
67
+ - Wednesday before Easter (Half trading day)
68
+ - Maundy Thursday
69
+ - Good Friday
70
+ - Easter Monday
71
+ - Labour Day
72
+ - Ascension Day
73
+ - Constitution Day
74
+ - Whit Monday
75
+ - Christmas Eve
76
+ - Christmas Day
77
+ - Boxing Day
78
+ - New Year's Eve
79
+ """
80
+
81
+ aliases = ["OSE"]
82
+ regular_market_times = {
83
+ "market_open": ((None, time(9)),),
84
+ "market_close": ((None, time(16, 20)),),
85
+ }
86
+
87
+ @property
88
+ def name(self):
89
+ return "OSE"
90
+
91
+ @property
92
+ def full_name(self):
93
+ return "Oslo Stock Exchange"
94
+
95
+ @property
96
+ def tz(self):
97
+ return ZoneInfo("Europe/Oslo")
98
+
99
+ @property
100
+ def regular_holidays(self):
101
+ return AbstractHolidayCalendar(
102
+ rules=[
103
+ OSENewYearsDay,
104
+ OSEMaundyThursday,
105
+ OSEGoodFriday,
106
+ OSEEasterMonday,
107
+ OSELabourDay,
108
+ OSEConstitutionDay,
109
+ OSEWhitMonday,
110
+ OSEAscensionDay,
111
+ OSEChristmasEve,
112
+ OSEChristmasDay,
113
+ OSEBoxingDay,
114
+ OSENewYearsEve,
115
+ ]
116
+ )
117
+
118
+ @property
119
+ def special_closes(self):
120
+ return [
121
+ (
122
+ time(13, 0, tzinfo=self.tz),
123
+ AbstractHolidayCalendar(rules=[OSEWednesdayBeforeEaster]),
124
+ )
125
+ ]