QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
saudiarabia.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004 FIMAT Group
5 Copyright (C) 2007, 2011 StatPro Italia srl
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 saudiarabia.hpp
22 \brief Saudi Arabian calendar
23*/
24
25#ifndef quantlib_saudi_arabian_calendar_hpp
26#define quantlib_saudi_arabian_calendar_hpp
27
28#include <ql/time/calendar.hpp>
29
30namespace QuantLib {
31
32 //! Saudi Arabian calendar
33 /*! Holidays for the Tadawul financial market
34 (data from <http://www.tadawul.com.sa>):
35 <ul>
36 <li>Thursdays</li>
37 <li>Fridays</li>
38 <li>National Day of Saudi Arabia, September 23rd</li>
39 </ul>
40
41 Other holidays for which no rule is given
42 (data available sparsely for 2004-2011 only:)
43 <ul>
44 <li>Eid Al-Adha</li>
45 <li>Eid Al-Fitr</li>
46 </ul>
47
48 \ingroup calendars
49 */
50 class SaudiArabia : public Calendar {
51 private:
52 class TadawulImpl final : public Calendar::Impl {
53 public:
54 std::string name() const override { return "Tadawul"; }
55 bool isWeekend(Weekday) const override;
56 bool isBusinessDay(const Date&) const override;
57 };
58 public:
59 enum Market { Tadawul //!< Tadawul financial market
60 };
62 };
63
64}
65
66
67#endif
calendar class
abstract base class for calendar implementations
Definition: calendar.hpp:64
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
bool isBusinessDay(const Date &) const override
std::string name() const override
Definition: saudiarabia.hpp:54
bool isWeekend(Weekday) const override
Saudi Arabian calendar.
Definition: saudiarabia.hpp:50
@ Tadawul
Tadawul financial market.
Definition: saudiarabia.hpp:59
Definition: any.hpp:35