QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
asia.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 StatPro Italia srl
5 Copyright (C) 2016 Quaternion Risk Management Ltd
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/*
22 Data from http://fx.sauder.ubc.ca/currency_table.html
23 and http://www.thefinancials.com/vortex/CurrencyFormats.html
24*/
25
27
28namespace QuantLib {
29
30 // Bangladesh taka
31 /* The ISO three-letter code is BDT; the numeric code is 50.
32 It is divided in 100 paisa.
33 */
35 static auto bdtData = ext::make_shared<Data>("Bangladesh taka", "BDT", 50, "Bt", "", 100, Rounding());
36 data_ = bdtData;
37 }
38
39 // Chinese yuan
40 /* The ISO three-letter code is CNY; the numeric code is 156.
41 It is divided in 100 fen.
42 */
44 static auto cnyData = ext::make_shared<Data>("Chinese yuan", "CNY", 156, "Y", "", 100, Rounding());
45 data_ = cnyData;
46 }
47
48 // Hong Kong dollar
49 /* The ISO three-letter code is HKD; the numeric code is 344.
50 It is divided in 100 cents.
51 */
53 static auto hkdData = ext::make_shared<Data>("Hong Kong dollar", "HKD", 344, "HK$", "", 100, Rounding());
54 data_ = hkdData;
55 }
56
57 // Indonesian Rupiah
58 /* The ISO three-letter code is IDR; the numeric code is 360.
59 It is divided in 100 sen.
60 */
62 static auto idrData = ext::make_shared<Data>("Indonesian Rupiah", "IDR", 360, "Rp", "", 100, Rounding());
63 data_ = idrData;
64 }
65
66 // Israeli shekel
67 /* The ISO three-letter code is ILS; the numeric code is 376.
68 It is divided in 100 agorot.
69 */
71 static auto ilsData = ext::make_shared<Data>("Israeli shekel", "ILS", 376, "NIS", "", 100, Rounding());
72 data_ = ilsData;
73 }
74
75 // Indian rupee
76 /* The ISO three-letter code is INR; the numeric code is 356.
77 It is divided in 100 paise.
78 */
80 static auto inrData = ext::make_shared<Data>("Indian rupee", "INR", 356, "Rs", "", 100, Rounding());
81 data_ = inrData;
82 }
83
84 // Iraqi dinar
85 /* The ISO three-letter code is IQD; the numeric code is 368.
86 It is divided in 1000 fils.
87 */
89 static auto iqdData = ext::make_shared<Data>("Iraqi dinar", "IQD", 368, "ID", "", 1000, Rounding());
90 data_ = iqdData;
91 }
92
93 // Iranian rial
94 /* The ISO three-letter code is IRR; the numeric code is 364.
95 It has no subdivisions.
96 */
98 static auto irrData = ext::make_shared<Data>("Iranian rial", "IRR", 364, "Rls", "", 1, Rounding());
99 data_ = irrData;
100 }
101
102 // Japanese yen
103 /* The ISO three-letter code is JPY; the numeric code is 392.
104 It is divided into 100 sen.
105 */
107 static auto jpyData = ext::make_shared<Data>("Japanese yen", "JPY", 392, "\xA5", "", 100, Rounding());
108 data_ = jpyData;
109 }
110
111 // South-Korean won
112 /* The ISO three-letter code is KRW; the numeric code is 410.
113 It is divided in 100 chon.
114 */
116 static auto krwData = ext::make_shared<Data>("South-Korean won", "KRW", 410, "W", "", 100, Rounding());
117 data_ = krwData;
118 }
119
120 // Kuwaiti dinar
121 /* The ISO three-letter code is KWD; the numeric code is 414.
122 It is divided in 1000 fils.
123 */
125 static auto kwdData = ext::make_shared<Data>("Kuwaiti dinar", "KWD", 414, "KD", "", 1000, Rounding());
126 data_ = kwdData;
127 }
128
129 // Kazakstani Tenge
130 /* The ISO three-letter code is KZT; the numeric code is 398.
131 It is divided in 100 tijin.
132 */
134 static auto kztData = ext::make_shared<Data>("Kazakstanti Tenge", "KZT", 398, "Kzt", "", 100, Rounding());
135 data_ = kztData;
136 }
137
138 // Malaysian Ringgit
139 /* The ISO three-letter code is MYR; the numeric code is 458.
140 It is divided in 100 sen.
141 */
143 static auto myrData = ext::make_shared<Data>("Malaysian Ringgit", "MYR", 458, "RM", "", 100, Rounding());
144 data_ = myrData;
145 }
146
147 // Nepal rupee
148 /* The ISO three-letter code is NPR; the numeric code is 524.
149 It is divided in 100 paise.
150 */
152 static auto nprData = ext::make_shared<Data>("Nepal rupee", "NPR", 524, "NRs", "", 100, Rounding());
153 data_ = nprData;
154 }
155
156 // Pakistani rupee
157 /* The ISO three-letter code is PKR; the numeric code is 586.
158 It is divided in 100 paisa.
159 */
161 static auto pkrData = ext::make_shared<Data>("Pakistani rupee", "PKR", 586, "Rs", "", 100, Rounding());
162 data_ = pkrData;
163 }
164
165 // Saudi riyal
166 /* The ISO three-letter code is SAR; the numeric code is 682.
167 It is divided in 100 halalat.
168 */
170 static auto sarData = ext::make_shared<Data>("Saudi riyal", "SAR", 682, "SRls", "", 100, Rounding());
171 data_ = sarData;
172 }
173
174 // %Singapore dollar
175 /* The ISO three-letter code is SGD; the numeric code is 702.
176 It is divided in 100 cents.
177 */
179 static auto sgdData = ext::make_shared<Data>("Singapore dollar", "SGD", 702, "S$", "", 100, Rounding());
180 data_ = sgdData;
181 }
182
183 // Thai baht
184 /* The ISO three-letter code is THB; the numeric code is 764.
185 It is divided in 100 stang.
186 */
188 static auto thbData = ext::make_shared<Data>("Thai baht", "THB", 764, "Bht", "", 100, Rounding());
189 data_ = thbData;
190 }
191
192 // %Taiwan dollar
193 /* The ISO three-letter code is TWD; the numeric code is 901.
194 It is divided in 100 cents.
195 */
197 static auto twdData = ext::make_shared<Data>("Taiwan dollar", "TWD", 901, "NT$", "", 100, Rounding());
198 data_ = twdData;
199 }
200
201 // Vietnamese Dong
202 /* The ISO three-letter code is VND; the numeric code is 704.
203 It was divided in 100 xu.
204 */
206 static auto twdData = ext::make_shared<Data>("Vietnamese Dong", "VND", 704, "", "", 100, Rounding());
207 data_ = twdData;
208 }
209
210 // Qatari riyal
212 static auto qarData = ext::make_shared<Data>("Qatari riyal", "QAR", 634, "QAR", "", 100, Rounding());
213 data_ = qarData;
214 }
215
216 // Bahraini dinar
218 static auto bhdData = ext::make_shared<Data>("Bahraini dinar", "BHD", 48, "BHD", "", 1000, Rounding());
219 data_ = bhdData;
220 }
221
222 // Omani rial
224 static auto omrData = ext::make_shared<Data>("Omani rial", "OMR", 512, "OMR", "", 1000, Rounding());
225 data_ = omrData;
226 }
227
228 // Jordanian dinar
230 static auto jodData = ext::make_shared<Data>("Jordanian dinar", "JOD", 400, "JOD", "", 1000, Rounding());
231 data_ = jodData;
232 }
233
234 // United Arab Emirates dirham
236 static auto aedData = ext::make_shared<Data>("United Arab Emirates dirham", "AED", 784, "AED", "", 100, Rounding());
237 data_ = aedData;
238 }
239
240 // Philippine peso
242 static auto phpData = ext::make_shared<Data>("Philippine peso", "PHP", 608, "PHP", "", 100, Rounding());
243 data_ = phpData;
244 }
245
246 // Chinese yuan (Hong Kong)
248 static auto cnhData = ext::make_shared<Data>("Chinese yuan (Hong Kong)", "CNH", 156, "CNH", "", 100, Rounding());
249 data_ = cnhData;
250 }
251
252 // Sri Lankan rupee
254 static auto lkrData = ext::make_shared<Data>("Sri Lankan rupee", "LKR", 144, "LKR", "", 100, Rounding());
255 data_ = lkrData;
256 }
257
258}
259
Asian currencies.
ext::shared_ptr< Data > data_
Definition: currency.hpp:85
basic rounding class
Definition: rounding.hpp:35
Definition: any.hpp:37