Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
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
28namespace QuantExt {
29using 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*/
50class Switzerland : public Calendar {
51private:
53 public:
54 std::string name() const override { return "Switzerland"; }
55 bool isBusinessDay(const Date&) const override;
56 };
58 public:
59 std::string name() const override { return "SIX Swiss Exchange"; }
60 bool isBusinessDay(const Date&) const override;
61 };
62
63public:
64 enum Market {
65 Settlement, //!< generic settlement calendar
66 SIX //!< SIX Swiss Exchange calendar
67 };
69};
70
71} // namespace QuantExt
72
73#endif
bool isBusinessDay(const Date &) const override
Definition: switzerland.cpp:40
std::string name() const override
Definition: switzerland.hpp:54
bool isBusinessDay(const Date &) const override
Definition: switzerland.cpp:71
std::string name() const override
Definition: switzerland.hpp:59
Swiss calendar.
Definition: switzerland.hpp:50
@ Settlement
generic settlement calendar
Definition: switzerland.hpp:65
@ SIX
SIX Swiss Exchange calendar.
Definition: switzerland.hpp:66