29 static QuantLib::ext::shared_ptr<Data> xauData(
30 new Data(
"Troy Ounce of Gold",
"XAU", 959,
"XAU",
"", 1, Rounding(),
"1$.2f %3%"));
36 static QuantLib::ext::shared_ptr<Data> xagData(
37 new Data(
"Troy Ounce of Silver",
"XAG", 961,
"XAG",
"", 1, Rounding(),
"1$.2f %3%"));
43 static QuantLib::ext::shared_ptr<Data> xptData(
44 new Data(
"Troy Ounce of Platinum",
"XPT", 962,
"XPT",
"", 1, Rounding(),
"1$.2f %3%"));
50 static QuantLib::ext::shared_ptr<Data> xpdData(
51 new Data(
"Troy Ounce of Palladium",
"XPD", 964,
"XPD",
"", 1, Rounding(),
"1$.2f %3%"));
57 static auto cmpCcy = [](
const Currency& c1,
const Currency& c2) {
return c1.name() < c2.name(); };
58 static set<Currency,
decltype(cmpCcy)> metals(cmpCcy);
67 return metals.count(currency) == 1;
bool isMetal(const Currency ¤cy)