|
|
| TradeGenerator (const QuantLib::ext::shared_ptr< CurveConfigurations > &curveConfig, const QuantLib::ext::shared_ptr< BasicReferenceDataManager > &refData, string counterpartyId="", string nettingSetId="", string startDate="") |
|
| TradeGenerator (string counterpartyId="", string nettingSetId="", string startDate="") |
|
void | addCurveConfigs (string curveConfigFile) |
|
void | addReferenceData (string refDataFile) |
|
void | setNettingSet (string nettingSetId) |
|
void | setCounterpartyId (string counterpartyId) |
|
bool | validateDate (string date) |
|
void | buildSwap (string indexId, Real notional, string maturity, Real rate, bool firstLegPays, string start=string(), string tradeId=string()) |
|
void | buildSwap (string indexId, Real notional, string maturity, string recIndexId, Real spread, bool firstLegPays, string start=string(), string tradeId=string(), std::map< string, string > mapPairs={}) |
|
void | buildFxForward (string payCcy, Real payNotional, string recCcy, Real recNotional, string expiryDate, bool isLong, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildFxOption (string payCcy, Real payNotional, string recCcy, Real recNotional, string expiryDate, bool isLong, bool isCall, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildCapFloor (string indexName, Real capFloorRate, Real notional, string maturity, bool isLong, bool isCap, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildEquityOption (string equityCurveId, Real quantity, string maturity, Real strike, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildEquityForward (string equityCurveId, Real quantity, string maturity, Real strike, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildEquitySwap (string equityCurveId, string returnType, Real quantity, string indexId, Real notional, string maturity, bool firstLegPays, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildEquitySwap (string equityCurveId, string returnType, Real quantity, Real rate, Real notional, string maturity, bool firstLegPays, string tradeId="", std::map< string, string > mapPairs={}) |
|
void | buildCommoditySwap (string commodityId, string maturity, Real quantity, Real fixedPrice, string indexId, string floatType, bool firstLegPays, string tradeId="") |
|
void | buildCommodityOption (string commodityId, Real quantity, string maturity, Real strike, string priceType, bool isLong, bool isCall, string tradeId="") |
|
void | buildCommodityForward (string commodityId, Real quantity, string maturity, Real strike, bool isLong, string tradeId="") |
|
void | buildInflationSwap (string inflationIndex, Real notional, string maturity, string floatIndex, Real baseRate, Real cpiRate, bool firstLegPays, string tradeId="") |
|
| Portfolio (bool buildFailedTrades=true, bool ignoreTradeBuildFail=false) |
| | Default constructor.
|
|
void | add (const QuantLib::ext::shared_ptr< Trade > &trade) |
| | Add a trade to the portfolio.
|
|
bool | has (const string &id) |
| | Check if a trade id is already in the portfolio.
|
| QuantLib::ext::shared_ptr< Trade > | get (const std::string &id) const |
|
void | clear () |
| | Clear the portfolio.
|
|
void | reset () |
| | Reset all trade data.
|
|
QuantLib::Size | size () const |
| | Portfolio size.
|
|
bool | empty () const |
| void | fromXML (XMLNode *node) override |
| | XMLSerializable interface.
|
| XMLNode * | toXML (XMLDocument &doc) const override |
|
bool | remove (const std::string &tradeID) |
| | Remove specified trade from the portfolio.
|
|
void | removeMatured (const QuantLib::Date &asof) |
| | Remove matured trades from portfolio for a given date, each removal is logged with an Alert.
|
|
void | setBuildFailedTrades (const bool buildFailed) |
| | set if trades should build as a FailedTrade if they fail
|
|
void | build (const QuantLib::ext::shared_ptr< EngineFactory > &, const std::string &context="unspecified", const bool emitStructuredError=true) |
| | Call build on all trades in the portfolio, the context is included in error messages.
|
|
bool | isBuilt () const |
| | if the portfolio has been built
|
|
QuantLib::Date | maturity () const |
| | Calculates the maturity of the portfolio.
|
|
const std::map< std::string, QuantLib::ext::shared_ptr< Trade > > & | trades () const |
| | Return the map tradeId -> trade.
|
|
std::set< std::string > | ids () const |
| | Build a set of tradeIds.
|
|
std::map< std::string, std::string > | nettingSetMap () const |
| | Build a map from trade Ids to NettingSet.
|
|
std::set< std::string > | counterparties () const |
| | Build a set of all counterparties in the portfolio.
|
|
std::map< std::string, std::set< std::string > > | counterpartyNettingSets () const |
| | Build a map from counterparty to NettingSet.
|
|
std::set< std::string > | portfolioIds () const |
| | Compute set of portfolios.
|
|
bool | hasNettingSetDetails () const |
| | Check if at least one trade in the portfolio uses the NettingSetDetails node, and not just NettingSetId.
|
|
bool | buildFailedTrades () const |
| | Does this portfolio build failed trades?
|
|
bool | ignoreTradeBuildFail () const |
| | Keep trade in the portfolio even after build fail.
|
| std::map< std::string, RequiredFixings::FixingDates > | fixings (const QuantLib::Date &settlementDate=QuantLib::Date()) const |
| std::map< AssetClass, std::set< std::string > > | underlyingIndices (const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr, const bool useCache=true) |
|
std::set< std::string > | underlyingIndices (AssetClass assetClass, const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr, const bool useCache=true) |
|
void | fromFile (const std::string &filename) |
|
void | toFile (const std::string &filename) const |
|
void | fromXMLString (const std::string &xml) |
| | Parse from XML string.
|
|
std::string | toXMLString () const |
| | Parse from XML string.
|
|
std::string | toXMLStringUnformatted () const |