QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
time
calendars
russia.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) 2010 StatPro Italia srl
5
6
This file is part of QuantLib, a free-software/open-source library
7
for financial quantitative analysts and developers - http://quantlib.org/
8
9
QuantLib is free software: you can redistribute it and/or modify it
10
under the terms of the QuantLib license. You should have received a
11
copy of the license along with this program; if not, please email
12
<quantlib-dev@lists.sf.net>. The license is also available online at
13
<http://quantlib.org/license.shtml>.
14
15
This program is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
FOR A PARTICULAR PURPOSE. See the license for more details.
18
*/
19
20
/*! \file russia.hpp
21
\brief Russian calendar
22
*/
23
24
#ifndef quantlib_russia_calendar_hpp
25
#define quantlib_russia_calendar_hpp
26
27
#include <
ql/time/calendar.hpp
>
28
29
namespace
QuantLib
{
30
31
//! Russian calendars
32
/*! Public holidays (see <http://www.cbr.ru/eng/>:):
33
<ul>
34
<li>Saturdays</li>
35
<li>Sundays</li>
36
<li>New Year holidays, January 1st to 5th (only 1st and 2nd
37
until 2005)</li>
38
<li>Christmas, January 7th (possibly moved to Monday)</li>
39
<li>Defender of the Fatherland Day, February 23rd (possibly
40
moved to Monday)</li>
41
<li>International Women's Day, March 8th (possibly moved to
42
Monday)</li>
43
<li>Labour Day, May 1st (possibly moved to Monday)</li>
44
<li>Victory Day, May 9th (possibly moved to Monday)</li>
45
<li>Russia Day, June 12th (possibly moved to Monday)</li>
46
<li>Unity Day, November 4th (possibly moved to Monday)</li>
47
</ul>
48
49
Holidays for the Moscow Exchange (MOEX) taken from
50
<http://moex.com/s726> and related pages. These holidays are
51
<em>not</em> consistent year-to-year, may or may not correlate
52
to public holidays, and are only available for dates since the
53
introduction of the MOEX 'brand' (a merger of the stock and
54
futures markets).
55
56
\ingroup calendars
57
*/
58
class
Russia
:
public
Calendar
{
59
private
:
60
class
SettlementImpl
final :
public
Calendar::OrthodoxImpl
{
61
public
:
62
std::string
name
()
const override
{
return
"Russian settlement"
; }
63
bool
isBusinessDay
(
const
Date
&)
const override
;
64
};
65
class
ExchangeImpl
final :
public
Calendar::OrthodoxImpl
{
66
public
:
67
std::string
name
()
const override
{
return
"Moscow exchange"
; }
68
bool
isBusinessDay
(
const
Date
&)
const override
;
69
};
70
public
:
71
//! Russian calendars
72
enum
Market
{
Settlement
,
//!< generic settlement calendar
73
MOEX
//!< Moscow Exchange calendar
74
};
75
Russia
(
Market
=
Settlement
);
76
};
77
78
}
79
80
81
#endif
calendar.hpp
calendar class
QuantLib::Calendar::OrthodoxImpl
partial calendar implementation
Definition:
calendar.hpp:179
QuantLib::Calendar
calendar class
Definition:
calendar.hpp:61
QuantLib::Date
Concrete date class.
Definition:
date.hpp:125
QuantLib::Russia::ExchangeImpl
Definition:
russia.hpp:65
QuantLib::Russia::ExchangeImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
russia.cpp:222
QuantLib::Russia::ExchangeImpl::name
std::string name() const override
Definition:
russia.hpp:67
QuantLib::Russia::SettlementImpl
Definition:
russia.hpp:60
QuantLib::Russia::SettlementImpl::isBusinessDay
bool isBusinessDay(const Date &) const override
Definition:
russia.cpp:84
QuantLib::Russia::SettlementImpl::name
std::string name() const override
Definition:
russia.hpp:62
QuantLib::Russia
Russian calendars.
Definition:
russia.hpp:58
QuantLib::Russia::Market
Market
Russian calendars.
Definition:
russia.hpp:72
QuantLib::Russia::MOEX
@ MOEX
Moscow Exchange calendar.
Definition:
russia.hpp:73
QuantLib::Russia::Settlement
@ Settlement
generic settlement calendar
Definition:
russia.hpp:72
QuantLib
Definition:
any.hpp:35
QuantLib::Settlement
settlement information
Definition:
swaption.hpp:41
Generated by
Doxygen
1.9.5