Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Functions
cdsindexoption.cpp File Reference
#include <oret/toplevelfixture.hpp>
#include <boost/test/unit_test.hpp>
#include <oret/datapaths.hpp>
#include <ored/portfolio/builders/indexcreditdefaultswap.hpp>
#include <ored/portfolio/builders/indexcreditdefaultswapoption.hpp>
#include <ored/portfolio/indexcreditdefaultswap.hpp>
#include <ored/portfolio/indexcreditdefaultswapoption.hpp>
#include <ored/marketdata/csvloader.hpp>
#include <ored/marketdata/todaysmarket.hpp>
#include <ored/portfolio/enginedata.hpp>
#include <ored/portfolio/enginefactory.hpp>
#include <ored/portfolio/portfolio.hpp>
#include <ored/portfolio/referencedata.hpp>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (testSpreadStrikeNoDefaultsIndexCurve)
 
 BOOST_AUTO_TEST_CASE (testSpreadStrikeNoDefaultsUnderlyingCurves)
 
 BOOST_AUTO_TEST_CASE (testPriceStrikeNoDefaultsIndexCurve)
 
 BOOST_AUTO_TEST_CASE (testPriceStrikeNoDefaultsUnderlyingCurves)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( testSpreadStrikeNoDefaultsIndexCurve  )

Definition at line 127 of file cdsindexoption.cpp.

127 {
128 BOOST_TEST_MESSAGE("Testing pricing for spread strike, no existing defaults, using index curve ...");
129 checkNpvs(buildPortfolio(Date(22, Apr, 2021), "cdx_ig_36_v1_2021-04-22_index"), 6.5);
130}

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( testSpreadStrikeNoDefaultsUnderlyingCurves  )

Definition at line 132 of file cdsindexoption.cpp.

132 {
133 BOOST_TEST_MESSAGE("Testing pricing for spread strike, no existing defaults, using underlying curves ...");
134 checkNpvs(buildPortfolio(Date(22, Apr, 2021), "cdx_ig_36_v1_2021-04-22_underlyings"), 12.0);
135}

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( testPriceStrikeNoDefaultsIndexCurve  )

Definition at line 137 of file cdsindexoption.cpp.

137 {
138 BOOST_TEST_MESSAGE("Testing pricing for price strike, no existing defaults, using index curve ...");
139 checkNpvs(buildPortfolio(Date(22, Apr, 2021), "cdx_hy_36_v1_2021-04-22_index"), 10, 0.105);
140}

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( testPriceStrikeNoDefaultsUnderlyingCurves  )

Definition at line 144 of file cdsindexoption.cpp.

144 {
145 BOOST_TEST_MESSAGE("Testing pricing for price strike, no existing defaults, using underlying curves ...");
146 checkNpvs(buildPortfolio(Date(22, Apr, 2021), "cdx_hy_36_v1_2021-04-22_underlyings"), 20, 0.25);
147}