Coverage Report

Created: 2026-09-28 06:23

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/time/calendars/malta.hpp
Line
Count
Source
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2026 SoftSolution 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
 <https://www.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 malta.hpp
21
    \brief Maltese calendar
22
*/
23
24
#ifndef quantlib_malta_calendar_hpp
25
#define quantlib_malta_calendar_hpp
26
27
#include <ql/time/calendar.hpp>
28
29
namespace QuantLib {
30
31
    //! Malta calendar
32
    /*! Holidays for the Malta Stock Exchange (https://borzamalta.com.mt):
33
      Calendars here https://borzamalta.com.mt/publications-and-statistics?category=54
34
      https://cdn.borzamalta.com.mt/download/2025%20Trading%20Calendar%20EUR_GBP_USD%20Final.pdf
35
        <ul>
36
        <li>Saturdays</li>
37
        <li>Sundays</li>
38
        <li>New Year's Day, January 1st</li>
39
        <li>St. Paul's Shipwreck, February 10th</li>
40
        <li>St. Joseph's Day, March 19th</li>
41
        <li>Freedom Day, March 31st</li>
42
        <li>Good Friday (Orthodox calendar, variable date)</li>
43
        <li>Easter Monday (variable date)</li>
44
        <li>Labour Day, May 1st</li>
45
        <li>Feast of Saints Peter and Paul (Imnarja), June 29th</li>
46
        <li>Assumption of Mary, August 15th</li>
47
        <li>Feast of Our Lady of Victories (Nativity of Mary), September 8th</li>
48
        <li>Independence Day, September 21st</li>
49
        <li>Immaculate Conception, December 8th</li>
50
        <li>Republic Day, December 13th</li>
51
        <li>Christmas Vigil, December 24th</li>
52
        <li>Christmas Day, December 25th</li>
53
        <li>Boxing Day, December 26th (occasionally observed)</li>
54
        <li>New Year's Eve, December 31st (non-trading day)</li>
55
        </ul>
56
57
        Notes:
58
        - Holidays falling on a weekend are generally not shifted.
59
        - Trading hours and holiday observance are set by the Malta Stock Exchange each year.
60
        \ingroup calendars
61
    */
62
63
64
    class Malta : public Calendar {
65
    private:
66
        class MseImpl final : public Calendar::WesternImpl {
67
        public:
68
0
            std::string name() const override { return "Malta Stock Exchange"; }
69
            bool isWeekend(Weekday) const override;
70
            bool isBusinessDay(const Date&) const override;
71
        };
72
73
    public:
74
        enum Market {
75
            MSE //!< Malta Stock Exchange
76
        };
77
        explicit Malta(Market market = MSE);
78
    };
79
80
}
81
82
83
#endif