QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
time
frequency.cpp
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) 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
#include <
ql/time/frequency.hpp
>
24
#include <
ql/types.hpp
>
25
#include <
ql/errors.hpp
>
26
27
namespace
QuantLib
{
28
29
std::ostream&
operator<<
(std::ostream& out,
Frequency
f
) {
30
switch
(
f
) {
31
case
NoFrequency
:
32
return
out <<
"No-Frequency"
;
33
case
Once
:
34
return
out <<
"Once"
;
35
case
Annual
:
36
return
out <<
"Annual"
;
37
case
Semiannual
:
38
return
out <<
"Semiannual"
;
39
case
EveryFourthMonth
:
40
return
out <<
"Every-Fourth-Month"
;
41
case
Quarterly
:
42
return
out <<
"Quarterly"
;
43
case
Bimonthly
:
44
return
out <<
"Bimonthly"
;
45
case
Monthly
:
46
return
out <<
"Monthly"
;
47
case
EveryFourthWeek
:
48
return
out <<
"Every-fourth-week"
;
49
case
Biweekly
:
50
return
out <<
"Biweekly"
;
51
case
Weekly
:
52
return
out <<
"Weekly"
;
53
case
Daily
:
54
return
out <<
"Daily"
;
55
case
OtherFrequency
:
56
return
out <<
"Unknown frequency"
;
57
default
:
58
QL_FAIL
(
"unknown frequency ("
<<
Integer
(
f
) <<
")"
);
59
}
60
}
61
62
}
f
F f
Definition:
defaultdensitystructure.cpp:32
errors.hpp
Classes and functions for error handling.
QL_FAIL
#define QL_FAIL(message)
throw an error (possibly with file and line information)
Definition:
errors.hpp:92
frequency.hpp
Frequency enumeration.
QuantLib::Frequency
Frequency
Frequency of events.
Definition:
frequency.hpp:37
QuantLib::Monthly
@ Monthly
once a month
Definition:
frequency.hpp:44
QuantLib::Biweekly
@ Biweekly
every second week
Definition:
frequency.hpp:46
QuantLib::EveryFourthWeek
@ EveryFourthWeek
every fourth week
Definition:
frequency.hpp:45
QuantLib::Weekly
@ Weekly
once a week
Definition:
frequency.hpp:47
QuantLib::OtherFrequency
@ OtherFrequency
some other unknown frequency
Definition:
frequency.hpp:49
QuantLib::Annual
@ Annual
once a year
Definition:
frequency.hpp:39
QuantLib::Daily
@ Daily
once a day
Definition:
frequency.hpp:48
QuantLib::Bimonthly
@ Bimonthly
every second month
Definition:
frequency.hpp:43
QuantLib::Once
@ Once
only once, e.g., a zero-coupon
Definition:
frequency.hpp:38
QuantLib::Quarterly
@ Quarterly
every third month
Definition:
frequency.hpp:42
QuantLib::EveryFourthMonth
@ EveryFourthMonth
every fourth month
Definition:
frequency.hpp:41
QuantLib::Semiannual
@ Semiannual
twice a year
Definition:
frequency.hpp:40
QuantLib::NoFrequency
@ NoFrequency
null frequency
Definition:
frequency.hpp:37
QuantLib::Integer
QL_INTEGER Integer
integer number
Definition:
types.hpp:35
QuantLib
Definition:
any.hpp:35
QuantLib::operator<<
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
Definition:
conundrumpricer.hpp:183
types.hpp
Custom types.
Generated by
Doxygen
1.9.5