| 1 | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | |
| 3 | /* |
| 4 | Copyright (C) 2018 Matthias Groncki |
| 5 | |
| 6 | This file is part of QuantLib, a free-software/open-source library |
| 7 | for financial quantitative analysts and developers - http://quantlib.org/ |
| 8 | |
| 9 | QuantLib is free software: you can redistribute it and/or modify it |
| 10 | under the terms of the QuantLib license. You should have received a |
| 11 | copy of the license along with this program; if not, please email |
| 12 | <quantlib-dev@lists.sf.net>. The license is also available online at |
| 13 | <http://quantlib.org/license.shtml>. |
| 14 | |
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT |
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 17 | FOR A PARTICULAR PURPOSE. See the license for more details. |
| 18 | */ |
| 19 | |
| 20 | /*! \file thailand.hpp |
| 21 | \brief Thailand calendars |
| 22 | */ |
| 23 | |
| 24 | #ifndef quantlib_thailand_calendar_hpp |
| 25 | #define quantlib_thailand_calendar_hpp |
| 26 | |
| 27 | #include <ql/time/calendar.hpp> |
| 28 | |
| 29 | namespace QuantLib { |
| 30 | |
| 31 | //! %Thailand calendars |
| 32 | /*! Holidays for the Thailand exchange |
| 33 | Holidays observed by financial institutions (not to be confused with bank holidays in the United Kingdom) are regulated by the Bank of Thailand. |
| 34 | If a holiday fall on a weekend the government will annouce a replacement day (usally the following monday). |
| 35 | |
| 36 | Sometimes the government add one or two extra holidays in a year. |
| 37 | |
| 38 | (data from |
| 39 | https://www.bot.or.th/English/FinancialInstitutions/FIholiday/Pages/2018.aspx: |
| 40 | Fixed holidays |
| 41 | <ul> |
| 42 | <li>Saturdays</li> |
| 43 | <li>Sundays</li> |
| 44 | <li>Chakri Memorial Day, April 6th</li> |
| 45 | <li>Songkran holiday, April 13th - 15th</li> |
| 46 | <li>Labour Day, May 1st</li> |
| 47 | <li>H.M. the King's Birthday, July 28th (from 2017)</li> |
| 48 | <li>H.M. the Queen's Birthday, August 12th </li> |
| 49 | <li>The Passing of H.M. the Late King Bhumibol Adulyadej (Rama IX), October 13th (from 2017) </li> |
| 50 | <li>H.M. the Late King Bhumibol Adulyadej's Birthday, December 5th</li> |
| 51 | <li>Constitution Day, December 10th</li> |
| 52 | <li>New Year's Eve, December 31th</li> |
| 53 | </ul> |
| 54 | |
| 55 | Other holidays for which no rule is given |
| 56 | (data available for 2000-2018 with some years missing) |
| 57 | <ul> |
| 58 | <li>Makha Bucha Day</li> |
| 59 | <li>Wisakha Bucha Day</li> |
| 60 | <li>Buddhist Lent Day (until 2006)</li> |
| 61 | <li>Asarnha Bucha Day (from 2007)</li> |
| 62 | <li>Chulalongkorn Day</li> |
| 63 | <li>Other special holidays</li> |
| 64 | </ul> |
| 65 | |
| 66 | \ingroup calendars |
| 67 | */ |
| 68 | class Thailand : public Calendar { |
| 69 | private: |
| 70 | class SetImpl final : public Calendar::WesternImpl { |
| 71 | public: |
| 72 | std::string name() const override { return "Thailand stock exchange" ; } |
| 73 | bool isBusinessDay(const Date&) const override; |
| 74 | }; |
| 75 | public: |
| 76 | Thailand(); |
| 77 | }; |
| 78 | |
| 79 | } |
| 80 | |
| 81 | |
| 82 | #endif |
| 83 | |