20#include <boost/test/unit_test.hpp>
21#include <ql/currency.hpp>
22#include <ql/index.hpp>
23#include <ql/time/calendars/target.hpp>
24#include <ql/time/calendars/unitedstates.hpp>
65using namespace boost::unit_test_framework;
80BOOST_AUTO_TEST_SUITE(IndexTest)
84 BOOST_TEST_MESSAGE(
"Testing QuantExt indexes");
88 IndTestData data[] = {
91 {
CORRA(),
"CORRA", Canada().name(), CADCurrency().name() },
92 {
CZKPribor(pd),
"CZK-PRIBOR", CzechRepublic().name(), CZKCurrency().name() },
93 {
DKKCibor(pd),
"DKK-CIBOR", Denmark().name(), DKKCurrency().name() },
94 {
DKKCita(),
"DKK-CITA", Denmark().name(), DKKCurrency().name() },
95 {
DKKOis(),
"DKK-DKKOIS", Denmark().name(), DKKCurrency().name() },
96 {
HKDHibor(pd),
"HKD-HIBOR", HongKong().name(), HKDCurrency().name() },
97 {
HUFBubor(pd),
"HUF-BUBOR", Hungary().name(), HUFCurrency().name() },
98 {
IDRIdrfix(pd),
"IDR-IDRFIX", Indonesia().name(), IDRCurrency().name() },
99 {
IDRJibor(pd),
"IDR-JIBOR", Indonesia().name(), IDRCurrency().name() },
101 {
INRMiborOis(),
"INR-MIBOROIS", India().name(), INRCurrency().name() },
102 {
INRMifor(pd),
"INR-MIFOR", India().name(), INRCurrency().name() },
103 {
JPYEYTIBOR(pd),
"JPY-EYTIBOR", Japan().name(), JPYCurrency().name() },
104 {
MXNTiie(pd),
"MXN-TIIE", Mexico().name(), MXNCurrency().name() },
105 {
NOKNibor(pd),
"NOK-NIBOR", Norway().name(), NOKCurrency().name() },
106 {
NZDBKBM(pd),
"NZD-BKBM", NewZealand().name(), NZDCurrency().name() },
107 {
SEKStibor(pd),
"SEK-STIBOR", Sweden().name(), SEKCurrency().name() },
108 {
SEKStina(),
"SEK-STINA", Sweden().name(), SEKCurrency().name() },
109 {
SEKSior(),
"SEK-SIOR", Sweden().name(), SEKCurrency().name() },
110 {
SGDSibor(pd),
"SGD-SIBOR", Singapore().name(), SGDCurrency().name() },
111 {
SGDSor(pd),
"SGD-SOR", Singapore().name(), SGDCurrency().name() },
112 {
SKKBribor(pd),
"SKK-BRIBOR", Slovakia().name(), SKKCurrency().name() },
113 {
Tonar(),
"TONAR", Japan().name(), JPYCurrency().name() },
114 {
Sora(),
"SGD-SORA", Singapore().name(), SGDCurrency().name() },
115 {
KRWCd(pd),
"KRW-CD", SouthKorea(SouthKorea::Settlement).name(), KRWCurrency().name() },
116 {
KRWKoribor(pd),
"KRW-KORIBOR", SouthKorea(SouthKorea::Settlement).name(), KRWCurrency().name() },
118 {
TWDTaibor(pd),
"TWD-TAIBOR", Taiwan().name(), TWDCurrency().name() },
119 {
CNYRepoFix(pd),
"CNY-REPOFIX", China(China::IB).name(), CNYCurrency().name() }
122 Size size =
sizeof(data) /
sizeof(data[0]);
124 for (Size i = 0; i < size; i++) {
125 BOOST_CHECK_EQUAL(data[i].ind.familyName(), data[i].name);
126 BOOST_CHECK_EQUAL(data[i].ind.fixingCalendar().name(), data[i].calName);
127 BOOST_CHECK_EQUAL(data[i].ind.currency().name(), data[i].ccyName);
131BOOST_AUTO_TEST_SUITE_END()
133BOOST_AUTO_TEST_SUITE_END()
Swiss Average Rate Overnight (SARON)
Swiss Franc T/N rate on Reuters page CHFTOIS.
CNY-CNREPOFIX=CFXS-Reuters index.
CNY-CNREPOFIX=CFXS-Reuters index.
Canadian Overnight Repo Rate Average (CORRA) index class.
BOOST_AUTO_TEST_CASE(testIborIndex)
Singapore Overnight Average Rate (sora)
Tokyo Overnight Average Rate (TONAR)
Fixture that can be used at top level.