1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004, 2005, 2006 Ferdinando Ametrano
5 Copyright (C) 2006 Katiuscia Manzoni
6 Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
7 Copyright (C) 2003, 2004, 2005, 2006, 2008 StatPro Italia srl
8
9 This file is part of QuantLib, a free-software/open-source library
10 for financial quantitative analysts and developers - http://quantlib.org/
11
12 QuantLib is free software: you can redistribute it and/or modify it
13 under the terms of the QuantLib license. You should have received a
14 copy of the license along with this program; if not, please email
15 <quantlib-dev@lists.sf.net>. The license is also available online at
16 <http://quantlib.org/license.shtml>.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the license for more details.
21*/
22
23/*! \file frequency.hpp
24 \brief Frequency enumeration
25*/
26
27#ifndef quantlib_frequency_hpp
28#define quantlib_frequency_hpp
29
30#include <ql/qldefines.hpp>
31#include <iosfwd>
32
33namespace QuantLib {
34
35 //! Frequency of events
36 /*! \ingroup datetime */
37 enum Frequency { NoFrequency = -1, //!< null frequency
38 Once = 0, //!< only once, e.g., a zero-coupon
39 Annual = 1, //!< once a year
40 Semiannual = 2, //!< twice a year
41 EveryFourthMonth = 3, //!< every fourth month
42 Quarterly = 4, //!< every third month
43 Bimonthly = 6, //!< every second month
44 Monthly = 12, //!< once a month
45 EveryFourthWeek = 13, //!< every fourth week
46 Biweekly = 26, //!< every second week
47 Weekly = 52, //!< once a week
48 Daily = 365, //!< once a day
49 OtherFrequency = 999 //!< some other unknown frequency
50 };
51
52 /*! \relates Frequency */
53 std::ostream& operator<<(std::ostream& out,
54 Frequency f);
55
56}
57
58#endif
59

source code of quantlib/ql/time/frequency.hpp