QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
time
calendars
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
30
namespace
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
};
61
SaudiArabia
(
Market
m =
Tadawul
);
62
};
63
64
}
65
66
67
#endif
calendar.hpp
calendar class
QuantLib::Calendar::Impl
abstract base class for calendar implementations
Definition:
calendar.hpp:64
QuantLib::Calendar
calendar class
Definition:
calendar.hpp:61
QuantLib::Date
Concrete date class.
Definition:
date.hpp:125
QuantLib::SaudiArabia::TadawulImpl
Definition:
saudiarabia.hpp:52
QuantLib::SaudiArabia::TadawulImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
saudiarabia.cpp:146
QuantLib::SaudiArabia::TadawulImpl::name
std::string name() const override
Definition:
saudiarabia.hpp:54
QuantLib::SaudiArabia::TadawulImpl::isWeekend
bool isWeekend(Weekday) const override
Definition:
saudiarabia.cpp:142
QuantLib::SaudiArabia
Saudi Arabian calendar.
Definition:
saudiarabia.hpp:50
QuantLib::SaudiArabia::Market
Market
Definition:
saudiarabia.hpp:59
QuantLib::SaudiArabia::Tadawul
@ Tadawul
Tadawul financial market.
Definition:
saudiarabia.hpp:59
QuantLib::Weekday
Weekday
Definition:
weekday.hpp:41
QuantLib
Definition:
any.hpp:35
Generated by
Doxygen
1.9.5