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.
- pandas_market_calendars/__init__.py +39 -38
- pandas_market_calendars/calendar_registry.py +57 -53
- pandas_market_calendars/calendar_utils.py +1200 -261
- pandas_market_calendars/calendars/asx.py +66 -66
- pandas_market_calendars/calendars/bmf.py +223 -206
- pandas_market_calendars/calendars/bse.py +421 -407
- pandas_market_calendars/calendars/cboe.py +145 -145
- pandas_market_calendars/calendars/cme.py +405 -402
- pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -126
- pandas_market_calendars/calendars/cme_globex_base.py +119 -119
- pandas_market_calendars/calendars/cme_globex_crypto.py +160 -160
- pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -216
- pandas_market_calendars/calendars/cme_globex_equities.py +123 -123
- pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -136
- pandas_market_calendars/calendars/cme_globex_fx.py +101 -101
- pandas_market_calendars/calendars/eurex.py +131 -139
- pandas_market_calendars/calendars/eurex_fixed_income.py +98 -98
- pandas_market_calendars/calendars/hkex.py +429 -426
- pandas_market_calendars/calendars/ice.py +81 -81
- pandas_market_calendars/calendars/iex.py +151 -112
- pandas_market_calendars/calendars/jpx.py +113 -109
- pandas_market_calendars/calendars/lse.py +114 -114
- pandas_market_calendars/calendars/mirror.py +149 -130
- pandas_market_calendars/calendars/nyse.py +1466 -1324
- pandas_market_calendars/calendars/ose.py +116 -116
- pandas_market_calendars/calendars/sifma.py +354 -350
- pandas_market_calendars/calendars/six.py +132 -132
- pandas_market_calendars/calendars/sse.py +311 -311
- pandas_market_calendars/calendars/tase.py +220 -197
- pandas_market_calendars/calendars/tsx.py +181 -181
- pandas_market_calendars/holidays/cme.py +385 -385
- pandas_market_calendars/holidays/cme_globex.py +214 -214
- pandas_market_calendars/holidays/cn.py +1476 -1455
- pandas_market_calendars/holidays/jp.py +401 -398
- pandas_market_calendars/holidays/jpx_equinox.py +1 -0
- pandas_market_calendars/holidays/nyse.py +1536 -1531
- pandas_market_calendars/holidays/oz.py +63 -63
- pandas_market_calendars/holidays/sifma.py +350 -338
- pandas_market_calendars/holidays/us.py +376 -376
- pandas_market_calendars/market_calendar.py +1057 -895
- {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/METADATA +13 -9
- pandas_market_calendars-4.6.0.dist-info/RECORD +50 -0
- {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/WHEEL +1 -1
- pandas_market_calendars-4.3.3.dist-info/RECORD +0 -50
- {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/LICENSE +0 -0
- {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/NOTICE +0 -0
- {pandas_market_calendars-4.3.3.dist-info → pandas_market_calendars-4.6.0.dist-info}/top_level.txt +0 -0
@@ -1,132 +1,132 @@
|
|
1
|
-
from datetime import time
|
2
|
-
|
3
|
-
from pandas.tseries.holiday import (
|
4
|
-
AbstractHolidayCalendar,
|
5
|
-
Day,
|
6
|
-
Easter,
|
7
|
-
EasterMonday,
|
8
|
-
GoodFriday,
|
9
|
-
Holiday,
|
10
|
-
previous_friday,
|
11
|
-
)
|
12
|
-
from pytz import timezone
|
13
|
-
|
14
|
-
from pandas_market_calendars.market_calendar import (
|
15
|
-
FRIDAY,
|
16
|
-
MONDAY,
|
17
|
-
MarketCalendar,
|
18
|
-
THURSDAY,
|
19
|
-
TUESDAY,
|
20
|
-
WEDNESDAY,
|
21
|
-
)
|
22
|
-
|
23
|
-
# New Year's Eve
|
24
|
-
NewYearsEve = Holiday(
|
25
|
-
"New Year's Eve",
|
26
|
-
month=12,
|
27
|
-
day=31,
|
28
|
-
observance=previous_friday,
|
29
|
-
)
|
30
|
-
# New Year's Day
|
31
|
-
NewYearsDay = Holiday(
|
32
|
-
"New Year's Day",
|
33
|
-
month=1,
|
34
|
-
day=1,
|
35
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
36
|
-
)
|
37
|
-
# Berthold's Day
|
38
|
-
BertholdsDay = Holiday(
|
39
|
-
"Berthold's Day",
|
40
|
-
month=1,
|
41
|
-
day=2,
|
42
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
43
|
-
)
|
44
|
-
# Early May bank holiday
|
45
|
-
MayBank = Holiday(
|
46
|
-
"Early May Bank Holiday",
|
47
|
-
month=5,
|
48
|
-
day=1,
|
49
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
50
|
-
)
|
51
|
-
# Ascension Day (Auffahrt)
|
52
|
-
AscensionDay = Holiday(
|
53
|
-
"Ascension Day",
|
54
|
-
month=1,
|
55
|
-
day=1,
|
56
|
-
offset=[Easter(), Day(39)],
|
57
|
-
days_of_week=(THURSDAY,),
|
58
|
-
)
|
59
|
-
# Pentecost Day (Pfingstmontag)
|
60
|
-
PentecostMonday = Holiday(
|
61
|
-
"Pentecost Monday",
|
62
|
-
month=1,
|
63
|
-
day=1,
|
64
|
-
offset=[Easter(), Day(50)],
|
65
|
-
days_of_week=(MONDAY,),
|
66
|
-
)
|
67
|
-
# Swiss National Day
|
68
|
-
SwissNationalDay = Holiday(
|
69
|
-
"Swiss National Day",
|
70
|
-
month=8,
|
71
|
-
day=1,
|
72
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
73
|
-
)
|
74
|
-
# Christmas Eve
|
75
|
-
ChristmasEve = Holiday(
|
76
|
-
"Christmas Eve",
|
77
|
-
month=12,
|
78
|
-
day=24,
|
79
|
-
)
|
80
|
-
# Christmas
|
81
|
-
Christmas = Holiday(
|
82
|
-
"Christmas",
|
83
|
-
month=12,
|
84
|
-
day=25,
|
85
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
86
|
-
)
|
87
|
-
# Boxing day
|
88
|
-
BoxingDay = Holiday(
|
89
|
-
"Boxing Day",
|
90
|
-
month=12,
|
91
|
-
day=26,
|
92
|
-
)
|
93
|
-
|
94
|
-
|
95
|
-
class SIXExchangeCalendar(MarketCalendar):
|
96
|
-
"""
|
97
|
-
Exchange calendar for SIX
|
98
|
-
|
99
|
-
"""
|
100
|
-
|
101
|
-
aliases = ["SIX"]
|
102
|
-
regular_market_times = {
|
103
|
-
"market_open": ((None, time(9)),),
|
104
|
-
"market_close": ((None, time(17, 30)),),
|
105
|
-
}
|
106
|
-
|
107
|
-
@property
|
108
|
-
def name(self):
|
109
|
-
return "SIX"
|
110
|
-
|
111
|
-
@property
|
112
|
-
def tz(self):
|
113
|
-
return timezone("Europe/Zurich")
|
114
|
-
|
115
|
-
@property
|
116
|
-
def regular_holidays(self):
|
117
|
-
return AbstractHolidayCalendar(
|
118
|
-
rules=[
|
119
|
-
NewYearsDay,
|
120
|
-
BertholdsDay,
|
121
|
-
GoodFriday,
|
122
|
-
EasterMonday,
|
123
|
-
MayBank,
|
124
|
-
AscensionDay,
|
125
|
-
PentecostMonday,
|
126
|
-
SwissNationalDay,
|
127
|
-
ChristmasEve,
|
128
|
-
Christmas,
|
129
|
-
BoxingDay,
|
130
|
-
NewYearsEve,
|
131
|
-
]
|
132
|
-
)
|
1
|
+
from datetime import time
|
2
|
+
|
3
|
+
from pandas.tseries.holiday import (
|
4
|
+
AbstractHolidayCalendar,
|
5
|
+
Day,
|
6
|
+
Easter,
|
7
|
+
EasterMonday,
|
8
|
+
GoodFriday,
|
9
|
+
Holiday,
|
10
|
+
previous_friday,
|
11
|
+
)
|
12
|
+
from pytz import timezone
|
13
|
+
|
14
|
+
from pandas_market_calendars.market_calendar import (
|
15
|
+
FRIDAY,
|
16
|
+
MONDAY,
|
17
|
+
MarketCalendar,
|
18
|
+
THURSDAY,
|
19
|
+
TUESDAY,
|
20
|
+
WEDNESDAY,
|
21
|
+
)
|
22
|
+
|
23
|
+
# New Year's Eve
|
24
|
+
NewYearsEve = Holiday(
|
25
|
+
"New Year's Eve",
|
26
|
+
month=12,
|
27
|
+
day=31,
|
28
|
+
observance=previous_friday,
|
29
|
+
)
|
30
|
+
# New Year's Day
|
31
|
+
NewYearsDay = Holiday(
|
32
|
+
"New Year's Day",
|
33
|
+
month=1,
|
34
|
+
day=1,
|
35
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
36
|
+
)
|
37
|
+
# Berthold's Day
|
38
|
+
BertholdsDay = Holiday(
|
39
|
+
"Berthold's Day",
|
40
|
+
month=1,
|
41
|
+
day=2,
|
42
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
43
|
+
)
|
44
|
+
# Early May bank holiday
|
45
|
+
MayBank = Holiday(
|
46
|
+
"Early May Bank Holiday",
|
47
|
+
month=5,
|
48
|
+
day=1,
|
49
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
50
|
+
)
|
51
|
+
# Ascension Day (Auffahrt)
|
52
|
+
AscensionDay = Holiday(
|
53
|
+
"Ascension Day",
|
54
|
+
month=1,
|
55
|
+
day=1,
|
56
|
+
offset=[Easter(), Day(39)],
|
57
|
+
days_of_week=(THURSDAY,),
|
58
|
+
)
|
59
|
+
# Pentecost Day (Pfingstmontag)
|
60
|
+
PentecostMonday = Holiday(
|
61
|
+
"Pentecost Monday",
|
62
|
+
month=1,
|
63
|
+
day=1,
|
64
|
+
offset=[Easter(), Day(50)],
|
65
|
+
days_of_week=(MONDAY,),
|
66
|
+
)
|
67
|
+
# Swiss National Day
|
68
|
+
SwissNationalDay = Holiday(
|
69
|
+
"Swiss National Day",
|
70
|
+
month=8,
|
71
|
+
day=1,
|
72
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
73
|
+
)
|
74
|
+
# Christmas Eve
|
75
|
+
ChristmasEve = Holiday(
|
76
|
+
"Christmas Eve",
|
77
|
+
month=12,
|
78
|
+
day=24,
|
79
|
+
)
|
80
|
+
# Christmas
|
81
|
+
Christmas = Holiday(
|
82
|
+
"Christmas",
|
83
|
+
month=12,
|
84
|
+
day=25,
|
85
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
86
|
+
)
|
87
|
+
# Boxing day
|
88
|
+
BoxingDay = Holiday(
|
89
|
+
"Boxing Day",
|
90
|
+
month=12,
|
91
|
+
day=26,
|
92
|
+
)
|
93
|
+
|
94
|
+
|
95
|
+
class SIXExchangeCalendar(MarketCalendar):
|
96
|
+
"""
|
97
|
+
Exchange calendar for SIX
|
98
|
+
|
99
|
+
"""
|
100
|
+
|
101
|
+
aliases = ["SIX"]
|
102
|
+
regular_market_times = {
|
103
|
+
"market_open": ((None, time(9)),),
|
104
|
+
"market_close": ((None, time(17, 30)),),
|
105
|
+
}
|
106
|
+
|
107
|
+
@property
|
108
|
+
def name(self):
|
109
|
+
return "SIX"
|
110
|
+
|
111
|
+
@property
|
112
|
+
def tz(self):
|
113
|
+
return timezone("Europe/Zurich")
|
114
|
+
|
115
|
+
@property
|
116
|
+
def regular_holidays(self):
|
117
|
+
return AbstractHolidayCalendar(
|
118
|
+
rules=[
|
119
|
+
NewYearsDay,
|
120
|
+
BertholdsDay,
|
121
|
+
GoodFriday,
|
122
|
+
EasterMonday,
|
123
|
+
MayBank,
|
124
|
+
AscensionDay,
|
125
|
+
PentecostMonday,
|
126
|
+
SwissNationalDay,
|
127
|
+
ChristmasEve,
|
128
|
+
Christmas,
|
129
|
+
BoxingDay,
|
130
|
+
NewYearsEve,
|
131
|
+
]
|
132
|
+
)
|