QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
types.hpp
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) 2000, 2001, 2002, 2003 RiskMap srl
5 Copyright (C) 2003, 2004, 2005 StatPro Italia srl
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21/*! \file types.hpp
22 \brief Custom types
23*/
24
25#ifndef quantlib_types_hpp
26#define quantlib_types_hpp
27
28#include <ql/qldefines.hpp>
29#include <cstddef>
30
31namespace QuantLib {
32
33 //! integer number
34 /*! \ingroup types */
36
37 //! large integer number
38 /*! \ingroup types */
40
41 //! positive integer
42 /*! \ingroup types */
43 typedef unsigned QL_INTEGER Natural;
44
45 //! large positive integer
46 typedef unsigned QL_BIG_INTEGER BigNatural;
47
48 //! real number
49 /*! \ingroup types */
50 typedef QL_REAL Real;
51
52 //! decimal number
53 /*! \ingroup types */
54 typedef Real Decimal;
55
56 //! size of a container
57 /*! \ingroup types */
58 typedef std::size_t Size;
59
60 //! continuous quantity with 1-year units
61 /*! \ingroup types */
62 typedef Real Time;
63
64 //! discount factor between dates
65 /*! \ingroup types */
67
68 //! interest rates
69 /*! \ingroup types */
70 typedef Real Rate;
71
72 //! spreads on interest rates
73 /*! \ingroup types */
74 typedef Real Spread;
75
76 //! volatility
77 /*! \ingroup types */
79
80 //! probability
81 /*! \ingroup types */
83
84}
85
86
87#endif
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
QL_BIG_INTEGER BigInteger
large integer number
Definition: types.hpp:39
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Real Volatility
volatility
Definition: types.hpp:78
QL_INTEGER Integer
integer number
Definition: types.hpp:35
Real Probability
probability
Definition: types.hpp:82
Real Spread
spreads on interest rates
Definition: types.hpp:74
Real Rate
interest rates
Definition: types.hpp:70
Real Decimal
decimal number
Definition: types.hpp:54
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35
unsigned QL_BIG_INTEGER BigNatural
large positive integer
Definition: types.hpp:46
Global definitions and compiler switches.
#define QL_REAL
Definition: qldefines.hpp:74
#define QL_BIG_INTEGER
Definition: qldefines.hpp:70
#define QL_INTEGER
Definition: qldefines.hpp:66