QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
europe.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 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 // Bulgarian lev
31 /* The ISO three-letter code is BGL; the numeric code is 100.
32 It is divided in 100 stotinki.
33 */
35 static auto bglData = ext::make_shared<Data>("Bulgarian lev", "BGL", 100, "lv", "", 100, Rounding());
36 data_ = bglData;
37 }
38
39 // Belarussian ruble
40 /* The ISO three-letter code is BYR; the numeric code is 974.
41 It has no subdivisions.
42 */
44 static auto byrData = ext::make_shared<Data>("Belarussian ruble", "BYR", 974, "BR", "", 1, Rounding());
45 data_ = byrData;
46 }
47
48 // Swiss franc
49 /* The ISO three-letter code is CHF; the numeric code is 756.
50 It is divided into 100 cents.
51 */
53 static auto chfData = ext::make_shared<Data>("Swiss franc", "CHF", 756, "SwF", "", 100, Rounding());
54 data_ = chfData;
55 }
56
57 // Cyprus pound
58 /* The ISO three-letter code is CYP; the numeric code is 196.
59 It is divided in 100 cents.
60 */
62 static auto cypData = ext::make_shared<Data>("Cyprus pound", "CYP", 196, "\xA3" "C", "", 100, Rounding());
63 data_ = cypData;
64 }
65
66 // Czech koruna
67 /* The ISO three-letter code is CZK; the numeric code is 203.
68 It is divided in 100 haleru.
69 */
71 static auto czkData = ext::make_shared<Data>("Czech koruna", "CZK", 203, "Kc", "", 100, Rounding());
72 data_ = czkData;
73 }
74
75 // Danish krone
76 /* The ISO three-letter code is DKK; the numeric code is 208.
77 It is divided in 100 øre.
78 */
80 static auto dkkData = ext::make_shared<Data>("Danish krone", "DKK", 208, "Dkr", "", 100, Rounding());
81 data_ = dkkData;
82 }
83
84 // Estonian kroon
85 /* The ISO three-letter code is EEK; the numeric code is 233.
86 It is divided in 100 senti.
87 */
89 static auto eekData = ext::make_shared<Data>("Estonian kroon", "EEK", 233, "KR", "", 100, Rounding());
90 data_ = eekData;
91 }
92
93 // European Euro
94 /* The ISO three-letter code is EUR; the numeric code is 978.
95 It is divided into 100 cents.
96 */
98 static auto eurData = ext::make_shared<Data>("European Euro", "EUR", 978, "", "", 100, ClosestRounding(2));
99 data_ = eurData;
100 }
101
102 // British pound sterling
103 /* The ISO three-letter code is GBP; the numeric code is 826.
104 It is divided into 100 pence.
105 */
107 static auto gbpData = ext::make_shared<Data>("British pound sterling", "GBP", 826, "\xA3", "p", 100, Rounding());
108 data_ = gbpData;
109 }
110
111 // Hungarian forint
112 /* The ISO three-letter code is HUF; the numeric code is 348.
113 It has no subdivisions.
114 */
116 static auto hufData = ext::make_shared<Data>("Hungarian forint", "HUF", 348, "Ft", "", 1, Rounding());
117 data_ = hufData;
118 }
119
120 // Icelandic krona
121 /* The ISO three-letter code is ISK; the numeric code is 352.
122 It is divided in 100 aurar.
123 */
125 static auto iskData = ext::make_shared<Data>("Iceland krona", "ISK", 352, "IKr", "", 100, Rounding());
126 data_ = iskData;
127 }
128
129 // Lithuanian litas
130 /* The ISO three-letter code is LTL; the numeric code is 440.
131 It is divided in 100 centu.
132 */
134 static auto ltlData = ext::make_shared<Data>("Lithuanian litas", "LTL", 440, "Lt", "", 100, Rounding());
135 data_ = ltlData;
136 }
137
138 // Latvian lat
139 /* The ISO three-letter code is LVL; the numeric code is 428.
140 It is divided in 100 santims.
141 */
143 static auto lvlData = ext::make_shared<Data>("Latvian lat", "LVL", 428, "Ls", "", 100, Rounding());
144 data_ = lvlData;
145 }
146
147 // Norwegian krone
148 /* The ISO three-letter code is NOK; the numeric code is 578.
149 It is divided in 100 øre.
150 */
152 static auto nokData = ext::make_shared<Data>("Norwegian krone", "NOK", 578, "NKr", "", 100, Rounding());
153 data_ = nokData;
154 }
155
156 // Polish zloty
157 /* The ISO three-letter code is PLN; the numeric code is 985.
158 It is divided in 100 groszy.
159 */
161 static auto plnData = ext::make_shared<Data>("Polish zloty", "PLN", 985, "zl", "", 100, Rounding());
162 data_ = plnData;
163 }
164
165 // Romanian leu
166 /* The ISO three-letter code was ROL; the numeric code was 642.
167 It was divided in 100 bani.
168 */
170 static auto rolData = ext::make_shared<Data>("Romanian leu", "ROL", 642, "L", "", 100, Rounding());
171 data_ = rolData;
172 }
173
174 // Romanian new leu
175 /* The ISO three-letter code is RON; the numeric code is 946.
176 It is divided in 100 bani.
177 */
179 static auto ronData = ext::make_shared<Data>("Romanian new leu", "RON", 946, "L", "", 100, Rounding());
180 data_ = ronData;
181 }
182
183 // Russian ruble
184 /* The ISO three-letter code is RUB; the numeric code is 643.
185 It is divided in 100 kopeyki.
186 */
188 static auto rubData = ext::make_shared<Data>("Russian ruble", "RUB", 643, "", "", 100, Rounding());
189 data_ = rubData;
190 }
191
192 // Swedish krona
193 /* The ISO three-letter code is SEK; the numeric code is 752.
194 It is divided in 100 öre.
195 */
197 static auto sekData = ext::make_shared<Data>("Swedish krona", "SEK", 752, "kr", "", 100, Rounding());
198 data_ = sekData;
199 }
200
201 // Slovenian tolar
202 /* The ISO three-letter code is SIT; the numeric code is 705.
203 It is divided in 100 stotinov.
204 */
206 static auto sitData = ext::make_shared<Data>("Slovenian tolar", "SIT", 705, "SlT", "", 100, Rounding());
207 data_ = sitData;
208 }
209
210 // Turkish lira
211 /* The ISO three-letter code was TRL; the numeric code was 792.
212 It was divided in 100 kurus.
213 */
215 static auto trlData = ext::make_shared<Data>("Turkish lira", "TRL", 792, "TL", "", 100, Rounding());
216 data_ = trlData;
217 }
218
219 // New Turkish lira
220 /* The ISO three-letter code is TRY; the numeric code is 949.
221 It is divided in 100 new kurus.
222 */
224 static auto tryData = ext::make_shared<Data>("New Turkish lira", "TRY", 949, "YTL", "", 100, Rounding());
225 data_ = tryData;
226 }
227
228
229 // currencies obsoleted by Euro
230
231 // Austrian shilling
232 /* The ISO three-letter code was ATS; the numeric code was 40.
233 It was divided in 100 groschen.
234 */
236 static auto atsData = ext::make_shared<Data>("Austrian shilling", "ATS", 40, "", "", 100, Rounding(), EURCurrency());
237 data_ = atsData;
238 }
239
240 // Belgian franc
241 /* The ISO three-letter code was BEF; the numeric code was 56.
242 It had no subdivisions.
243 */
245 static auto befData = ext::make_shared<Data>("Belgian franc", "BEF", 56, "", "", 1, Rounding(), EURCurrency());
246 data_ = befData;
247 }
248
249 // Deutsche mark
250 /* The ISO three-letter code was DEM; the numeric code was 276.
251 It was divided into 100 pfennig.
252 */
254 static auto demData = ext::make_shared<Data>("Deutsche mark", "DEM", 276, "DM", "", 100, Rounding(), EURCurrency());
255 data_ = demData;
256 }
257
258 // Spanish peseta
259 /* The ISO three-letter code was ESP; the numeric code was 724.
260 It was divided in 100 centimos.
261 */
263 static auto espData = ext::make_shared<Data>("Spanish peseta", "ESP", 724, "Pta", "", 100, Rounding(), EURCurrency());
264 data_ = espData;
265 }
266
267 // Finnish markka
268 /* The ISO three-letter code was FIM; the numeric code was 246.
269 It was divided in 100 penniä.
270 */
272 static auto fimData = ext::make_shared<Data>("Finnish markka", "FIM", 246, "mk", "", 100, Rounding(), EURCurrency());
273 data_ = fimData;
274 }
275
276 // French franc
277 /* The ISO three-letter code was FRF; the numeric code was 250.
278 It was divided in 100 centimes.
279 */
281 static auto frfData = ext::make_shared<Data>("French franc", "FRF", 250, "", "", 100, Rounding(), EURCurrency());
282 data_ = frfData;
283 }
284
285 // Greek drachma
286 /* The ISO three-letter code was GRD; the numeric code was 300.
287 It was divided in 100 lepta.
288 */
290 static auto grdData = ext::make_shared<Data>("Greek drachma", "GRD", 300, "", "", 100, Rounding(), EURCurrency());
291 data_ = grdData;
292 }
293
294 // Irish punt
295 /* The ISO three-letter code was IEP; the numeric code was 372.
296 It was divided in 100 pence.
297 */
299 static auto iepData = ext::make_shared<Data>("Irish punt", "IEP", 372, "", "", 100, Rounding(), EURCurrency());
300 data_ = iepData;
301 }
302
303 // Italian lira
304 /* The ISO three-letter code was ITL; the numeric code was 380.
305 It had no subdivisions.
306 */
308 static auto itlData = ext::make_shared<Data>("Italian lira", "ITL", 380, "L", "", 1, Rounding(), EURCurrency());
309 data_ = itlData;
310 }
311
312 // Luxembourg franc
313 /* The ISO three-letter code was LUF; the numeric code was 442.
314 It was divided in 100 centimes.
315 */
317 static auto lufData = ext::make_shared<Data>("Luxembourg franc", "LUF", 442, "F", "", 100, Rounding(), EURCurrency());
318 data_ = lufData;
319 }
320
321 // Maltese lira
322 /* The ISO three-letter code is MTL; the numeric code is 470.
323 It is divided in 100 cents.
324 */
326 static auto mtlData = ext::make_shared<Data>("Maltese lira", "MTL", 470, "Lm", "", 100, Rounding());
327 data_ = mtlData;
328 }
329
330 // Dutch guilder
331 /* The ISO three-letter code was NLG; the numeric code was 528.
332 It was divided in 100 cents.
333 */
335 static auto nlgData = ext::make_shared<Data>("Dutch guilder", "NLG", 528, "f", "", 100, Rounding(), EURCurrency());
336 data_ = nlgData;
337 }
338
339 // Portuguese escudo
340 /* The ISO three-letter code was PTE; the numeric code was 620.
341 It was divided in 100 centavos.
342 */
344 static auto pteData = ext::make_shared<Data>("Portuguese escudo", "PTE", 620, "Esc", "", 100, Rounding(), EURCurrency());
345 data_ = pteData;
346 }
347
348 // Slovak koruna
349 /* The ISO three-letter code is SKK; the numeric code is 703.
350 It is divided in 100 halierov.
351 */
353 static auto skkData = ext::make_shared<Data>("Slovak koruna", "SKK", 703, "Sk", "", 100, Rounding());
354 data_ = skkData;
355 }
356
357 // Ukrainian hryvnia
358 /* The ISO three-letter code is UAH; the numeric code is 980.
359 It is divided in 100 kopiykas.
360 */
362 static auto uahData = ext::make_shared<Data>("Ukrainian hryvnia", "UAH", 980, "hrn", "", 100, Rounding());
363 data_ = uahData;
364 }
365
366 // Serbian dinar
368 static auto rsdData = ext::make_shared<Data>("Serbian dinar", "RSD", 941, "RSD", "", 100, Rounding());
369 data_ = rsdData;
370 }
371
372 // Croatian kuna
374 static auto hrkData = ext::make_shared<Data>("Croatian kuna", "HRK", 191, "HRK", "", 100, Rounding());
375 data_ = hrkData;
376 }
377
378 // Bulgarian lev
380 static auto bgnData = ext::make_shared<Data>("Bulgarian lev", "BGN", 975, "BGN", "", 100, Rounding());
381 data_ = bgnData;
382 }
383
384 // Georgian lari
386 static auto gelData = ext::make_shared<Data>("Georgian lari", "GEL", 981, "GEL", "", 100, Rounding());
387 data_ = gelData;
388 }
389
390}
391
Closest rounding.
Definition: rounding.hpp:106
ext::shared_ptr< Data > data_
Definition: currency.hpp:85
European Euro.
Definition: europe.hpp:123
basic rounding class
Definition: rounding.hpp:35
European currencies.
Definition: any.hpp:37