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
29namespace 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
82

source code of quantlib/ql/time/calendars/russia.hpp