There is no cashflowtype in the Outputfile of ORE. As I could not find any option in the configuration files to add the type, i tried to implement it myself. I added some lines in the OREAnalytics/reportwriter.cpp->writeCashflows(…).At the moment I determin the type from the dynamic_cast of this object “ptrFlow”.
e.g.:
boost::shared_ptr<QuantLib::Coupon> ptrCoupon = boost::dynamic_pointer_cast<QuantLib::Coupon>(ptrFlow);
if (ptrCoupon) {
coupon = ptrCoupon->rate();
accrual = ptrCoupon->accrualPeriod();
flowType = "INT";
} else {
coupon = Null<Real>();
accrual = Null<Real>();
flowType = "NOM";
}
Is there a “better” way to get the type of the CF?