Logo
Reference manual - version ored_version
Classes | Namespaces
legdata.hpp File Reference

leg data model and serialization More...

#include <boost/make_shared.hpp>
#include <ored/portfolio/fixingdates.hpp>
#include <ored/portfolio/indexing.hpp>
#include <ored/portfolio/legdatafactory.hpp>
#include <ored/portfolio/schedule.hpp>
#include <ored/portfolio/simmcreditqualifiermapping.hpp>
#include <ored/portfolio/underlying.hpp>
#include <ored/utilities/indexparser.hpp>
#include <ored/utilities/parsers.hpp>
#include <ql/cashflow.hpp>
#include <ql/experimental/coupons/swapspreadindex.hpp>
#include <ql/indexes/iborindex.hpp>
#include <ql/position.hpp>
#include <qle/cashflows/equitycoupon.hpp>
#include <qle/indexes/bmaindexwrapper.hpp>
#include <qle/indexes/equityindex.hpp>
#include <vector>

Classes

class  LegAdditionalData
 Serializable Additional Leg Data. More...
 
class  CashflowData
 Serializable Cashflow Leg Data. More...
 
class  FixedLegData
 Serializable Fixed Leg Data. More...
 
class  ZeroCouponFixedLegData
 Serializable Fixed Leg Data. More...
 
class  FloatingLegData
 Serializable Floating Leg Data. More...
 
class  CPILegData
 Serializable CPI Leg Data. More...
 
class  YoYLegData
 Serializable YoY Leg Data. More...
 
class  CMSLegData
 Serializable CMS Leg Data. More...
 
class  DigitalCMSLegData
 Serializable Digital CMS Leg Data. More...
 
class  CMSSpreadLegData
 Serializable CMS Spread Leg Data. More...
 
class  DigitalCMSSpreadLegData
 Serializable Digital CMS Spread Leg Data. More...
 
class  CMBLegData
 Serializable Constant Maturity Bond Yield Leg Data. More...
 
class  EquityLegData
 Serializable Fixed Leg Data. More...
 
class  AmortizationData
 Serializable object holding amortization rules. More...
 
class  LegData
 Serializable object holding leg data. More...
 

Namespaces

 ore
 Serializable Credit Default Swap.
 
 ore::data
 

Functions

Utilities for building QuantLib Legs
Leg makeFixedLeg (const LegData &data, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeZCFixedLeg (const LegData &data, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeIborLeg (const LegData &data, const boost::shared_ptr< IborIndex > &index, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeOISLeg (const LegData &data, const boost::shared_ptr< OvernightIndex > &index, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeBMALeg (const LegData &data, const boost::shared_ptr< QuantExt::BMAIndexWrapper > &indexWrapper, const boost::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeSimpleLeg (const LegData &data)
 
Leg makeNotionalLeg (const Leg &refLeg, const bool initNomFlow, const bool finalNomFlow, const bool amortNomFlow, const QuantLib::Natural paymentLag, const BusinessDayConvention paymentConvention, const Calendar paymentCalendar, const bool excludeIndexing=true)
 
Leg makeCPILeg (const LegData &data, const boost::shared_ptr< ZeroInflationIndex > &index, const boost::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeYoYLeg (const LegData &data, const boost::shared_ptr< InflationIndex > &index, const boost::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeCMSLeg (const LegData &data, const boost::shared_ptr< QuantLib::SwapIndex > &swapindex, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeCMBLeg (const LegData &data, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeDigitalCMSLeg (const LegData &data, const boost::shared_ptr< QuantLib::SwapIndex > &swapIndex, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeCMSSpreadLeg (const LegData &data, const boost::shared_ptr< QuantLib::SwapSpreadIndex > &swapSpreadIndex, const boost::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer=true, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeDigitalCMSSpreadLeg (const LegData &data, const boost::shared_ptr< QuantLib::SwapSpreadIndex > &swapSpreadIndex, const boost::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Leg makeEquityLeg (const LegData &data, const boost::shared_ptr< QuantExt::EquityIndex2 > &equityCurve, const boost::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr, const QuantLib::Date &openEndDateReplacement=Null< Date >())
 
Real currentNotional (const Leg &leg)
 
Real originalNotional (const Leg &leg)
 
std::string getCmbLegCreditRiskCurrency (const CMBLegData &ld, const boost::shared_ptr< ReferenceDataManager > &refData)
 
std::pair< std::string, SimmCreditQualifierMapping > getCmbLegCreditQualifierMapping (const CMBLegData &ld, const boost::shared_ptr< ReferenceDataManager > &refData, const std::string &tradeId, const std::string &tradeType)
 
template<typename T >
vector< T > buildScheduledVector (const vector< T > &values, const vector< string > &dates, const Schedule &schedule, const bool checkAllValuesAppearInResult=false)
 
template<typename T >
vector< T > normaliseToSchedule (const vector< T > &values, const Schedule &schedule, const T &defaultValue)
 
template<typename T >
vector< T > buildScheduledVectorNormalised (const vector< T > &values, const vector< string > &dates, const Schedule &schedule, const T &defaultValue, const bool checkAllValuesAppearInResult=false)
 
template<typename T >
vector< T >::const_iterator checkAllValuesAppearInScheduledVector (const vector< T > &scheduledVecotr, const vector< T > &inputValues)
 
vector< double > buildAmortizationScheduleFixedAmount (const vector< double > &notionals, const Schedule &schedule, const AmortizationData &data)
 
vector< double > buildAmortizationScheduleRelativeToInitialNotional (const vector< double > &notionals, const Schedule &schedule, const AmortizationData &data)
 
vector< double > buildAmortizationScheduleRelativeToPreviousNotional (const vector< double > &notionals, const Schedule &schedule, const AmortizationData &data)
 
vector< double > buildAmortizationScheduleFixedAnnuity (const vector< double > &notionals, const vector< double > &rates, const Schedule &schedule, const AmortizationData &data, const DayCounter &dc)
 
void applyAmortization (std::vector< Real > &notionals, const LegData &data, const Schedule &schedule, const bool annuityAllowed=false, const std::vector< Real > &rates=std::vector< Real >())
 
void applyIndexing (Leg &leg, const LegData &data, const boost::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false)
 
Leg joinLegs (const std::vector< Leg > &legs)
 
Leg buildNotionalLeg (const LegData &data, const Leg &leg, RequiredFixings &requiredFixings, const boost::shared_ptr< Market > &market, const std::string &configuration)
 

Detailed Description

leg data model and serialization