| 1 | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | |
| 3 | /* |
| 4 | Copyright (C) 2015 Paolo Mazzocchi |
| 5 | Copyright (C) 2015 Riccardo Barone |
| 6 | |
| 7 | This file is part of QuantLib, a free-software/open-source library |
| 8 | for financial quantitative analysts and developers - http://quantlib.org/ |
| 9 | |
| 10 | QuantLib is free software: you can redistribute it and/or modify it |
| 11 | under the terms of the QuantLib license. You should have received a |
| 12 | copy of the license along with this program; if not, please email |
| 13 | <quantlib-dev@lists.sf.net>. The license is also available online at |
| 14 | <http://quantlib.org/license.shtml>. |
| 15 | |
| 16 | This program is distributed in the hope that it will be useful, but WITHOUT |
| 17 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 18 | FOR A PARTICULAR PURPOSE. See the license for more details. |
| 19 | */ |
| 20 | |
| 21 | /*! \file israel.hpp |
| 22 | \brief Israelian calendar |
| 23 | */ |
| 24 | |
| 25 | #ifndef quantlib_israel_calendar_hpp |
| 26 | #define quantlib_israel_calendar_hpp |
| 27 | |
| 28 | #include <ql/time/calendar.hpp> |
| 29 | |
| 30 | namespace QuantLib { |
| 31 | |
| 32 | //! Israel calendar |
| 33 | /*! Due to the lack of reliable sources, the settlement calendar |
| 34 | has the same holidays as the Tel Aviv stock-exchange. |
| 35 | |
| 36 | Holidays for the Tel-Aviv Stock Exchange |
| 37 | (data from <http://www.tase.co.il>): |
| 38 | <ul> |
| 39 | <li>Friday</li> |
| 40 | <li>Saturday</li> |
| 41 | </ul> |
| 42 | Other holidays for wich no rule is given |
| 43 | (data available for 2013-2044 only:) |
| 44 | <ul> |
| 45 | <li>Purim, Adar 14th (between Feb 24th & Mar 26th)</li> |
| 46 | <li>Passover I, Nisan 15th (between Mar 26th & Apr 25th)</li> |
| 47 | <li>Passover VII, Nisan 21st (between Apr 1st & May 1st)</li> |
| 48 | <li>Memorial Day, Nisan 27th (between Apr 7th & May 7th)</li> |
| 49 | <li>Indipendence Day, Iyar 5th (between Apr 15th & May 15th)</li> |
| 50 | <li>Pentecost (Shavuot), Sivan 6th (between May 15th & June 14th)</li> |
| 51 | <li>Fast Day</li> |
| 52 | <li>Jewish New Year, Tishrei 1st & 2nd (between Sep 5th & Oct 5th)</li> |
| 53 | <li>Yom Kippur, Tishrei 10th (between Sep 14th & Oct 14th)</li> |
| 54 | <li>Sukkoth, Tishrei 15th (between Sep 19th & Oct 19th)</li> |
| 55 | <li>Simchat Tora, Tishrei 22nd (between Sep 26th & Oct 26th)</li> |
| 56 | </ul> |
| 57 | |
| 58 | |
| 59 | \ingroup calendars |
| 60 | */ |
| 61 | class Israel : public Calendar { |
| 62 | private: |
| 63 | class TelAvivImpl final : public Calendar::Impl { |
| 64 | public: |
| 65 | std::string name() const override { return "Tel Aviv stock exchange" ; } |
| 66 | bool isWeekend(Weekday) const override; |
| 67 | bool isBusinessDay(const Date&) const override; |
| 68 | }; |
| 69 | public: |
| 70 | enum Market { Settlement, //!< generic settlement calendar |
| 71 | TASE //!< Tel-Aviv stock exchange calendar |
| 72 | }; |
| 73 | Israel(Market market = Settlement); |
| 74 | }; |
| 75 | |
| 76 | } |
| 77 | |
| 78 | |
| 79 | #endif |
| 80 | |