Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
qle
calendars
switzerland.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2019 Quaternion Risk Management Ltd
3
All rights reserved.
4
5
This file is part of ORE, a free-software/open-source library
6
for transparent pricing and risk analysis - http://opensourcerisk.org
7
8
ORE is free software: you can redistribute it and/or modify it
9
under the terms of the Modified BSD License. You should have received a
10
copy of the license along with this program.
11
The license is also available online at <http://opensourcerisk.org>
12
13
This program is distributed on the basis that it will form a useful
14
contribution to risk analytics and model standardisation, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17
*/
18
19
/*! \file switzerland.hpp
20
\brief Swiss calendar
21
*/
22
23
#ifndef quantext_swiss_calendar_hpp
24
#define quantext_swiss_calendar_hpp
25
26
#include <ql/time/calendar.hpp>
27
28
namespace
QuantExt
{
29
using namespace
QuantLib
;
30
31
//! Swiss calendar
32
/*! Holidays:
33
<ul>
34
<li>Saturdays</li>
35
<li>Sundays</li>
36
<li>New Year's Day, January 1st</li>
37
<li>Berchtoldstag, January 2nd</li>
38
<li>Good Friday</li>
39
<li>Easter Monday</li>
40
<li>Ascension Day</li>
41
<li>Whit Monday</li>
42
<li>Labour Day, May 1st</li>
43
<li>National Day, August 1st</li>
44
<li>Christmas, December 25th</li>
45
<li>St. Stephen's Day, December 26th</li>
46
</ul>
47
48
\ingroup calendars
49
*/
50
class
Switzerland
:
public
Calendar {
51
private
:
52
class
SettlementImpl
:
public
Calendar::WesternImpl
{
53
public
:
54
std::string
name
()
const override
{
return
"Switzerland"
; }
55
bool
isBusinessDay
(
const
Date&)
const override
;
56
};
57
class
SixImpl
:
public
Calendar::WesternImpl
{
58
public
:
59
std::string
name
()
const override
{
return
"SIX Swiss Exchange"
; }
60
bool
isBusinessDay
(
const
Date&)
const override
;
61
};
62
63
public
:
64
enum
Market
{
65
Settlement
,
//!< generic settlement calendar
66
SIX
//!< SIX Swiss Exchange calendar
67
};
68
Switzerland
(
Market
market =
Settlement
);
69
};
70
71
}
// namespace QuantExt
72
73
#endif
QuantExt::Switzerland::SettlementImpl
Definition:
switzerland.hpp:52
QuantExt::Switzerland::SettlementImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
switzerland.cpp:40
QuantExt::Switzerland::SettlementImpl::name
std::string name() const override
Definition:
switzerland.hpp:54
QuantExt::Switzerland::SixImpl
Definition:
switzerland.hpp:57
QuantExt::Switzerland::SixImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
switzerland.cpp:71
QuantExt::Switzerland::SixImpl::name
std::string name() const override
Definition:
switzerland.hpp:59
QuantExt::Switzerland
Swiss calendar.
Definition:
switzerland.hpp:50
QuantExt::Switzerland::Market
Market
Definition:
switzerland.hpp:64
QuantExt::Switzerland::Settlement
@ Settlement
generic settlement calendar
Definition:
switzerland.hpp:65
QuantExt::Switzerland::SIX
@ SIX
SIX Swiss Exchange calendar.
Definition:
switzerland.hpp:66
QuantLib::Calendar::WesternImpl
QuantExt
Definition:
namespaces.docs:19
QuantLib
Definition:
colombia.cpp:21
Generated by
Doxygen
1.9.5