Logo
Reference manual - version ored_version
Files | Classes | Functions
Utilities

Files

file  iborfallbackconfig.hpp
 ibor fallback configuration
 
file  blackscholesmodelbuilder.hpp
 builder for an array of black scholes processes
 
file  blackscholesmodelbuilderbase.hpp
 builder for an array of black scholes processes
 
file  calibrationpointcache.hpp
 cache for relevant points on curve / vol surfaces
 
file  localvolmodelbuilder.hpp
 builder for an array of local vol processes
 
file  commodityapomodelbuilder.hpp
 model builder for commodityapos
 
file  ast.hpp
 abstract syntax tree for payoff scripting
 
file  astprinter.hpp
 ast printer
 
file  asttoscriptconverter.hpp
 ast to script converter
 
file  computationgraphbuilder.hpp
 computation graph builder
 
file  context.hpp
 script engine context holding variable names and values
 
file  grammar.hpp
 payoff script grammar
 
file  amcmodel.hpp
 additional interface for amc enabled models
 
file  blackscholes.hpp
 black scholes model for n underlyings (fx, equity or commodity)
 
file  blackscholesbase.hpp
 black scholes model base class for n underlyings (fx, equity or commodity)
 
file  blackscholescg.hpp
 black scholes model for n underlyings (fx, equity or commodity)
 
file  blackscholescgbase.hpp
 black scholes model base class for n underlyings (fx, equity or commodity)
 
file  dummymodel.hpp
 dummy model implementation
 
file  gaussiancam.hpp
 gaussian cross asset model for ir, fx, eq, com
 
file  localvol.hpp
 local vol model for n underlyings (fx, equity or commodity)
 
file  model.hpp
 interface for model against which a script can be run
 
file  modelcg.hpp
 interface for model against which a script can be run
 
file  modelcgimpl.hpp
 basis implementation for a script engine model
 
file  modelimpl.hpp
 basis implementation for a script engine model
 
file  randomastgenerator.hpp
 random ast generator for testing purposes
 
file  safestack.hpp
 stack with safety checks and pop() that returns rvalue reference of top element
 
file  scriptengine.hpp
 scriptengine
 
file  scriptparser.hpp
 script parser
 
file  staticanalyser.hpp
 static script analyser
 
file  utilities.hpp
 some utility functions
 
file  value.hpp
 value type and operations
 
file  bondindexbuilder.hpp
 Interface for building a bond index.
 
file  calendaradjustmentconfig.hpp
 Interface for calendar modifications, additional holidays and business days.
 
file  calendarparser.hpp
 calendar parser singleton class
 
file  conventionsbasedfutureexpiry.hpp
 Base class for classes that perform date calculations for future contracts.
 
file  correlationmatrix.hpp
 configuration class for building correlation matrices
 
file  csvfilereader.hpp
 utility class to access CSV files
 
file  calendaradjustmentconfig.hpp
 Interface for calendar modifications, additional holidays and business days.
 
file  currencyparser.hpp
 currency parser singleton class
 
file  fileio.hpp
 Wrapper class for retrying file IO operations.
 
file  flowanalysis.hpp
 Extended QuantLib flow analysis.
 
file  indexnametranslator.hpp
 translates between QuantLib::Index::name() and ORE names
 
file  indexparser.hpp
 Map text representations to QuantLib/QuantExt types.
 
file  indexparser.hpp
 Map text representations to QuantLib/QuantExt types.
 
file  log.hpp
 Classes and functions for log message handling.
 
file  marketdata.hpp
 market data related utilties
 
file  osutils.hpp
 Various OS specific utilities.
 
file  parsers.hpp
 Map text representations to QuantLib/QuantExt types.
 
file  progressbar.hpp
 Classes for progress reporting.
 
file  serializationdate.hpp
 support for QuantLib::Date serialization
 
file  serializationdaycounter.hpp
 support for QuantLib::DayCounter serialization
 
file  serializationperiod.hpp
 support for QuantLib::Period serialization
 
file  strike.hpp
 strike description
 
file  timeperiod.hpp
 non-contiguous time period handling
 
file  to_string.hpp
 string conversion utilities
 
file  vectorutils.hpp
 Utilities for sorting vectors using permutations.
 
file  wildcard.hpp
 utilities for wildcard handling
 
file  xmlutils.hpp
 XML utility functions.
 

Classes

class  CorrelationMatrixBuilder
 
class  Logger
 The Base Custom Log Handler class. More...
 
class  StderrLogger
 Stderr Logger. More...
 
class  FileLogger
 FileLogger. More...
 
class  BufferLogger
 BufferLogger. More...
 
class  IndependentLogger
 Base Log handler class that utilises Boost logging to create log sinks. More...
 
class  Log
 Global static Log class. More...
 
class  ProgressIndicator
 Abstract Base class for a Progress Indicator. More...
 
class  ProgressReporter
 Base class for a Progress Reporter. More...
 
class  SimpleProgressBar
 Simple Progress Bar. More...
 
class  ProgressLog
 Progress Logger that writes the progress using the LOG macro. More...
 
class  TimePeriod
 Handles non-contiguous time period. More...
 
class  xml_node< Ch >
 XML Node. More...
 
class  xml_document< Ch >
 XML Document. More...
 
class  XMLDocument
 Small XML Document wrapper class. More...
 
class  XMLSerializable
 Base class for all serializable classes. More...
 
class  XMLUtils
 XML Utilities Class. More...
 

Functions

bool tryParseCdsInformation (std::string strInfo, CdsReferenceInformation &cdsInfo)
 
std::vector< std::vector< std::string > > flowAnalysis (const QuantLib::Leg &)
 Flow Analysis.
 
boost::shared_ptr< QuantExt::FxIndexparseFxIndex (const string &s, const Handle< Quote > &fxSpot=Handle< Quote >(), const Handle< YieldTermStructure > &sourceYts=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &targetYts=Handle< YieldTermStructure >(), const bool useConventions=false)
 Convert std::string to QuantExt::FxIndex.
 
boost::shared_ptr< IborIndexparseIborIndex (const string &s, const Handle< YieldTermStructure > &h=Handle< YieldTermStructure >())
 Convert std::string to QuantLib::IborIndex.
 
boost::shared_ptr< IborIndexparseIborIndex (const std::string &strIndex, std::string &outTenor, const QuantLib::Handle< QuantLib::YieldTermStructure > &h=QuantLib::Handle< QuantLib::YieldTermStructure >())
 Convert std::string to QuantLib::IborIndex and return the tenor string component of the index. More...
 
bool tryParseIborIndex (const string &s, boost::shared_ptr< IborIndex > &index)
 Try to convert std::string to QuantLib::IborIndex.
 
bool isGenericIborIndex (const string &indexName)
 Return true if the indexName is that of a generic ibor index, otherwise false.
 
std::pair< bool, boost::shared_ptr< QuantLib::ZeroInflationIndex > > isInflationIndex (const std::string &indexName)
 
bool isEquityIndex (const std::string &indexName)
 Return true if the indexName is that of an EquityIndex, otherwise false.
 
bool isCommodityIndex (const std::string &indexName)
 Return true if the indexName is that of an CommodityIndex, otherwise false.
 
bool isGenericIndex (const std::string &indexName)
 
boost::shared_ptr< QuantExt::EquityIndex2parseEquityIndex (const string &s)
 Convert std::string (e.g SP5) to QuantExt::EquityIndex.
 
boost::shared_ptr< SwapIndex > parseSwapIndex (const string &s, const Handle< YieldTermStructure > &forwarding=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &discounting=Handle< YieldTermStructure >())
 Convert std::string to QuantLib::SwapIndex.
 
boost::shared_ptr< ZeroInflationIndex > parseZeroInflationIndex (const string &s, const Handle< ZeroInflationTermStructure > &h=Handle< ZeroInflationTermStructure >())
 Convert std::string to QuantLib::ZeroInflationIndex.
 
boost::shared_ptr< QuantExt::BondIndexparseBondIndex (const string &s)
 Convert std::string to QuantExt::BondIndex.
 
boost::shared_ptr< QuantExt::ConstantMaturityBondIndexparseConstantMaturityBondIndex (const string &s)
 Convert std::string to QuantExt::ConstantMaturityBondIndex.
 
boost::shared_ptr< QuantExt::CommodityIndexparseCommodityIndex (const std::string &name, bool hasPrefix=true, const QuantLib::Handle< QuantExt::PriceTermStructure > &ts=QuantLib::Handle< QuantExt::PriceTermStructure >(), const QuantLib::Calendar &cal=QuantLib::NullCalendar(), const bool enforceFutureIndex=true)
 
boost::shared_ptr< QuantLib::Index > parseGenericIndex (const string &s)
 Convert std::string (GENERIC-...) to QuantExt::Index.
 
boost::shared_ptr< IndexparseIndex (const string &s)
 Convert std::string to QuantLib::Index.
 
bool isOvernightIndex (const std::string &indexName)
 Return true if the indexName is that of an overnight index, otherwise false.
 
bool isBmaIndex (const std::string &indexName)
 Return true if the indexName is that of an bma/sifma index, otherwise false.
 
std::string internalIndexName (const std::string &indexName)
 
std::string getOsName ()
 Returns the OS Name.
 
std::string getOsVersion ()
 Returns the OS Version.
 
std::string getCpuName ()
 Returns the CPU name (e.g. "Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz".
 
unsigned int getNumberCores ()
 Returns the number of Cores available to the OS.
 
std::string getMemoryRAM ()
 Returns the total amount of memory available (installed RAM)
 
std::string getMemoryUsage ()
 Returns the current process memory usage.
 
std::string getPeakMemoryUsage ()
 Returns the current process peak memory usage.
 
unsigned long long getMemoryUsageBytes ()
 
unsigned long long getPeakMemoryUsageBytes ()
 Returns the current process peak memory usage in bytes.
 
std::string getUsername ()
 Returns the current username.
 
std::string getHostname ()
 Returns the machine name.
 
std::string getSystemDetails ()
 Returns all the above system details in a single string.
 
QuantLib::Date parseDate (const string &s)
 Convert std::string to QuantLib::Date.
 
QuantLib::Real parseReal (const string &s)
 Convert text to Real.
 
bool tryParseReal (const string &s, QuantLib::Real &result)
 Attempt to convert text to Real. More...
 
QuantLib::Integer parseInteger (const string &s)
 Convert text to QuantLib::Integer.
 
bool parseBool (const string &s)
 Convert text to bool.
 
QuantLib::Calendar parseCalendar (const string &s)
 Convert text to QuantLib::Calendar. More...
 
QuantLib::Period parsePeriod (const string &s)
 Convert text to QuantLib::Period.
 
QuantLib::BusinessDayConvention parseBusinessDayConvention (const string &s)
 Convert text to QuantLib::BusinessDayConvention.
 
QuantLib::DayCounter parseDayCounter (const string &s)
 Convert text to QuantLib::DayCounter.
 
QuantLib::Currency parseCurrency (const string &s)
 Convert text to QuantLib::Currency.
 
QuantLib::Currency parseMinorCurrency (const string &s)
 Convert text to QuantLib::Currency for minor currencies e.g GBp -> GBPCurrency()
 
QuantLib::Currency parseCurrencyWithMinors (const string &s)
 Convert text to QuantLib::Currency.
 
std::pair< QuantLib::Currency, QuantLib::Currency > parseCurrencyPair (const string &s, const string &delimiters)
 Convert text to std::pair<QuantLib::Currency, QuantLib::Currency>
 
bool checkCurrency (const string &code)
 check for vaid currency code, including minors and pseudo currencies
 
bool isPseudoCurrency (const string &code)
 check for pseudo currency = precious metal or crypto currency *‍/
 
bool isPreciousMetal (const string &code)
 check for precious metal *‍/
 
bool isCryptoCurrency (const string &code)
 check for crypto currency *‍/
 
QuantLib::Real convertMinorToMajorCurrency (const std::string &s, QuantLib::Real value)
 Convert a value from a minor ccy to major. More...
 
QuantLib::DateGeneration::Rule parseDateGenerationRule (const string &s)
 Convert text to QuantLib::DateGeneration::Rule.
 
QuantLib::Frequency parseFrequency (const string &s)
 Convert text to QuantLib::Frequency.
 
QuantLib::Compounding parseCompounding (const string &s)
 Convert text to QuantLib::Compounding;.
 
QuantLib::Position::Type parsePositionType (const string &s)
 Convert text to QuantLib::Position::Type.
 
QuantLib::Protection::Side parseProtectionSide (const string &s)
 Convert text to QuantLib::Protection::Side.
 
QuantLib::Settlement::Type parseSettlementType (const string &s)
 Convert text to QuantLib::Settlement::Type.
 
QuantLib::Settlement::Method parseSettlementMethod (const string &s)
 Convert text to QuantLib::Settlement::Method.
 
QuantLib::Exercise::Type parseExerciseType (const string &s)
 Convert text to QuantLib::Exercise::Type.
 
QuantLib::Option::Type parseOptionType (const string &s)
 Convert text to QuantLib::Option::Type.
 
QuantLib::Bond::Price::Type parseBondPriceType (const string &s)
 Convert text to QuantLib::Bond::Price::Type.
 
boost::variant< QuantLib::Date, QuantLib::Period > parseDateOrPeriod (const string &s)
 Convert text to QuantLib::Period or QuantLib::Date.
 
void parseDateOrPeriod (const string &s, QuantLib::Date &d, QuantLib::Period &p, bool &isDate)
 Convert text to QuantLib::Period or QuantLib::Date (deprecated version)
 
QuantLib::LsmBasisSystem::PolynomialType parsePolynomType (const std::string &s)
 Convert text to QuantLib::LsmBasisSystem::PolynomialType.
 
std::ostream & operator<< (std::ostream &os, QuantLib::LsmBasisSystem::PolynomialType a)
 Write QuantLib::LsmBasisSystem::PolynomialType to stream.
 
QuantLib::SobolBrownianGenerator::Ordering parseSobolBrownianGeneratorOrdering (const std::string &s)
 Convert text to QuantLib::SobolBrownianGenerator::Ordering.
 
QuantLib::SobolRsg::DirectionIntegers parseSobolRsgDirectionIntegers (const std::string &s)
 Convert text to QuantLib::SobolRsg::DirectionIntegers.
 
QuantLib::Weekday parseWeekday (const std::string &s)
 
QuantLib::Month parseMonth (const std::string &s)
 
PaymentLag parsePaymentLag (const string &s)
 Convert text to PaymentLag.
 
template<class T >
std::vector< T > parseListOfValues (string s, std::function< T(string)> parser)
 Convert comma separated list of values to vector of values.
 
QuantExt::SequenceType parseSequenceType (const std::string &s)
 Convert string to sequence type.
 
QuantLib::CPI::InterpolationType parseObservationInterpolation (const std::string &s)
 Convert string to observation interpolation.
 
QuantLib::FdmSchemeDesc parseFdmSchemeDesc (const std::string &s)
 Convert string to fdm scheme desc.
 
AssetClass parseAssetClass (const std::string &s)
 Convert text to ore::data::AssetClass.
 
std::ostream & operator<< (std::ostream &os, AssetClass a)
 Write ore::data::AssetClass to stream.
 
QuantLib::DeltaVolQuote::AtmType parseAtmType (const std::string &s)
 Convert text to QuantLib::DeltaVolQuote::AtmType.
 
QuantLib::DeltaVolQuote::DeltaType parseDeltaType (const std::string &s)
 Convert text to QuantLib::DeltaVolQuote::DeltaType.
 
QuantLib::Rounding::Type parseRoundingType (const std::string &s)
 Convert text to QuantLib::Rounding.
 
QuantLib::Barrier::Type parseBarrierType (const string &s)
 Convert std::string to QuantLib::BarrierType.
 
QuantLib::DoubleBarrier::Type parseDoubleBarrierType (const string &s)
 Convert std::string to QuantLib::DoubleBarrierType.
 
template<class T >
bool tryParse (const std::string &str, T &obj, std::function< T(std::string)> parser)
 
QuantLib::VolatilityType parseVolatilityQuoteType (const std::string &s)
 
QuantLib::CapFloor::Type parseCapFloorType (const std::string &s)
 
QuantLib::YoYInflationCapFloor::Type parseYoYInflationCapFloorType (const std::string &s)
 
QuantExt::CrossAssetModel::AssetType parseCamAssetType (const std::string &s)
 
std::pair< string, string > parseBoostAny (const boost::any &anyType, Size precision=8)
 
QuantExt::CdsOption::StrikeType parseCdsOptionStrikeType (const std::string &s)
 
QuantLib::Average::Type parseAverageType (const std::string &s)
 
QuantExt::BondIndex::PriceQuoteMethod parsePriceQuoteMethod (const std::string &s)
 
string fxDominance (const string &s1, const string &s2)
 Convert FX pair to market standard dominance. More...
 
MomentType parseMomentType (const std::string &s)
 Convert text to ore::data::MomentType.
 
QuantLib::Pillar::Choice parsePillarChoice (const std::string &s)
 Convert text to QuantLib::Pillar::Choice.
 
template<class Archive >
void serialize (Archive &ar, QuantLib::Date &d, const unsigned int)
 Allow for serialization of QuantLib::Date without amending its class (non-intrusive)
 
template<class Archive >
void serialize (Archive &ar, QuantLib::DayCounter &dc, const unsigned int)
 Allow for serialization of QuantLib::Period without amending its class (non-intrusive)
 
template<class Archive >
void serialize (Archive &ar, QuantLib::Period &p, const unsigned int)
 Allow for serialization of QuantLib::Period without amending its class (non-intrusive)
 
Strike parseStrike (const std::string &s)
 Convert text to Strike.
 
std::ostream & operator<< (std::ostream &out, const Strike &s)
 Convert Strike to text.
 
bool operator== (const Strike &s1, const Strike &s2)
 Logical comparison of strikes.
 
QuantLib::Real computeAbsoluteStrike (const Strike &s, const QuantLib::Real atm, const QuantLib::Real atmf)
 Convenience function that computes an absolute strike.
 
std::string to_string (const QuantLib::Date &date)
 Convert QuantLib::Date to std::string. More...
 
std::string to_string (bool aBool)
 Convert bool to std::string. More...
 
std::string to_string (const QuantLib::Period &period)
 Convert QuantLib::Period to std::string. More...
 
template<class T >
std::string to_string (const std::vector< T > &vec, const std::string &sep=",")
 Convert vector to std::string. More...
 
template<class T >
std::string to_string (const std::set< T > &set, const std::string &sep=",")
 Convert set to std::string.
 
template<class T >
std::string to_string (const T &t)
 Convert type to std::string. More...
 
template<typename T , typename Compare >
std::vector< std::size_t > sort_permutation (const std::vector< T > &vec, Compare &compare)
 
template<typename T >
std::vector< T > apply_permutation (const std::vector< T > &vec, const std::vector< std::size_t > &p)
 
template<typename T >
void apply_permutation_in_place (std::vector< T > &vec, const std::vector< std::size_t > &p)
 

Detailed Description

Grouping of all utility related classes, functions and files

Reference: http://stackoverflow.com/questions/17074324/how-can-i-sort-two-vectors-in-the-same-way-with-criteria-that-uses-only-one-of

Function Documentation

◆ tryParseCdsInformation()

bool ore::data::tryParseCdsInformation ( std::string  strInfo,
CdsReferenceInformation cdsInfo 
)

Attempt to parse string to CdsReferenceInformation

Parameters
[in]strInfoThe string we wish to convert to CdsReferenceInformation
[out]cdsInfoThe resulting CdsReferenceInformation if the parsing was successful.
Returns
true if the parsing was successful and false if not.

If the function receives a strInfo of the form ID|TIER|CCY|DOCCLAUSE with CCY being a valid ISO currency code, TIER being a valid CDS debt tier and DOCCLAUSE being a valid CDS documentation clause, the parsing should be successful. Here, DOCCLAUSE is optional.

◆ parseIborIndex()

boost::shared_ptr<IborIndex> ore::data::parseIborIndex ( const std::string &  strIndex,
std::string &  outTenor,
const QuantLib::Handle< QuantLib::YieldTermStructure > &  h = QuantLib::Handle< QuantLib::YieldTermStructure >() 
)

Convert std::string to QuantLib::IborIndex and return the tenor string component of the index.

In some cases, after parsing the IborIndex, we would like to know the exact tenor string that was part of the strIndex that was parsed. If we ask the resulting index for its tenor via the method Period InterestRateIndex::tenor(), it can be difficult to deduce the original tenor string. A simple example of this is MXN-TIIE-28D where if you call tenor() and then to_string(), you get 4W which is different than the original 28D that is passed in.

Warning:
If the strIndex does not have a tenor component, as is the usual case for overnight indices, outTenor will be populated with the empty string.

◆ isInflationIndex()

std::pair<bool, boost::shared_ptr<QuantLib::ZeroInflationIndex> > ore::data::isInflationIndex ( const std::string &  indexName)

Returns true as the first element in the pair if the indexName is that of an InflationIndex. The second element in the pair is an instance of the inflation index. If indexName is not an inflation index, the first element in the pair is false and the second element is a nullptr.

If inflation indices have been set up via ZeroInflationIndex entries in the Conventions, the conventions should be passed here. If not, the default nullptr parameter will be sufficient.

◆ isGenericIndex()

bool ore::data::isGenericIndex ( const std::string &  indexName)

Return true if the indexName is that of an GenericIndex, otherwise false

◆ parseCommodityIndex()

boost::shared_ptr<QuantExt::CommodityIndex> ore::data::parseCommodityIndex ( const std::string &  name,
bool  hasPrefix = true,
const QuantLib::Handle< QuantExt::PriceTermStructure > &  ts = QuantLib::Handle< QuantExt::PriceTermStructure >(),
const QuantLib::Calendar &  cal = QuantLib::NullCalendar(),
const bool  enforceFutureIndex = true 
)

Convert std::string to QuantExt::ComodityIndex

This function can be used to parse commodity spot indices or commodity future indices:

  • for spot indices, the name is of the form COMM-EXCHANGE:COMMODITY
  • for future indices, the name is of the form COMM-EXCHANGE:CONTRACT:YYYY-MM or COMM-EXCHANGE:CONTRACT:YYYY-MM-DD

◆ internalIndexName()

std::string ore::data::internalIndexName ( const std::string &  indexName)

In some cases, we allow multiple external ibor index names to represent the same QuantLib index. This function returns the unique index name that we use internally to represent the QuantLib index.

For example, we allow:

  • USD-FedFunds-1D and USD-FedFunds externally but we use USD-FedFunds internally
  • CAD-BA-tenor and CAD-CDOR-tenor externally but we use CAD-CDOR-tenor internally

◆ getMemoryUsageBytes()

unsigned long long ore::data::os::getMemoryUsageBytes ( )

Returns the current process memory usage in bytes Parts of code taken from: http://nadeausoftware.com/articles/2012/07/c_c_tip_how_get_process_resident_set_size_physical_memory_use

◆ tryParseReal()

bool ore::data::tryParseReal ( const string &  s,
QuantLib::Real &  result 
)

Attempt to convert text to Real.

Attempts to convert text to Real

Parameters
[in]sThe string we wish to convert to a Real
[out]resultThe result of the conversion if it is valid. Null<Real>() if conversion fails
Returns
True if the conversion was successful, False if not

◆ parseCalendar()

QuantLib::Calendar ore::data::parseCalendar ( const string &  s)

Convert text to QuantLib::Calendar.

For a joint calendar, the separate calendar names should be comma-delimited.

◆ convertMinorToMajorCurrency()

QuantLib::Real ore::data::convertMinorToMajorCurrency ( const std::string &  s,
QuantLib::Real  value 
)

Convert a value from a minor ccy to major.

.i.e 100 GBp to 1 GBP

◆ parseWeekday()

QuantLib::Weekday ore::data::parseWeekday ( const std::string &  s)

Convert text to QuantLib::Weekday

◆ parseMonth()

QuantLib::Month ore::data::parseMonth ( const std::string &  s)

Convert text to QuantLib::Month

◆ tryParse()

bool ore::data::tryParse ( const std::string &  str,
T &  obj,
std::function< T(std::string)>  parser 
)

Attempt to parse string str to obj of type T using parser

Parameters
[in]strThe string we wish to parse.
[out]objThe resulting object if the parsing was successful.
[in]parserThe function to use to attempt to parse str. This function may throw.
Returns
true if the parsing was successful and false if not.

◆ parseVolatilityQuoteType()

QuantLib::VolatilityType ore::data::parseVolatilityQuoteType ( const std::string &  s)

Convert text to QuantLib::VolatilityType

◆ parseCapFloorType()

QuantLib::CapFloor::Type ore::data::parseCapFloorType ( const std::string &  s)

Convert text to QuantLib::CapFloor::Type

◆ parseYoYInflationCapFloorType()

QuantLib::YoYInflationCapFloor::Type ore::data::parseYoYInflationCapFloorType ( const std::string &  s)

Convert text to QuantLib::YoYInflationCapFloor::Type

◆ parseCamAssetType()

QuantExt::CrossAssetModel::AssetType ore::data::parseCamAssetType ( const std::string &  s)

Convert text to QuantExt::CrossAssetModelTypes::AssetType

◆ parseBoostAny()

std::pair<string, string> ore::data::parseBoostAny ( const boost::any &  anyType,
Size  precision = 8 
)

Convert boost::any to pair<string,string>, including the valueType and the value

◆ parseCdsOptionStrikeType()

QuantExt::CdsOption::StrikeType ore::data::parseCdsOptionStrikeType ( const std::string &  s)

Convert text to QuantExt::CdsOption::StrikeType

◆ parseAverageType()

QuantLib::Average::Type ore::data::parseAverageType ( const std::string &  s)

Convert text to QuantLib::Average::Type

◆ parsePriceQuoteMethod()

QuantExt::BondIndex::PriceQuoteMethod ore::data::parsePriceQuoteMethod ( const std::string &  s)

Convert text to QuantExt::BondData::PriceQuoteMethod

◆ fxDominance()

string ore::data::fxDominance ( const string &  s1,
const string &  s2 
)

Convert FX pair to market standard dominance.

Convert FX pair to market standard dominance, e.g. "USD" & "GBP" -> "GBPUSD", "USD" & "JPY" -> "USDJPY"

◆ to_string() [1/5]

std::string ore::data::to_string ( const QuantLib::Date &  date)

Convert QuantLib::Date to std::string.

Returns date as a string in YYYY-MM-DD format, which matches QuantLib::io::iso_date() However that function can have issues with locale so we have a local snprintf() based version.

If date == Date() returns 1900-01-01 so the above format is preserved.

◆ to_string() [2/5]

std::string ore::data::to_string ( bool  aBool)

Convert bool to std::string.

Returns "true" for true and "false" for false

◆ to_string() [3/5]

std::string ore::data::to_string ( const QuantLib::Period &  period)

Convert QuantLib::Period to std::string.

Returns Period as a string as up to QuantLib 1.25, e.g. 13M is written as 1Y1M etc.

◆ to_string() [4/5]

std::string ore::data::to_string ( const std::vector< T > &  vec,
const std::string &  sep = "," 
)

Convert vector to std::string.

Returns a vector into a single string, with elemenst separated by Period as a string as up to QuantLib 1.25, e.g. 13M is written as 1Y1M etc.

◆ to_string() [5/5]

std::string ore::data::to_string ( const T &  t)

Convert type to std::string.

Utility to give to_string() interface to classes and enums that have ostream<< operators defined.