QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
time
calendars
singapore.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, 2008, 2009, 2010 StatPro Italia srl
6
Copyright (C) 2024 Skandinaviska Enskilda Banken AB (publ)
7
8
This file is part of QuantLib, a free-software/open-source library
9
for financial quantitative analysts and developers - http://quantlib.org/
10
11
QuantLib is free software: you can redistribute it and/or modify it
12
under the terms of the QuantLib license. You should have received a
13
copy of the license along with this program; if not, please email
14
<quantlib-dev@lists.sf.net>. The license is also available online at
15
<http://quantlib.org/license.shtml>.
16
17
This program is distributed in the hope that it will be useful, but WITHOUT
18
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19
FOR A PARTICULAR PURPOSE. See the license for more details.
20
*/
21
22
/*! \file singapore.hpp
23
\brief Singapore calendars
24
*/
25
26
#ifndef quantlib_singapore_calendar_hpp
27
#define quantlib_singapore_calendar_hpp
28
29
#include <
ql/time/calendar.hpp
>
30
31
namespace
QuantLib
{
32
33
//! %Singapore calendars
34
/*! Holidays for the Singapore exchange
35
(data from
36
<http://www.sgx.com/wps/portal/sgxweb/home/trading/securities/trading_hours_calendar>):
37
<ul>
38
<li>Saturdays</li>
39
<li>Sundays</li>
40
<li>New Year's day, January 1st</li>
41
<li>Good Friday</li>
42
<li>Labour Day, May 1st</li>
43
<li>National Day, August 9th</li>
44
<li>Christmas, December 25th </li>
45
</ul>
46
47
Other holidays for which no rule is given
48
(data available for 2004-2010, 2012-2014, 2019-2024 only:)
49
<ul>
50
<li>Chinese New Year</li>
51
<li>Hari Raya Haji</li>
52
<li>Vesak Poya Day</li>
53
<li>Deepavali</li>
54
<li>Diwali</li>
55
<li>Hari Raya Puasa</li>
56
</ul>
57
58
\ingroup calendars
59
*/
60
class
Singapore
:
public
Calendar
{
61
private
:
62
class
SgxImpl
final :
public
Calendar::WesternImpl
{
63
public
:
64
std::string
name
()
const override
{
return
"Singapore exchange"
; }
65
bool
isBusinessDay
(
const
Date
&)
const override
;
66
};
67
public
:
68
enum
Market
{
SGX
//!< Singapore exchange
69
};
70
Singapore
(
Market
m =
SGX
);
71
};
72
73
}
74
75
76
#endif
calendar.hpp
calendar class
QuantLib::Calendar::WesternImpl
partial calendar implementation
Definition:
calendar.hpp:168
QuantLib::Calendar
calendar class
Definition:
calendar.hpp:61
QuantLib::Date
Concrete date class.
Definition:
date.hpp:125
QuantLib::Singapore::SgxImpl
Definition:
singapore.hpp:62
QuantLib::Singapore::SgxImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
singapore.cpp:32
QuantLib::Singapore::SgxImpl::name
std::string name() const override
Definition:
singapore.hpp:64
QuantLib::Singapore
Singapore calendars
Definition:
singapore.hpp:60
QuantLib::Singapore::Market
Market
Definition:
singapore.hpp:68
QuantLib::Singapore::SGX
@ SGX
Singapore exchange.
Definition:
singapore.hpp:68
QuantLib
Definition:
any.hpp:35
Generated by
Doxygen
1.9.5