1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2005 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 mexico.hpp
21 \brief Mexican calendars
22*/
23
24#ifndef quantlib_mexico_calendar_hpp
25#define quantlib_mexico_calendar_hpp
26
27#include <ql/time/calendar.hpp>
28
29namespace QuantLib {
30
31 //! %Mexican calendars
32 /*! Holidays for the Mexican stock exchange
33 (data from <http://www.bmv.com.mx/>):
34 <ul>
35 <li>Saturdays</li>
36 <li>Sundays</li>
37 <li>New Year's Day, January 1st</li>
38 <li>Constitution Day, first Monday in February
39 (February 5th before 2006)</li>
40 <li>Birthday of Benito Juarez, third Monday in February
41 (March 21st before 2006)</li>
42 <li>Holy Thursday</li>
43 <li>Good Friday</li>
44 <li>Labour Day, May 1st</li>
45 <li>National Day, September 16th</li>
46 <li>All Souls Day, November 2nd (bank holiday, not a public one)</li>
47 <li>Revolution Day, third Monday in November
48 (November 20th before 2006)</li>
49 <li>Our Lady of Guadalupe, December 12th</li>
50 <li>Christmas, December 25th</li>
51 </ul>
52
53 \ingroup calendars
54 */
55 class Mexico : public Calendar {
56 private:
57 class BmvImpl final : public Calendar::WesternImpl {
58 public:
59 std::string name() const override { return "Mexican stock exchange"; }
60 bool isBusinessDay(const Date&) const override;
61 };
62 public:
63 enum Market { BMV //!< Mexican stock exchange
64 };
65 Mexico(Market m = BMV);
66 };
67
68}
69
70
71#endif
72

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