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,66 +1,66 @@
|
|
1
|
-
from datetime import time
|
2
|
-
|
3
|
-
from pandas.tseries.holiday import AbstractHolidayCalendar, GoodFriday, EasterMonday
|
4
|
-
from pytz import timezone
|
5
|
-
|
6
|
-
from pandas_market_calendars.holidays.oz import *
|
7
|
-
from pandas_market_calendars.market_calendar import MarketCalendar
|
8
|
-
|
9
|
-
AbstractHolidayCalendar.start_date = "2011-01-01"
|
10
|
-
|
11
|
-
|
12
|
-
class ASXExchangeCalendar(MarketCalendar):
|
13
|
-
"""
|
14
|
-
Open Time: 10:00 AM, Australia/Sydney
|
15
|
-
Close Time: 4:10 PM, Australia/Sydney
|
16
|
-
|
17
|
-
|
18
|
-
Regularly-Observed Holidays:
|
19
|
-
- New Year's Day (observed on Monday when Jan 1 is a Saturday or Sunday)
|
20
|
-
- Australia Day (observed on Monday when Jan 26 is a Saturday or Sunday)
|
21
|
-
- Good Friday (two days before Easter Sunday)
|
22
|
-
- Easter Monday (the Monday after Easter Sunday)
|
23
|
-
- ANZAC Day (April 25)
|
24
|
-
- Queen's Birthday (second Monday in June)
|
25
|
-
- Christmas Day (December 25, Saturday/Sunday to Monday)
|
26
|
-
- Boxing Day (December 26, Saturday to Monday, Sunday to Tuesday)
|
27
|
-
|
28
|
-
|
29
|
-
Regularly-Observed Early Closes:
|
30
|
-
- Last Business Day before Christmas Day
|
31
|
-
- Last Business Day of the Year
|
32
|
-
|
33
|
-
"""
|
34
|
-
|
35
|
-
aliases = ["ASX"]
|
36
|
-
regular_market_times = {
|
37
|
-
"market_open": ((None, time(10)),),
|
38
|
-
"market_close": ((None, time(16, 10)),),
|
39
|
-
}
|
40
|
-
|
41
|
-
@property
|
42
|
-
def name(self):
|
43
|
-
return "ASX"
|
44
|
-
|
45
|
-
@property
|
46
|
-
def tz(self):
|
47
|
-
return timezone("Australia/Sydney")
|
48
|
-
|
49
|
-
@property
|
50
|
-
def regular_holidays(self):
|
51
|
-
return AbstractHolidayCalendar(
|
52
|
-
rules=[
|
53
|
-
OZNewYearsDay,
|
54
|
-
AustraliaDay,
|
55
|
-
AnzacDay,
|
56
|
-
QueensBirthday,
|
57
|
-
Christmas,
|
58
|
-
BoxingDay,
|
59
|
-
GoodFriday,
|
60
|
-
EasterMonday,
|
61
|
-
]
|
62
|
-
)
|
63
|
-
|
64
|
-
@property
|
65
|
-
def adhoc_holidays(self):
|
66
|
-
return UniqueCloses
|
1
|
+
from datetime import time
|
2
|
+
|
3
|
+
from pandas.tseries.holiday import AbstractHolidayCalendar, GoodFriday, EasterMonday
|
4
|
+
from pytz import timezone
|
5
|
+
|
6
|
+
from pandas_market_calendars.holidays.oz import *
|
7
|
+
from pandas_market_calendars.market_calendar import MarketCalendar
|
8
|
+
|
9
|
+
AbstractHolidayCalendar.start_date = "2011-01-01"
|
10
|
+
|
11
|
+
|
12
|
+
class ASXExchangeCalendar(MarketCalendar):
|
13
|
+
"""
|
14
|
+
Open Time: 10:00 AM, Australia/Sydney
|
15
|
+
Close Time: 4:10 PM, Australia/Sydney
|
16
|
+
|
17
|
+
|
18
|
+
Regularly-Observed Holidays:
|
19
|
+
- New Year's Day (observed on Monday when Jan 1 is a Saturday or Sunday)
|
20
|
+
- Australia Day (observed on Monday when Jan 26 is a Saturday or Sunday)
|
21
|
+
- Good Friday (two days before Easter Sunday)
|
22
|
+
- Easter Monday (the Monday after Easter Sunday)
|
23
|
+
- ANZAC Day (April 25)
|
24
|
+
- Queen's Birthday (second Monday in June)
|
25
|
+
- Christmas Day (December 25, Saturday/Sunday to Monday)
|
26
|
+
- Boxing Day (December 26, Saturday to Monday, Sunday to Tuesday)
|
27
|
+
|
28
|
+
|
29
|
+
Regularly-Observed Early Closes:
|
30
|
+
- Last Business Day before Christmas Day
|
31
|
+
- Last Business Day of the Year
|
32
|
+
|
33
|
+
"""
|
34
|
+
|
35
|
+
aliases = ["ASX"]
|
36
|
+
regular_market_times = {
|
37
|
+
"market_open": ((None, time(10)),),
|
38
|
+
"market_close": ((None, time(16, 10)),),
|
39
|
+
}
|
40
|
+
|
41
|
+
@property
|
42
|
+
def name(self):
|
43
|
+
return "ASX"
|
44
|
+
|
45
|
+
@property
|
46
|
+
def tz(self):
|
47
|
+
return timezone("Australia/Sydney")
|
48
|
+
|
49
|
+
@property
|
50
|
+
def regular_holidays(self):
|
51
|
+
return AbstractHolidayCalendar(
|
52
|
+
rules=[
|
53
|
+
OZNewYearsDay,
|
54
|
+
AustraliaDay,
|
55
|
+
AnzacDay,
|
56
|
+
QueensBirthday,
|
57
|
+
Christmas,
|
58
|
+
BoxingDay,
|
59
|
+
GoodFriday,
|
60
|
+
EasterMonday,
|
61
|
+
]
|
62
|
+
)
|
63
|
+
|
64
|
+
@property
|
65
|
+
def adhoc_holidays(self):
|
66
|
+
return UniqueCloses
|
@@ -1,206 +1,223 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2016 Quantopian, Inc.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
# you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
|
16
|
-
from datetime import time
|
17
|
-
|
18
|
-
from pandas import Timestamp
|
19
|
-
from pandas.tseries.holiday import (
|
20
|
-
AbstractHolidayCalendar,
|
21
|
-
Day,
|
22
|
-
Easter,
|
23
|
-
GoodFriday,
|
24
|
-
Holiday,
|
25
|
-
)
|
26
|
-
from pytz import timezone
|
27
|
-
|
28
|
-
from pandas_market_calendars.market_calendar import FRIDAY, MarketCalendar
|
29
|
-
|
30
|
-
# Universal Confraternization (new years day)
|
31
|
-
ConfUniversal = Holiday(
|
32
|
-
"Dia da Confraternizacao Universal",
|
33
|
-
month=1,
|
34
|
-
day=1,
|
35
|
-
)
|
36
|
-
# Sao Paulo city birthday
|
37
|
-
AniversarioSaoPaulo = Holiday(
|
38
|
-
"Aniversario de Sao Paulo", month=1, day=25, end_date="2021-12-31"
|
39
|
-
)
|
40
|
-
# Carnival Monday
|
41
|
-
CarnavalSegunda = Holiday(
|
42
|
-
"Carnaval Segunda", month=1, day=1, offset=[Easter(), Day(-48)]
|
43
|
-
)
|
44
|
-
# Carnival Tuesday
|
45
|
-
CarnavalTerca = Holiday("Carnaval Terca", month=1, day=1, offset=[Easter(), Day(-47)])
|
46
|
-
# Ash Wednesday (short day)
|
47
|
-
QuartaCinzas = Holiday("Quarta Cinzas", month=1, day=1, offset=[Easter(), Day(-46)])
|
48
|
-
# Good Friday
|
49
|
-
SextaPaixao = GoodFriday
|
50
|
-
# Feast of the Most Holy Body of Christ
|
51
|
-
CorpusChristi = Holiday("Corpus Christi", month=1, day=1, offset=[Easter(), Day(60)])
|
52
|
-
# Tiradentes Memorial
|
53
|
-
Tiradentes = Holiday(
|
54
|
-
"Tiradentes",
|
55
|
-
month=4,
|
56
|
-
day=21,
|
57
|
-
)
|
58
|
-
# Labor Day
|
59
|
-
DiaTrabalho = Holiday(
|
60
|
-
"Dia Trabalho",
|
61
|
-
month=5,
|
62
|
-
day=1,
|
63
|
-
)
|
64
|
-
# Constitutionalist Revolution
|
65
|
-
Constitucionalista = Holiday(
|
66
|
-
"Constitucionalista", month=7, day=9, start_date="1997-01-01", end_date="2019-12-31"
|
67
|
-
)
|
68
|
-
# Independence Day
|
69
|
-
Independencia = Holiday(
|
70
|
-
"Independencia",
|
71
|
-
month=9,
|
72
|
-
day=7,
|
73
|
-
)
|
74
|
-
# Our Lady of Aparecida
|
75
|
-
Aparecida = Holiday(
|
76
|
-
"Nossa Senhora de Aparecida",
|
77
|
-
month=10,
|
78
|
-
day=12,
|
79
|
-
)
|
80
|
-
# All Souls' Day
|
81
|
-
Finados = Holiday(
|
82
|
-
"Dia dos Finados",
|
83
|
-
month=11,
|
84
|
-
day=2,
|
85
|
-
)
|
86
|
-
# Proclamation of the Republic
|
87
|
-
ProclamacaoRepublica = Holiday(
|
88
|
-
"Proclamacao da Republica",
|
89
|
-
month=11,
|
90
|
-
day=15,
|
91
|
-
)
|
92
|
-
# Day of Black Awareness
|
93
|
-
ConscienciaNegra = Holiday(
|
94
|
-
"Dia da Consciencia Negra",
|
95
|
-
month=11,
|
96
|
-
day=20,
|
97
|
-
start_date="2004-01-01",
|
98
|
-
end_date="2019-12-31",
|
99
|
-
)
|
100
|
-
#
|
101
|
-
|
102
|
-
"
|
103
|
-
month=
|
104
|
-
day=
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
)
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
-
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
1
|
+
#
|
2
|
+
# Copyright 2016 Quantopian, Inc.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
from datetime import time
|
17
|
+
|
18
|
+
from pandas import Timestamp
|
19
|
+
from pandas.tseries.holiday import (
|
20
|
+
AbstractHolidayCalendar,
|
21
|
+
Day,
|
22
|
+
Easter,
|
23
|
+
GoodFriday,
|
24
|
+
Holiday,
|
25
|
+
)
|
26
|
+
from pytz import timezone
|
27
|
+
|
28
|
+
from pandas_market_calendars.market_calendar import FRIDAY, MarketCalendar
|
29
|
+
|
30
|
+
# Universal Confraternization (new years day)
|
31
|
+
ConfUniversal = Holiday(
|
32
|
+
"Dia da Confraternizacao Universal",
|
33
|
+
month=1,
|
34
|
+
day=1,
|
35
|
+
)
|
36
|
+
# Sao Paulo city birthday
|
37
|
+
AniversarioSaoPaulo = Holiday(
|
38
|
+
"Aniversario de Sao Paulo", month=1, day=25, end_date="2021-12-31"
|
39
|
+
)
|
40
|
+
# Carnival Monday
|
41
|
+
CarnavalSegunda = Holiday(
|
42
|
+
"Carnaval Segunda", month=1, day=1, offset=[Easter(), Day(-48)]
|
43
|
+
)
|
44
|
+
# Carnival Tuesday
|
45
|
+
CarnavalTerca = Holiday("Carnaval Terca", month=1, day=1, offset=[Easter(), Day(-47)])
|
46
|
+
# Ash Wednesday (short day)
|
47
|
+
QuartaCinzas = Holiday("Quarta Cinzas", month=1, day=1, offset=[Easter(), Day(-46)])
|
48
|
+
# Good Friday
|
49
|
+
SextaPaixao = GoodFriday
|
50
|
+
# Feast of the Most Holy Body of Christ
|
51
|
+
CorpusChristi = Holiday("Corpus Christi", month=1, day=1, offset=[Easter(), Day(60)])
|
52
|
+
# Tiradentes Memorial
|
53
|
+
Tiradentes = Holiday(
|
54
|
+
"Tiradentes",
|
55
|
+
month=4,
|
56
|
+
day=21,
|
57
|
+
)
|
58
|
+
# Labor Day
|
59
|
+
DiaTrabalho = Holiday(
|
60
|
+
"Dia Trabalho",
|
61
|
+
month=5,
|
62
|
+
day=1,
|
63
|
+
)
|
64
|
+
# Constitutionalist Revolution
|
65
|
+
Constitucionalista = Holiday(
|
66
|
+
"Constitucionalista", month=7, day=9, start_date="1997-01-01", end_date="2019-12-31"
|
67
|
+
)
|
68
|
+
# Independence Day
|
69
|
+
Independencia = Holiday(
|
70
|
+
"Independencia",
|
71
|
+
month=9,
|
72
|
+
day=7,
|
73
|
+
)
|
74
|
+
# Our Lady of Aparecida
|
75
|
+
Aparecida = Holiday(
|
76
|
+
"Nossa Senhora de Aparecida",
|
77
|
+
month=10,
|
78
|
+
day=12,
|
79
|
+
)
|
80
|
+
# All Souls' Day
|
81
|
+
Finados = Holiday(
|
82
|
+
"Dia dos Finados",
|
83
|
+
month=11,
|
84
|
+
day=2,
|
85
|
+
)
|
86
|
+
# Proclamation of the Republic
|
87
|
+
ProclamacaoRepublica = Holiday(
|
88
|
+
"Proclamacao da Republica",
|
89
|
+
month=11,
|
90
|
+
day=15,
|
91
|
+
)
|
92
|
+
# Day of Black Awareness (municipal holiday for the city of São Paulo)
|
93
|
+
ConscienciaNegra = Holiday(
|
94
|
+
"Dia da Consciencia Negra",
|
95
|
+
month=11,
|
96
|
+
day=20,
|
97
|
+
start_date="2004-01-01",
|
98
|
+
end_date="2019-12-31",
|
99
|
+
)
|
100
|
+
# Day of Black Awareness (national holiday)
|
101
|
+
ConscienciaNegraNacional = Holiday(
|
102
|
+
"Dia da Consciencia Negra",
|
103
|
+
month=11,
|
104
|
+
day=20,
|
105
|
+
start_date="2023-12-22",
|
106
|
+
)
|
107
|
+
# Christmas Eve
|
108
|
+
VesperaNatal = Holiday(
|
109
|
+
"Vespera Natal",
|
110
|
+
month=12,
|
111
|
+
day=24,
|
112
|
+
)
|
113
|
+
# Christmas
|
114
|
+
Natal = Holiday(
|
115
|
+
"Natal",
|
116
|
+
month=12,
|
117
|
+
day=25,
|
118
|
+
)
|
119
|
+
# New Year's Eve
|
120
|
+
AnoNovo = Holiday(
|
121
|
+
"Ano Novo",
|
122
|
+
month=12,
|
123
|
+
day=31,
|
124
|
+
)
|
125
|
+
# New Year's Eve falls on Saturday
|
126
|
+
AnoNovoSabado = Holiday(
|
127
|
+
"Ano Novo Sabado",
|
128
|
+
month=12,
|
129
|
+
day=30,
|
130
|
+
days_of_week=(FRIDAY,),
|
131
|
+
)
|
132
|
+
# New Year's Eve falls on Sunday
|
133
|
+
AnoNovoDomingo = Holiday(
|
134
|
+
"Ano Novo Domingo",
|
135
|
+
month=12,
|
136
|
+
day=29,
|
137
|
+
days_of_week=(FRIDAY,),
|
138
|
+
)
|
139
|
+
|
140
|
+
##########################
|
141
|
+
# Non-recurring holidays
|
142
|
+
##########################
|
143
|
+
|
144
|
+
Constitucionalista2021 = Timestamp("2021-07-09", tz="UTC")
|
145
|
+
ConscienciaNegra2021 = Timestamp("2021-11-20", tz="UTC")
|
146
|
+
|
147
|
+
|
148
|
+
class BMFExchangeCalendar(MarketCalendar):
|
149
|
+
"""
|
150
|
+
Exchange calendar for BM&F BOVESPA
|
151
|
+
|
152
|
+
Open Time: 10:00 AM, Brazil/Sao Paulo
|
153
|
+
Close Time: 4:00 PM, Brazil/Sao Paulo
|
154
|
+
|
155
|
+
Regularly-Observed Holidays:
|
156
|
+
- Universal Confraternization (New year's day, Jan 1)
|
157
|
+
- Sao Paulo City Anniversary (Jan 25 until 2021)
|
158
|
+
- Carnaval Monday (48 days before Easter)
|
159
|
+
- Carnaval Tuesday (47 days before Easter)
|
160
|
+
- Passion of the Christ (Good Friday, 2 days before Easter)
|
161
|
+
- Corpus Christi (60 days after Easter)
|
162
|
+
- Tiradentes (April 21)
|
163
|
+
- Labor day (May 1)
|
164
|
+
- Constitutionalist Revolution (July 9 from 1997 until 2021, skipping 2020)
|
165
|
+
- Independence Day (September 7)
|
166
|
+
- Our Lady of Aparecida Feast (October 12)
|
167
|
+
- All Souls' Day (November 2)
|
168
|
+
- Proclamation of the Republic (November 15)
|
169
|
+
- Day of Black Awareness, municipal holiday for the city of São Paulo (November 20 from 2004 until 2021, skipping 2020)
|
170
|
+
- Day of Black Awareness, national holiday (November 20 starting in 2024)
|
171
|
+
- Christmas (December 24 and 25)
|
172
|
+
- Friday before New Year's Eve (December 30 or 29 if NYE falls on a Saturday or Sunday, respectively)
|
173
|
+
- New Year's Eve (December 31)
|
174
|
+
"""
|
175
|
+
|
176
|
+
aliases = ["BMF", "B3"]
|
177
|
+
regular_market_times = {
|
178
|
+
"market_open": ((None, time(10, 1)),),
|
179
|
+
"market_close": ((None, time(16)),),
|
180
|
+
}
|
181
|
+
|
182
|
+
@property
|
183
|
+
def name(self):
|
184
|
+
return "BMF"
|
185
|
+
|
186
|
+
@property
|
187
|
+
def tz(self):
|
188
|
+
return timezone("America/Sao_Paulo")
|
189
|
+
|
190
|
+
@property
|
191
|
+
def regular_holidays(self):
|
192
|
+
return AbstractHolidayCalendar(
|
193
|
+
rules=[
|
194
|
+
ConfUniversal,
|
195
|
+
AniversarioSaoPaulo,
|
196
|
+
CarnavalSegunda,
|
197
|
+
CarnavalTerca,
|
198
|
+
SextaPaixao,
|
199
|
+
CorpusChristi,
|
200
|
+
Tiradentes,
|
201
|
+
DiaTrabalho,
|
202
|
+
Constitucionalista,
|
203
|
+
Independencia,
|
204
|
+
Aparecida,
|
205
|
+
Finados,
|
206
|
+
ProclamacaoRepublica,
|
207
|
+
ConscienciaNegra,
|
208
|
+
ConscienciaNegraNacional,
|
209
|
+
VesperaNatal,
|
210
|
+
Natal,
|
211
|
+
AnoNovo,
|
212
|
+
AnoNovoSabado,
|
213
|
+
AnoNovoDomingo,
|
214
|
+
]
|
215
|
+
)
|
216
|
+
|
217
|
+
@property
|
218
|
+
def adhoc_holidays(self):
|
219
|
+
return [Constitucionalista2021, ConscienciaNegra2021]
|
220
|
+
|
221
|
+
@property
|
222
|
+
def special_opens(self):
|
223
|
+
return [(time(13, 1), AbstractHolidayCalendar(rules=[QuartaCinzas]))]
|