1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
|
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2004, 2005, 2006 StatPro Italia srl
Copyright (C) 2016 Quaternion Risk Management Ltd
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
<quantlib-dev@lists.sf.net>. The license is also available online at
<http://quantlib.org/license.shtml>.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
/*
Data from http://fx.sauder.ubc.ca/currency_table.html
and http://www.thefinancials.com/vortex/CurrencyFormats.html
*/
#include <ql/currencies/europe.hpp>
namespace QuantLib {
// Bulgarian lev
/* The ISO three-letter code is BGL; the numeric code is 100.
It is divided in 100 stotinki.
*/
BGLCurrency::BGLCurrency() {
static ext::shared_ptr<Data> bglData(
new Data("Bulgarian lev", "BGL", 100,
"lv", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = bglData;
}
// Belarussian ruble
/* The ISO three-letter code is BYR; the numeric code is 974.
It has no subdivisions.
*/
BYRCurrency::BYRCurrency() {
static ext::shared_ptr<Data> byrData(
new Data("Belarussian ruble", "BYR", 974,
"BR", "", 1,
Rounding(),
"%2% %1$.0f"));
data_ = byrData;
}
// Swiss franc
/* The ISO three-letter code is CHF; the numeric code is 756.
It is divided into 100 cents.
*/
CHFCurrency::CHFCurrency() {
static ext::shared_ptr<Data> chfData(
new Data("Swiss franc", "CHF", 756,
"SwF", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = chfData;
}
// Cyprus pound
/* The ISO three-letter code is CYP; the numeric code is 196.
It is divided in 100 cents.
*/
CYPCurrency::CYPCurrency() {
static ext::shared_ptr<Data> cypData(
new Data("Cyprus pound", "CYP", 196,
"\xA3" "C", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = cypData;
}
// Czech koruna
/* The ISO three-letter code is CZK; the numeric code is 203.
It is divided in 100 haleru.
*/
CZKCurrency::CZKCurrency() {
static ext::shared_ptr<Data> czkData(
new Data("Czech koruna", "CZK", 203,
"Kc", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = czkData;
}
// Danish krone
/* The ISO three-letter code is DKK; the numeric code is 208.
It is divided in 100 re.
*/
DKKCurrency::DKKCurrency() {
static ext::shared_ptr<Data> dkkData(
new Data("Danish krone", "DKK", 208,
"Dkr", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = dkkData;
}
// Estonian kroon
/* The ISO three-letter code is EEK; the numeric code is 233.
It is divided in 100 senti.
*/
EEKCurrency::EEKCurrency() {
static ext::shared_ptr<Data> eekData(
new Data("Estonian kroon", "EEK", 233,
"KR", "", 100,
Rounding(),
"%1$.2f %2%"));
data_ = eekData;
}
// European Euro
/* The ISO three-letter code is EUR; the numeric code is 978.
It is divided into 100 cents.
*/
EURCurrency::EURCurrency() {
static ext::shared_ptr<Data> eurData(
new Data("European Euro", "EUR", 978,
"", "", 100,
ClosestRounding(2),
"%2% %1$.2f"));
data_ = eurData;
}
// British pound sterling
/* The ISO three-letter code is GBP; the numeric code is 826.
It is divided into 100 pence.
*/
GBPCurrency::GBPCurrency() {
static ext::shared_ptr<Data> gbpData(
new Data("British pound sterling", "GBP", 826,
"\xA3", "p", 100,
Rounding(),
"%3% %1$.2f"));
data_ = gbpData;
}
// Hungarian forint
/* The ISO three-letter code is HUF; the numeric code is 348.
It has no subdivisions.
*/
HUFCurrency::HUFCurrency() {
static ext::shared_ptr<Data> hufData(
new Data("Hungarian forint", "HUF", 348,
"Ft", "", 1,
Rounding(),
"%1$.0f %3%"));
data_ = hufData;
}
// Icelandic krona
/* The ISO three-letter code is ISK; the numeric code is 352.
It is divided in 100 aurar.
*/
ISKCurrency::ISKCurrency() {
static ext::shared_ptr<Data> iskData(
new Data("Iceland krona", "ISK", 352,
"IKr", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = iskData;
}
// Lithuanian litas
/* The ISO three-letter code is LTL; the numeric code is 440.
It is divided in 100 centu.
*/
LTLCurrency::LTLCurrency() {
static ext::shared_ptr<Data> ltlData(
new Data("Lithuanian litas", "LTL", 440,
"Lt", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = ltlData;
}
// Latvian lat
/* The ISO three-letter code is LVL; the numeric code is 428.
It is divided in 100 santims.
*/
LVLCurrency::LVLCurrency() {
static ext::shared_ptr<Data> lvlData(
new Data("Latvian lat", "LVL", 428,
"Ls", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = lvlData;
}
// Norwegian krone
/* The ISO three-letter code is NOK; the numeric code is 578.
It is divided in 100 re.
*/
NOKCurrency::NOKCurrency() {
static ext::shared_ptr<Data> nokData(
new Data("Norwegian krone", "NOK", 578,
"NKr", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = nokData;
}
// Polish zloty
/* The ISO three-letter code is PLN; the numeric code is 985.
It is divided in 100 groszy.
*/
PLNCurrency::PLNCurrency() {
static ext::shared_ptr<Data> plnData(
new Data("Polish zloty", "PLN", 985,
"zl", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = plnData;
}
// Romanian leu
/* The ISO three-letter code was ROL; the numeric code was 642.
It was divided in 100 bani.
*/
ROLCurrency::ROLCurrency() {
static ext::shared_ptr<Data> rolData(
new Data("Romanian leu", "ROL", 642,
"L", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = rolData;
}
// Romanian new leu
/* The ISO three-letter code is RON; the numeric code is 946.
It is divided in 100 bani.
*/
RONCurrency::RONCurrency() {
static ext::shared_ptr<Data> ronData(
new Data("Romanian new leu",
"RON", 946,
"L", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = ronData;
}
// Russian ruble
/* The ISO three-letter code is RUB; the numeric code is 643.
It is divided in 100 kopeyki.
*/
RUBCurrency::RUBCurrency() {
static ext::shared_ptr<Data> rubData(
new Data("Russian ruble",
"RUB", 643,
"", "", 100,
Rounding(),
"%1$.2f %2%"));
data_ = rubData;
}
// Swedish krona
/* The ISO three-letter code is SEK; the numeric code is 752.
It is divided in 100 re.
*/
SEKCurrency::SEKCurrency() {
static ext::shared_ptr<Data> sekData(
new Data("Swedish krona", "SEK", 752,
"kr", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = sekData;
}
// Slovenian tolar
/* The ISO three-letter code is SIT; the numeric code is 705.
It is divided in 100 stotinov.
*/
SITCurrency::SITCurrency() {
static ext::shared_ptr<Data> sitData(
new Data("Slovenian tolar", "SIT", 705,
"SlT", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = sitData;
}
// Turkish lira
/* The ISO three-letter code was TRL; the numeric code was 792.
It was divided in 100 kurus.
*/
TRLCurrency::TRLCurrency() {
static ext::shared_ptr<Data> trlData(
new Data("Turkish lira", "TRL", 792,
"TL", "", 100,
Rounding(),
"%1$.0f %3%"));
data_ = trlData;
}
// New Turkish lira
/* The ISO three-letter code is TRY; the numeric code is 949.
It is divided in 100 new kurus.
*/
TRYCurrency::TRYCurrency() {
static ext::shared_ptr<Data> tryData(
new Data("New Turkish lira", "TRY", 949,
"YTL", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = tryData;
}
// currencies obsoleted by Euro
// Austrian shilling
/* The ISO three-letter code was ATS; the numeric code was 40.
It was divided in 100 groschen.
*/
ATSCurrency::ATSCurrency() {
static ext::shared_ptr<Data> atsData(
new Data("Austrian shilling", "ATS", 40,
"", "", 100,
Rounding(),
"%2% %1$.2f",
EURCurrency()));
data_ = atsData;
}
// Belgian franc
/* The ISO three-letter code was BEF; the numeric code was 56.
It had no subdivisions.
*/
BEFCurrency::BEFCurrency() {
static ext::shared_ptr<Data> befData(
new Data("Belgian franc", "BEF", 56,
"", "", 1,
Rounding(),
"%2% %1$.0f",
EURCurrency()));
data_ = befData;
}
// Deutsche mark
/* The ISO three-letter code was DEM; the numeric code was 276.
It was divided into 100 pfennig.
*/
DEMCurrency::DEMCurrency() {
static ext::shared_ptr<Data> demData(
new Data("Deutsche mark", "DEM", 276,
"DM", "", 100,
Rounding(),
"%1$.2f %3%",
EURCurrency()));
data_ = demData;
}
// Spanish peseta
/* The ISO three-letter code was ESP; the numeric code was 724.
It was divided in 100 centimos.
*/
ESPCurrency::ESPCurrency() {
static ext::shared_ptr<Data> espData(
new Data("Spanish peseta", "ESP", 724,
"Pta", "", 100,
Rounding(),
"%1$.0f %3%",
EURCurrency()));
data_ = espData;
}
// Finnish markka
/* The ISO three-letter code was FIM; the numeric code was 246.
It was divided in 100 penni.
*/
FIMCurrency::FIMCurrency() {
static ext::shared_ptr<Data> fimData(
new Data("Finnish markka", "FIM", 246,
"mk", "", 100,
Rounding(),
"%1$.2f %3%",
EURCurrency()));
data_ = fimData;
}
// French franc
/* The ISO three-letter code was FRF; the numeric code was 250.
It was divided in 100 centimes.
*/
FRFCurrency::FRFCurrency() {
static ext::shared_ptr<Data> frfData(
new Data("French franc", "FRF", 250,
"", "", 100,
Rounding(),
"%1$.2f %2%",
EURCurrency()));
data_ = frfData;
}
// Greek drachma
/* The ISO three-letter code was GRD; the numeric code was 300.
It was divided in 100 lepta.
*/
GRDCurrency::GRDCurrency() {
static ext::shared_ptr<Data> grdData(
new Data("Greek drachma", "GRD", 300,
"", "", 100,
Rounding(),
"%1$.2f %2%",
EURCurrency()));
data_ = grdData;
}
// Irish punt
/* The ISO three-letter code was IEP; the numeric code was 372.
It was divided in 100 pence.
*/
IEPCurrency::IEPCurrency() {
static ext::shared_ptr<Data> iepData(
new Data("Irish punt", "IEP", 372,
"", "", 100,
Rounding(),
"%2% %1$.2f",
EURCurrency()));
data_ = iepData;
}
// Italian lira
/* The ISO three-letter code was ITL; the numeric code was 380.
It had no subdivisions.
*/
ITLCurrency::ITLCurrency() {
static ext::shared_ptr<Data> itlData(
new Data("Italian lira", "ITL", 380,
"L", "", 1,
Rounding(),
"%3% %1$.0f",
EURCurrency()));
data_ = itlData;
}
// Luxembourg franc
/* The ISO three-letter code was LUF; the numeric code was 442.
It was divided in 100 centimes.
*/
LUFCurrency::LUFCurrency() {
static ext::shared_ptr<Data> lufData(
new Data("Luxembourg franc", "LUF", 442,
"F", "", 100,
Rounding(),
"%1$.0f %3%",
EURCurrency()));
data_ = lufData;
}
// Maltese lira
/* The ISO three-letter code is MTL; the numeric code is 470.
It is divided in 100 cents.
*/
MTLCurrency::MTLCurrency() {
static ext::shared_ptr<Data> mtlData(
new Data("Maltese lira", "MTL", 470,
"Lm", "", 100,
Rounding(),
"%3% %1$.2f"));
data_ = mtlData;
}
// Dutch guilder
/* The ISO three-letter code was NLG; the numeric code was 528.
It was divided in 100 cents.
*/
NLGCurrency::NLGCurrency() {
static ext::shared_ptr<Data> nlgData(
new Data("Dutch guilder", "NLG", 528,
"f", "", 100,
Rounding(),
"%3% %1$.2f",
EURCurrency()));
data_ = nlgData;
}
// Portuguese escudo
/* The ISO three-letter code was PTE; the numeric code was 620.
It was divided in 100 centavos.
*/
PTECurrency::PTECurrency() {
static ext::shared_ptr<Data> pteData(
new Data("Portuguese escudo", "PTE", 620,
"Esc", "", 100,
Rounding(),
"%1$.0f %3%",
EURCurrency()));
data_ = pteData;
}
// Slovak koruna
/* The ISO three-letter code is SKK; the numeric code is 703.
It is divided in 100 halierov.
*/
SKKCurrency::SKKCurrency() {
static ext::shared_ptr<Data> skkData(
new Data("Slovak koruna", "SKK", 703,
"Sk", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = skkData;
}
// Ukrainian hryvnia
/* The ISO three-letter code is UAH; the numeric code is 980.
It is divided in 100 kopiykas.
*/
UAHCurrency::UAHCurrency() {
static ext::shared_ptr<Data> uahData(
new Data("Ukrainian hryvnia", "UAH", 980,
"hrn", "", 100,
Rounding(),
"%1$.2f %3%"));
data_ = uahData;
}
// Serbian dinar
RSDCurrency::RSDCurrency() {
static ext::shared_ptr<Data> rsdData(
new Data("Serbian dinar", "RSD", 941, "RSD", "", 100, Rounding(), "1$.2f %3%"));
data_ = rsdData;
}
// Croatian kuna
HRKCurrency::HRKCurrency() {
static ext::shared_ptr<Data> hrkData(
new Data("Croatian kuna", "HRK", 191, "HRK", "", 100, Rounding(), "1$.2f %3%"));
data_ = hrkData;
}
// Bulgarian lev
BGNCurrency::BGNCurrency() {
static ext::shared_ptr<Data> bgnData(
new Data("Bulgarian lev", "BGN", 975, "BGN", "", 100, Rounding(), "1$.2F %3%"));
data_ = bgnData;
}
// Georgian lari
GELCurrency::GELCurrency() {
static ext::shared_ptr<Data> gelData(
new Data("Georgian lari", "GEL", 981, "GEL", "", 100, Rounding(), "1$.2F %3%"));
data_ = gelData;
}
}
|