Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
qle
currencies
metals.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2019 Quaternion Risk Management Ltd
3
All rights reserved.
4
5
This file is part of ORE, a free-software/open-source library
6
for transparent pricing and risk analysis - http://opensourcerisk.org
7
8
ORE is free software: you can redistribute it and/or modify it
9
under the terms of the Modified BSD License. You should have received a
10
copy of the license along with this program.
11
The license is also available online at <http://opensourcerisk.org>
12
13
This program is distributed on the basis that it will form a useful
14
contribution to risk analytics and model standardisation, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17
*/
18
19
/*! \file qle/currencies/metals.hpp
20
\brief Extend QuantLib currencies for precious metal codes
21
22
ISO number from http://fx.sauder.ubc.ca/currency_table.html \n
23
We assume all currencies have a format of "%1$.2f %3%" (2 decimal places)
24
\ingroup currencies
25
*/
26
27
#ifndef quantext_currencies_metals_hpp
28
#define quantext_currencies_metals_hpp
29
30
#include <ql/currency.hpp>
31
32
namespace
QuantExt
{
33
using namespace
QuantLib
;
34
35
//! Troy ounce of Gold
36
/*! The ISO three-letter code is XAU; the numeric code is 959.
37
\ingroup currencies
38
*/
39
class
XAUCurrency
:
public
Currency {
40
public
:
41
XAUCurrency
();
42
};
43
44
//! Troy ounce of Silver
45
/*! The ISO three-letter code is XAG; the numeric code is 961.
46
\ingroup currencies
47
*/
48
class
XAGCurrency
:
public
Currency {
49
public
:
50
XAGCurrency
();
51
};
52
53
//! Troy ounce of Platinum
54
/*! The ISO three-letter code is XPT; the numeric code is 962.
55
\ingroup currencies
56
*/
57
class
XPTCurrency
:
public
Currency {
58
public
:
59
XPTCurrency
();
60
};
61
62
//! Troy ounce of Palladium
63
/*! The ISO three-letter code is XPD; the numeric code is 964.
64
\ingroup currencies
65
*/
66
class
XPDCurrency
:
public
Currency {
67
public
:
68
XPDCurrency
();
69
};
70
71
//! Check if a given \p currency is a metal.
72
bool
isMetal
(
const
QuantLib::Currency& currency);
73
74
}
// namespace QuantExt
75
#endif
QuantExt::XAGCurrency
Troy ounce of Silver.
Definition:
metals.hpp:48
QuantExt::XAGCurrency::XAGCurrency
XAGCurrency()
Definition:
metals.cpp:35
QuantExt::XAUCurrency
Troy ounce of Gold.
Definition:
metals.hpp:39
QuantExt::XAUCurrency::XAUCurrency
XAUCurrency()
Definition:
metals.cpp:28
QuantExt::XPDCurrency
Troy ounce of Palladium.
Definition:
metals.hpp:66
QuantExt::XPDCurrency::XPDCurrency
XPDCurrency()
Definition:
metals.cpp:49
QuantExt::XPTCurrency
Troy ounce of Platinum.
Definition:
metals.hpp:57
QuantExt::XPTCurrency::XPTCurrency
XPTCurrency()
Definition:
metals.cpp:42
QuantExt
Definition:
namespaces.docs:19
QuantExt::isMetal
bool isMetal(const Currency ¤cy)
Definition:
metals.cpp:55
QuantLib
Definition:
colombia.cpp:21
Generated by
Doxygen
1.9.5