19#include <ql/shared_ptr.hpp>
29 static ext::shared_ptr<QuantLib::Calendar::Impl> futuresUSImpl(
new ICE::FuturesUSImpl);
32 static ext::shared_ptr<QuantLib::Calendar::Impl> futuresEUImpl(
new ICE::FuturesEUImpl);
42 impl_ = futuresUSImpl;
45 impl_ = futuresUSImpl_1;
48 impl_ = futuresUSImpl_2;
51 impl_ = futuresEUImpl;
54 impl_ = futuresEUImpl_1;
57 impl_ = endexEnergyImpl;
60 impl_ = endexEquitiesImpl;
63 impl_ = swapTradeUSImpl;
66 impl_ = swapTradeUKImpl;
69 impl_ = futuresSingaporeImpl;
72 QL_FAIL(
"unknown market");
78 Weekday w = date.weekday();
79 Day d = date.dayOfMonth();
80 Month m = date.month();
83 Day dd = date.dayOfYear();
84 Day em = easterMonday(y);
88 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
92 || ((d == 25 || (d == 26 && w == Monday) || (d == 24 && w == Friday)) && m == December))
100 Weekday w = date.weekday();
101 Day d = date.dayOfMonth();
102 Month m = date.month();
103 Year y = date.year();
107 || (y >= 1998 && (d >= 15 && d <= 21) && w == Monday && m == January)
109 || ((d >= 15 && d <= 21) && w == Monday && m == February)
111 || (d >= 25 && w == Monday && m == May)
113 || ((d == 4 || (d == 5 && w == Monday) || (d == 3 && w == Friday)) && m == July)
115 || (d <= 7 && w == Monday && m == September)
117 || ((d >= 22 && d <= 28) && w == Thursday && m == November))
125 Weekday w = date.weekday();
126 Day d = date.dayOfMonth();
127 Month m = date.month();
131 || ((d >= 15 && d <= 21) && w == Monday && m == February)
133 || (d > 17 && d <= 24 && w == Monday && m == May)
135 || ((d == 1 || ((d == 2 || d == 3) && w == Monday)) && m == July)
137 || (d <= 7 && w == Monday && m == August)
139 || (d <= 7 && w == Monday && m == September)
141 || (d > 7 && d <= 14 && w == Monday && m == October)
143 || ((d == 26 || (d == 27 && (w == Monday || w == Tuesday))) && m == December))
151 Weekday w = date.weekday();
152 Day d = date.dayOfMonth();
153 Month m = date.month();
154 Year y = date.year();
156 Day dd = date.dayOfYear();
157 Day em = easterMonday(y);
161 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
165 || ((d == 25 || (d == 26 && w == Monday)) && m == December))
173 Weekday w = date.weekday();
174 Day d = date.dayOfMonth();
175 Month m = date.month();
179 || ((d == 26 || ((d == 27 || d == 28) && w == Monday) || (d == 27 && w == Tuesday)) && m == December))
187 Weekday w = date.weekday();
188 Day d = date.dayOfMonth();
189 Month m = date.month();
190 Year y = date.year();
192 Day dd = date.dayOfYear();
193 Day em = easterMonday(y);
197 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
203 || ((d == 25 || (d == 26 && w == Monday)) && m == December)
205 || ((d == 26 || (d == 27 && w == Monday)) && m == December))
213 Weekday w = date.weekday();
214 Day d = date.dayOfMonth();
215 Month m = date.month();
216 Year y = date.year();
218 Day dd = date.dayOfYear();
219 Day em = easterMonday(y);
223 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
229 || (d == 1 && m == May)
231 || ((d == 25 || (d == 26 && w == Monday)) && m == December)
233 || ((d == 26 || (d == 27 && w == Monday)) && m == December))
241 Weekday w = date.weekday();
242 Day d = date.dayOfMonth();
243 Month m = date.month();
244 Year y = date.year();
246 Day dd = date.dayOfYear();
247 Day em = easterMonday(y);
251 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
255 || (y >= 1998 && (d >= 15 && d <= 21) && w == Monday && m == January)
257 || ((d >= 15 && d <= 21) && w == Monday && m == February)
259 || (d >= 25 && w == Monday && m == May)
261 || ((d == 4 || (d == 5 && w == Monday) || (d == 3 && w == Friday)) && m == July)
263 || (d <= 7 && w == Monday && m == September)
265 || ((d >= 8 && d <= 14) && w == Monday && m == October && y >= 1971)
267 || ((d == 11 || (d == 12 && w == Monday) || (d == 10 && w == Friday)) && m == November)
269 || ((d >= 22 && d <= 28) && w == Thursday && m == November)
271 || ((d == 25 || (d == 26 && w == Monday)) && m == December))
279 Weekday w = date.weekday();
280 Day d = date.dayOfMonth();
281 Month m = date.month();
282 Year y = date.year();
284 Day dd = date.dayOfYear();
285 Day em = easterMonday(y);
289 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
295 || (d <= 7 && w == Monday && m == May)
297 || (d >= 25 && w == Monday && m == August)
299 || ((d == 25 || (d == 26 && w == Monday)) && m == December)
301 || ((d == 26 || (d == 27 && w == Monday)) && m == December))
309 Weekday w = date.weekday();
310 Day d = date.dayOfMonth();
311 Month m = date.month();
312 Year y = date.year();
314 Day dd = date.dayOfYear();
315 Day em = easterMonday(y);
319 || ((d == 1 || (d == 2 && w == Monday)) && m == January)
323 || ((d == 25 || (d == 26 && w == Monday)) && m == December))
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
bool isBusinessDay(const QuantLib::Date &d) const override
@ FuturesEU_1
ICE Futures Europe for contracts where 26 Dec is a holiday.
@ FuturesEU
ICE Futures Europe.
@ FuturesUS_2
ICE Futures U.S. Canola.
@ FuturesSingapore
ICE futures Singapore.
@ FuturesUS_1
ICE Futures U.S. Sugar, Cocoa, Coffee, Cotton and FCOJ.
@ EndexEnergy
ICE Endex European power and natural gas products.
@ EndexEquities
ICE Endex European equities.
@ SwapTradeUS
ICE Swap Trade U.S.
@ SwapTradeUK
ICE Swap Trade U.K.
Intercontinental Exchange calendars.