Home / Reply To: CMS Trade simulation

Home Forums Help CMS Trade simulation Reply To: CMS Trade simulation


Hi Peter!

Thank you for your answers, I managed to make the example 21 simulate with the hagan analytic engine now (adding <Simulate>false</Simulate> (answer a) and <Index>EUR-EURIBOR-3M</Index> to simulation.xml and using “default” instead of “libor” for all the markets parameters in ore.xml helped (answers c and d)).

Probably all the CAPFLOOR/RATE_LNVOL marketdata (including the line CAPFLOOR/SHIFT/EUR/6M 0) are missing in marketdata.txt for the hagan analytic model as the log still spews a lot of “CMS_Swap : BlackVanillaOptionPricer: zero-shift lognormal volatility required” alerts (so I’m not confident as of the prices) at least ORE doesn’t crash anymore.

However, using the suggested LinearTSR, I now get
NOTICE [2018-Apr-12 11:12:56.280839] (…rtfolio\portfolio.cpp:44) : Parsing XML Input/portfolio_CMS.xml
NOTICE [2018-Apr-12 11:12:56.280839] (…rtfolio\portfolio.cpp:46) : Loaded XML file
NOTICE [2018-Apr-12 11:12:56.280839] (…rtfolio\portfolio.cpp:95) : Finished Parsing XML doc
NOTICE [2018-Apr-12 11:12:56.280839] (…tfolio\portfolio.cpp:121) : Building Portfolio of size 2
ALERT [2018-Apr-12 11:12:56.280839] (…tfolio\portfolio.cpp:128) : Error building trade (CMS_Swap) : invalid map<K, T> key
ALERT [2018-Apr-12 11:12:56.280839] (…tfolio\portfolio.cpp:128) : Error building trade (CMS_Cap) : invalid map<K, T> key
NOTICE [2018-Apr-12 11:12:56.280839] (…tfolio\portfolio.cpp:132) : Built Portfolio. Size now 0
ALERT [2018-Apr-12 11:12:56.283839] (orea\app\oreapp.cpp:194) : Error: InMemoryCube::InMemoryCube no ids specified

The code seems to fail in ORE\engine\OREData\ored\portfolio\builders\cms.cpp fetching two parameters, which seem to be missing in the example:

boost::shared_ptr<FloatingRateCouponPricer> LinearTSRCmsCouponPricerBuilder::engineImpl(const Currency& ccy) {
const string& ccyCode = ccy.code();
Real rev = parseReal(engineParameters_.at(“MeanReversion”));
string policy = engineParameters_.at(“Policy”);

I’ll try to add these parameters and tell you the result…