107 {
109
110 boost::unique_lock<boost::shared_mutex> lock(
mutex_);
111
112
113
114
115
116
117
118
119
120 static std::map<std::string, QuantExt::Calendar> ref = {
121 {"TGT", TARGET()},
122 {"TARGET", TARGET()},
123
124
125 {"CN-IB", China(China::IB)},
126 {"US-FED", UnitedStates(UnitedStates::FederalReserve)},
127 {"US-GOV", UnitedStates(UnitedStates::GovernmentBond)},
128 {"US-NERC", UnitedStates(UnitedStates::NERC)},
129 {"US-NYSE", UnitedStates(UnitedStates::NYSE)},
130 {"US-SET", UnitedStates(UnitedStates::Settlement)},
131 {"US-SOFR", UnitedStates(UnitedStates::SOFR)},
132
133
134 {"Australia", Australia()},
135 {"Canada", Canada()},
136 {"Cyprus", Cyprus()},
137 {"Denmark", Denmark()},
138 {"Greece", Greece()},
140 {"Japan", Japan()},
141 {"Norway", Norway()},
143 {"Sweden", Sweden()},
144 {"Belgium", Belgium()},
145 {"Luxembourg", Luxembourg()},
146 {"Spain", Spain()},
148
149
150 {"FRA", Germany(Germany::Settlement)},
151
152
153 {"CATO", Canada()},
155 {"JPTO", Japan()},
156 {"GBLO", UnitedKingdom()},
157 {"SEST", Sweden()},
158 {"TRIS", Turkey()},
159 {"USNY", UnitedStates(UnitedStates::Settlement)},
160
161
162 {"EUTA", TARGET()},
163 {"BEBR", Belgium()},
164
165
167 {"AR", Argentina()},
168 {"AU", Australia()},
169 {"BW", Botswana()},
170 {"BR", Brazil()},
171 {"CA", Canada()},
172 {"CL", Chile()},
173 {"CN", China()},
174 {"CO", Colombia()},
175 {"CY", Cyprus()},
176 {"CZ", CzechRepublic()},
177 {"DK", Denmark()},
178 {"FI", Finland()},
180 {"GR", Greece()},
181 {"DE", Germany(Germany::Settlement)},
182 {"HK", HongKong()},
183 {"HU", Hungary()},
185 {"IS", Iceland()},
186 {"IN", India()},
187 {"ID", Indonesia()},
188 {"IL", QuantLib::Israel()},
189 {"IT", Italy()},
190 {"JP", Japan()},
191 {"MX", Mexico()},
192 {"MY", Malaysia()},
193 {"NL", Netherlands()},
194 {"NO", Norway()},
195 {"NZ", NewZealand()},
196 {"PE", Peru()},
197 {"PH", Philippines()},
198 {"PL", Poland()},
199 {"RO", Romania()},
200 {"RU", Russia()},
201
202 {"SG", Singapore()},
203 {"ZA", SouthAfrica()},
204 {"KR", SouthKorea(SouthKorea::Settlement)},
205 {"SE", Sweden()},
207 {"TW", Taiwan()},
208 {"TH", Thailand()},
209 {"TR", Turkey()},
210 {"UA", Ukraine()},
211 {"GB", UnitedKingdom()},
212 {"US", UnitedStates(UnitedStates::Settlement)},
213 {"BE", Belgium()},
214 {"LU", Luxembourg()},
215 {"ES", Spain()},
217
218
219 {"ARG", Argentina()},
220 {"AUS", Australia()},
222 {"BWA", Botswana()},
223 {"BRA", Brazil()},
224 {"CAN", Canada()},
225 {"CHL", Chile()},
226 {"CHN", China()},
227 {"COL", Colombia()},
228 {"CYP", Cyprus()},
229 {"CZE", CzechRepublic()},
230 {"DNK", Denmark()},
231 {"FIN", Finland()},
232 {"GRC", Greece()},
233
234 {"DEU", Germany(Germany::Settlement)},
235 {"HKG", HongKong()},
236 {"HUN", Hungary()},
237 {"ISL", Iceland()},
238
240 {"IND", India()},
241 {"IDN", Indonesia()},
242 {"ISR", QuantLib::Israel()},
243 {"ITA", Italy()},
244 {"JPN", Japan()},
245 {"MEX", Mexico()},
246 {"MYS", Malaysia()},
247 {"NLD", Netherlands()},
248 {"NOR", Norway()},
249 {"NZL", NewZealand()},
250 {"PER", Peru()},
251 {"PHL", Philippines()},
252 {"POL", Poland()},
253 {"ROU", Romania()},
254 {"RUS", Russia()},
255 {"SAU", SaudiArabia()},
256 {"SGP", Singapore()},
257 {"ZAF", SouthAfrica()},
258 {"KOR", SouthKorea(SouthKorea::Settlement)},
259 {"SWE", Sweden()},
261 {"TWN", Taiwan()},
262 {"THA", Thailand()},
263 {"TUR", Turkey()},
264 {"UKR", Ukraine()},
265 {"GBR", UnitedKingdom()},
266 {"USA", UnitedStates(UnitedStates::Settlement)},
267 {"BEL", Belgium()},
268 {"LUX", Luxembourg()},
269 {"ESP", Spain()},
271
272
273 {"ARS", Argentina()},
274 {"AUD", Australia()},
275 {"BWP", Botswana()},
276 {"BRL", Brazil()},
277 {"CAD", Canada()},
278 {"CLP", Chile()},
279 {"CNH", China()},
280 {"CNY", China()},
281 {"COP", Colombia()},
282 {"CZK", CzechRepublic()},
283 {"DKK", Denmark()},
285 {"HKD", HongKong()},
286 {"HUF", Hungary()},
287 {"INR", India()},
288 {"IDR", Indonesia()},
289 {"ILS", QuantLib::Israel()},
290 {"ISK", Iceland()},
291 {"ITL", Italy()},
292 {"JPY", Japan()},
293 {"MXN", Mexico()},
294 {"MYR", Malaysia()},
295 {"NOK", Norway()},
296 {"NZD", NewZealand()},
297 {"PEN", Peru()},
298 {"PHP", Philippines()},
299 {"PLN", Poland()},
300 {"RON", Romania()},
301 {"RUB", Russia()},
302 {"SAR", SaudiArabia()},
303 {"SGD", Singapore()},
304 {"ZAR", SouthAfrica()},
305 {"KRW", SouthKorea(SouthKorea::Settlement)},
306 {"SEK", Sweden()},
308 {"EUR", TARGET()},
309 {"TWD", Taiwan()},
310 {"THB", Thailand()},
311 {"TRY", Turkey()},
312 {"UAH", Ukraine()},
313 {"GBP", UnitedKingdom()},
314 {"USD", UnitedStates(UnitedStates::Settlement)},
315 {"BEF", Belgium()},
316 {"LUF", Luxembourg()},
318
319
320 {"GBp", UnitedKingdom()},
321 {"GBX", UnitedKingdom()},
322 {"ILa", QuantLib::Israel()},
323 {"ILX", QuantLib::Israel()},
324 {"ILs", QuantLib::Israel()},
325 {"ILA", QuantLib::Israel()},
326 {"ZAc", SouthAfrica()},
327 {"ZAC", SouthAfrica()},
328 {"ZAX", SouthAfrica()},
329
330
331 {"AED", AmendedCalendar(UnitedArabEmirates(), "AED")},
332 {"AE", AmendedCalendar(UnitedArabEmirates(), "AED")},
333 {"ARE", AmendedCalendar(UnitedArabEmirates(), "AED")},
334
335
336 {"MU", AmendedCalendar(Mauritius(), "MUR")},
337 {"MUR", AmendedCalendar(Mauritius(), "MUR")},
338 {"MUS", AmendedCalendar(Mauritius(), "MUR")},
339
340 {"BHD", AmendedCalendar(WeekendsOnly(), "BHD")},
341 {"CLF", AmendedCalendar(WeekendsOnly(), "CLF")},
342 {"EGP", AmendedCalendar(WeekendsOnly(), "EGP")},
343 {"KWD", AmendedCalendar(WeekendsOnly(), "KWD")},
344 {"KZT", AmendedCalendar(WeekendsOnly(), "KZT")},
345 {"MAD", AmendedCalendar(WeekendsOnly(), "MAD")},
346 {"MXV", AmendedCalendar(WeekendsOnly(), "MXV")},
347 {"NGN", AmendedCalendar(WeekendsOnly(), "MGN")},
348 {"OMR", AmendedCalendar(WeekendsOnly(), "OMR")},
349 {"PKR", AmendedCalendar(WeekendsOnly(), "PKR")},
350 {"QAR", AmendedCalendar(WeekendsOnly(), "QAR")},
351 {"UYU", AmendedCalendar(WeekendsOnly(), "UYU")},
352 {"TND", AmendedCalendar(WeekendsOnly(), "TND")},
353 {"VND", AmendedCalendar(WeekendsOnly(), "VND")},
354
355 {"AOA", AmendedCalendar(WeekendsOnly(), "AOA")},
356 {"BGN", AmendedCalendar(WeekendsOnly(), "BGN")},
357 {"ETB", AmendedCalendar(WeekendsOnly(), "ETB")},
358 {"GEL", AmendedCalendar(WeekendsOnly(), "GEL")},
359 {"GHS", AmendedCalendar(WeekendsOnly(), "GHS")},
360 {"HRK", AmendedCalendar(WeekendsOnly(), "HRK")},
361 {"JOD", AmendedCalendar(WeekendsOnly(), "JOD")},
362 {"KES", AmendedCalendar(WeekendsOnly(), "KES")},
363 {"LKR", AmendedCalendar(WeekendsOnly(), "LKR")},
364 {"RSD", AmendedCalendar(WeekendsOnly(), "RSD")},
365 {"UGX", AmendedCalendar(WeekendsOnly(), "UGX")},
366 {"XOF", AmendedCalendar(WeekendsOnly(), "XOF")},
367 {"ZMW", AmendedCalendar(WeekendsOnly(), "ZMW")},
368
369
370 {"XASX", Australia(Australia::ASX)},
371 {"BVMF", Brazil(Brazil::Exchange)},
372 {"XTSE", Canada(Canada::TSX)},
373 {"XSHG", China(China::SSE)},
374 {"XFRA", Germany(Germany::FrankfurtStockExchange)},
375 {"XETR", Germany(Germany::Xetra)},
376 {"ECAG", Germany(Germany::Eurex)},
377 {"EUWA", Germany(Germany::Euwax)},
378 {"XJKT", Indonesia(Indonesia::JSX)},
379 {"XIDX", Indonesia(Indonesia::IDX)},
380 {"XTAE", QuantLib::Israel(QuantLib::Israel::TASE)},
381 {"XMIL", Italy(Italy::Exchange)},
382 {"MISX", RussiaModified(Russia::MOEX)},
383 {"XKRX", SouthKorea(SouthKorea::KRX)},
385 {"XLON", UnitedKingdom(UnitedKingdom::Exchange)},
386 {"XLME", UnitedKingdom(UnitedKingdom::Metals)},
387 {"XNYS", UnitedStates(UnitedStates::NYSE)},
388 {"XDUB", Ireland()},
389 {"XPAR", QuantLib::France(QuantLib::France::Exchange)},
390
391
392 {"DEN", Denmark()},
394 {"London stock exchange", UnitedKingdom(UnitedKingdom::Exchange)},
395 {"LNB", UnitedKingdom()},
396 {"New York stock exchange", UnitedStates(UnitedStates::NYSE)},
397 {"SOFR fixing calendar", UnitedStates(UnitedStates::SOFR)},
398 {"NGL", Netherlands()},
399 {"NYB", UnitedStates(UnitedStates::Settlement)},
400 {"SA", SouthAfrica()},
401 {"SS", Sweden()},
402 {"SYB", Australia()},
403 {"TKB", Japan()},
404 {"TRB", Canada()},
405 {"UK", UnitedKingdom()},
406 {"UK settlement", UnitedKingdom()},
407 {"US settlement", UnitedStates(UnitedStates::Settlement)},
408 {"US with Libor impact", UnitedStates(UnitedStates::LiborImpact)},
409 {"WMR", Wmr()},
411
412
423
424 {"CME", CME()},
425
426
427 {"WeekendsOnly", WeekendsOnly()},
428 {"UNMAPPED", WeekendsOnly()},
429 {"NullCalendar", NullCalendar()},
430 {"", NullCalendar()}};
431
433
434
435 for (auto const& c : ref) {
437 }
438}
void resetAddedAndRemovedHolidays()