83 const std::vector<std::string>&
values)
141 const std::vector<std::pair<std::string, std::string>>&
results,
157 const std::string&
npv()
const {
return npv_; }
159 const std::vector<std::pair<std::string, std::string>>&
results()
const {
return results_; }
172 std::vector<std::pair<std::string, std::string>>
results_;
191 bool has(
const std::string& scriptName,
const std::string& purpose,
const bool fallBackOnEmptyPurpose =
true)
const;
194 std::pair<std::string, ScriptedTradeScriptData>
get(
const std::string& scriptName,
const std::string& purpose,
195 const bool fallBackOnEmptyPurpose =
true)
const;
199 std::map<std::string, std::pair<std::string, std::map<std::string, ScriptedTradeScriptData>>>
scripts_;
209 const std::vector<ScriptedTradeValueTypeData>&
numbers,
210 const std::vector<ScriptedTradeValueTypeData>&
indices,
211 const std::vector<ScriptedTradeValueTypeData>&
currencies,
212 const std::vector<ScriptedTradeValueTypeData>&
daycounters,
213 const std::map<std::string, ScriptedTradeScriptData>&
script,
const std::string&
productTag,
214 const std::string&
tradeType =
"ScriptedTrade")
219 const std::vector<ScriptedTradeValueTypeData>&
numbers,
220 const std::vector<ScriptedTradeValueTypeData>&
indices,
221 const std::vector<ScriptedTradeValueTypeData>&
currencies,
223 const std::string&
tradeType =
"ScriptedTrade")
231 void build(
const QuantLib::ext::shared_ptr<EngineFactory>&)
override;
232 QuantLib::Real
notional()
const override;
238 void build(
const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
const PremiumData& premiumData,
239 const Real premiumMultiplier);
242 std::map<ore::data::AssetClass, std::set<std::string>>
243 underlyingIndices(
const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceDataManager =
nullptr)
const override;
249 const std::vector<ScriptedTradeEventData>&
events()
const {
return events_; }
254 const std::map<std::string, ScriptedTradeScriptData>&
script()
const {
return script_; }
271 std::map<std::string, ScriptedTradeScriptData>
script_;
281class ScriptLibraryStorage :
public QuantLib::Singleton<ScriptLibraryStorage, std::integral_constant<bool, true>> {
Serializable object holding generic trade data, reporting dimensions.
Serializable object holding premium data.
Serializable schedule data.
ScriptLibraryData & operator=(const ScriptLibraryData &d)
std::pair< std::string, ScriptedTradeScriptData > get(const std::string &scriptName, const std::string &purpose, const bool fallBackOnEmptyPurpose=true) const
std::map< std::string, std::pair< std::string, std::map< std::string, ScriptedTradeScriptData > > > scripts_
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
bool has(const std::string &scriptName, const std::string &purpose, const bool fallBackOnEmptyPurpose=true) const
void set(const ScriptLibraryData &data)
boost::shared_mutex mutex_
const ScriptLibraryData & get() const
const std::string & convention() const
const ScheduleData & schedule() const
const std::string & name() const
const std::string & value() const
ScriptedTradeEventData(const std::string &name, const ScheduleData &schedule)
ScriptedTradeEventData(const std::string &name, const std::string &baseSchedule, const std::string &shift, const std::string &calendar, const std::string &convention)
const std::string & shift() const
virtual void fromXML(XMLNode *node) override
const std::string & baseSchedule() const
std::string baseSchedule_
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
ScriptedTradeEventData(const std::string &name, const std::string &date)
const std::string & calendar() const
std::string notionalCurrency() const override
const std::string & productTag() const
const std::map< std::string, ScriptedTradeScriptData > & script() const
std::vector< ScriptedTradeValueTypeData > daycounters_
std::vector< ScriptedTradeEventData > events_
const std::string & scriptName() const
std::vector< ScriptedTradeValueTypeData > currencies_
const std::string & scheduleProductClass() const
std::map< ore::data::AssetClass, std::set< std::string > > underlyingIndices(const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
std::string scheduleProductClass_
QuantLib::Real notional() const override
Return the current notional in npvCurrency. See individual sub-classes for the precise definition.
const std::vector< ScriptedTradeValueTypeData > & indices() const
void fromXML(XMLNode *node) override
const std::vector< ScriptedTradeValueTypeData > & daycounters() const
const std::vector< ScriptedTradeValueTypeData > & numbers() const
XMLNode * toXML(ore::data::XMLDocument &doc) const override
ScriptedTrade(const std::string &tradeType="ScriptedTrade", const Envelope &env=Envelope())
std::vector< ScriptedTradeValueTypeData > indices_
const std::string & simmProductClass() const
virtual void setIsdaTaxonomyFields()
std::string simmProductClass_
std::vector< ScriptedTradeValueTypeData > numbers_
const std::vector< ScriptedTradeValueTypeData > & currencies() const
ScriptedTrade(const Envelope &env, const std::vector< ScriptedTradeEventData > &events, const std::vector< ScriptedTradeValueTypeData > &numbers, const std::vector< ScriptedTradeValueTypeData > &indices, const std::vector< ScriptedTradeValueTypeData > ¤cies, const std::vector< ScriptedTradeValueTypeData > &daycounters, const std::string &scriptName, const std::string &tradeType="ScriptedTrade")
std::map< std::string, ScriptedTradeScriptData > script_
ScriptedTrade(const Envelope &env, const std::vector< ScriptedTradeEventData > &events, const std::vector< ScriptedTradeValueTypeData > &numbers, const std::vector< ScriptedTradeValueTypeData > &indices, const std::vector< ScriptedTradeValueTypeData > ¤cies, const std::vector< ScriptedTradeValueTypeData > &daycounters, const std::map< std::string, ScriptedTradeScriptData > &script, const std::string &productTag, const std::string &tradeType="ScriptedTrade")
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
const std::vector< ScriptedTradeEventData > & events() const
const std::string & index() const
std::vector< std::string > strikes_
const std::vector< string > & strikes() const
CalibrationData(const std::string &index, const std::vector< std::string > &strikes)
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
NewScheduleData(const std::string &name, const std::string &operation, const std::vector< std::string > &sourceSchedules)
const std::string & name() const
std::vector< std::string > sourceSchedules_
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
const std::string & operation() const
const std::vector< std::string > & sourceSchedules() const
ScriptedTradeScriptData()
const std::vector< std::string > & stickyCloseOutStates() const
const std::string & code() const
std::vector< std::string > conditionalExpectationModelStates_
std::vector< CalibrationData > calibrationSpec_
std::vector< NewScheduleData > newSchedules_
const std::vector< std::string > & conditionalExpectationModelStates() const
const std::string & npv() const
const std::vector< CalibrationData > & calibrationSpec() const
std::vector< std::string > schedulesEligibleForCoarsening_
virtual void fromXML(XMLNode *node) override
std::vector< std::pair< std::string, std::string > > results_
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
const std::vector< NewScheduleData > & newSchedules() const
const std::vector< std::pair< std::string, std::string > > & results() const
std::vector< std::string > stickyCloseOutStates_
ScriptedTradeScriptData(const std::string &code, const std::string &npv, const std::vector< std::pair< std::string, std::string > > &results, const std::vector< std::string > &schedulesEligibleForCoarsening, const std::vector< NewScheduleData > &newSchedules={}, const std::vector< CalibrationData > &calibrationSpec={}, const std::vector< std::string > &stickyCloseOutStates={}, const std::vector< std::string > &conditionalExpectationModelStates={})
const std::vector< std::string > & schedulesEligibleForCoarsening() const
std::vector< std::string > values_
ScriptedTradeValueTypeData(const std::string &nodeName, const std::string &name, const std::string &value)
const std::string & name() const
const std::vector< std::string > & values() const
const std::string & value() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(ore::data::XMLDocument &doc) const override
ScriptedTradeValueTypeData(const std::string &nodeName)
ScriptedTradeValueTypeData(const std::string &nodeName, const std::string &name, const std::vector< std::string > &values)
const string & tradeType() const
Small XML Document wrapper class.
Base class for all serializable classes.
rapidxml::xml_node< char > XMLNode
Serializable Credit Default Swap.
trade schedule data model and serialization
base trade data model and serialization