Files | |
| file | iborfallbackconfig.hpp |
| ibor fallback configuration | |
| file | calendaradjustmentconfig.hpp |
| Interface for calendar modifications, additional holidays and business days. | |
| 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 / local vol model class for n underlyings (fx, equity or commodity) | |
| file | dummymodel.hpp |
| dummy model implementation | |
| file | fdgaussiancam.hpp |
| fd gaussian cross asset model for single underlying ir model | |
| file | gaussiancam.hpp |
| gaussian cross asset model for ir, fx, eq, com | |
| file | gaussiancamcg.hpp |
| Gaussian CAM model, cg variant. | |
| 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 | 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 | credit.hpp |
| helper functions related to credit products | |
| file | csvfilereader.hpp |
| utility class to access CSV files | |
| file | currencyparser.hpp |
| currency parser singleton class | |
| file | dependencies.hpp |
| Utility functions for determining curve dependencies. | |
| 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 | 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 | serializationdaycounter.hpp |
| support for QuantLib::DayCounter serialization | |
| file | strike.hpp |
| strike description | |
| file | timeperiod.hpp |
| non-contiguous time period handling | |
| file | timer.hpp |
| Utility function for recording times. | |
| 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) |
| void | addMarketObjectDependencies (std::map< std::string, std::map< ore::data::MarketObject, std::set< std::string > > > *objects, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs, const std::string &baseCcy, const std::string &baseCcyDiscountCurve, const QuantLib::ext::shared_ptr< IborFallbackConfig > &iborFallbackConfig=QuantLib::ext::make_shared< IborFallbackConfig >(IborFallbackConfig::defaultConfig())) |
| Add additional curve dependencies to the given map by MarketObject. | |
| std::string | marketObjectToCurveSpec (const MarketObject &mo, const std::string &name, const string &baseCcy, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs) |
| Generate the curve spec name for a market object. | |
| std::string | currencyToDiscountCurve (const std::string &ccy, const std::string &baseCcy, const std::string &baseCcyDiscountCurve, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs) |
| std::string | swapIndexDiscountCurve (const std::string &ccy, const std::string &baseCcy=std::string(), const std::string &swapIndexConvId=std::string()) |
| Find an appropriate discount curve for a SwapIndex if non provided. | |
| void | buildCollateralCurveConfig (const string &curveId, const std::string &baseCcy, const std::string &baseCcyDiscountCurve, const QuantLib::ext::shared_ptr< CurveConfigurations > &curveConfigs) |
| std::set< std::string > | getCollateralisedDiscountCcy (const std::string &ccy, const QuantLib::ext::shared_ptr< CurveConfigurations > &curveConfigs) |
| const bool | isCollateralCurve (const std::string &id, std::vector< std::string > &tokens) |
| std::vector< std::vector< std::string > > | flowAnalysis (const QuantLib::Leg &) |
| Flow Analysis. | |
| QuantLib::ext::shared_ptr< QuantExt::FxIndex > | parseFxIndex (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. | |
| QuantLib::ext::shared_ptr< IborIndex > | parseIborIndex (const string &s, const Handle< YieldTermStructure > &h=Handle< YieldTermStructure >()) |
| Convert std::string to QuantLib::IborIndex. | |
| QuantLib::ext::shared_ptr< IborIndex > | 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. | |
| bool | tryParseIborIndex (const string &s, QuantLib::ext::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, QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > > | isInflationIndex (const std::string &indexName) |
| bool | isIborIndex (const std::string &indexName) |
Return true if the indexName is that of an IborIndex, otherwise false. | |
| 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 | isBondFuturesIndex (const std::string &indexName) |
Return true if the indexName is that of a BondFuturesIndex, otherwise false. | |
| bool | isGenericIndex (const std::string &indexName) |
| QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > | parseEquityIndex (const string &s) |
| Convert std::string (e.g SP5) to QuantExt::EquityIndex. | |
| QuantLib::ext::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. | |
| QuantLib::ext::shared_ptr< ZeroInflationIndex > | parseZeroInflationIndex (const string &s, const Handle< ZeroInflationTermStructure > &h=Handle< ZeroInflationTermStructure >()) |
| Convert std::string to QuantLib::ZeroInflationIndex. | |
| QuantLib::ext::shared_ptr< QuantLib::Index > | parseBondIndex (const string &s) |
| Convert std::string to QuantExt::BondIndex or BondFuturesIndex (if expiry is given in the name, deprecated). | |
| QuantLib::ext::shared_ptr< QuantExt::BondFuturesIndex > | parseBondFuturesIndex (const string &s) |
| Convert std::string to QuantExt::BondFuturesIndex. | |
| QuantLib::ext::shared_ptr< QuantExt::ConstantMaturityBondIndex > | parseConstantMaturityBondIndex (const string &s) |
| Convert std::string to QuantExt::ConstantMaturityBondIndex. | |
| QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > | 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) |
| QuantLib::ext::shared_ptr< QuantLib::Index > | parseGenericIndex (const string &s) |
| Convert std::string (GENERIC-...) to QuantExt::Index. | |
| QuantLib::ext::shared_ptr< Index > | parseIndex (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. | |
| void | dumpStacktrace () |
| Write the current stacktrace to stderr and LOG() with level = ALERT. | |
| void | setAssertHandler () |
| Set an assert handler that logs the stacktrace. | |
| QuantLib::Date | parseDate (const string &s) |
| Convert std::string to QuantLib::Date. | |
| QuantLib::Real | parseReal (const string &s) |
| Convert text to Real. | |
| Real | parseRealOrNull (const string &s) |
| Convert text to Real, empty string to Null<Real>(). | |
| bool | tryParseReal (const string &s, QuantLib::Real &result) |
| Attempt to convert text to Real. | |
| 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. | |
| 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. | |
| QuantExt::ConfigurableCurrency::Type | parseCurrencyType (const string &s) |
| Convert text to QuantExt::ConfigurableCurrency::Type (Major, Minor, Metal, Crypto). | |
| 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. | |
| 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(const 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 QuantLib::ext::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. | |
| 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. | |
| QuantExt::McMultiLegBaseEngine::RegressorModel | parseRegressorModel (const std::string &s) |
| Convert text to QuantExt::McMultiLegBaseEngine::RegressorModel. | |
| QuantExt::McMultiLegBaseEngine::VarGroupMode | parseVarGroupMode (const std::string &s) |
| Convert text to QuantExt::McMultiLegBaseEngine::VarGroupMode. | |
| MporCashFlowMode | parseMporCashFlowMode (const std::string &s) |
| Convert text to MporCashFlowMode. | |
| std::ostream & | operator<< (std::ostream &os, MporCashFlowMode t) |
| Write MporCashFlowMode to stream. | |
| QuantExt::SabrParametricVolatility::ModelVariant | parseSabrParametricVolatilityModelVariant (const std::string &s) |
| Parse SabrParametricVolatility::ModelVariant. | |
| std::ostream & | operator<< (std::ostream &out, QuantExt::SabrParametricVolatility::ModelVariant m) |
| Write SabrParametricVolatility::ModelVariant. | |
| std::ostream & | operator<< (std::ostream &os, QuantLib::Exercise::Type type) |
| Write QuantLib::Exercise::Type. | |
| std::ostream & | operator<< (std::ostream &os, SalvagingAlgorithm::Type type) |
| Write SalvagingAlgorithm type. | |
| ParConversionMatrixRegularisation | parseParConversionMatrixRegularisation (const std::string &s) |
| Convert text to ParConversionMatrixRegularisation. | |
| std::ostream & | operator<< (std::ostream &os, ParConversionMatrixRegularisation regularisation) |
| Write ParConversionMatrixRegularisation. | |
| 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). | |
| 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. | |
| std::string | to_string (bool aBool) |
| Convert bool to std::string. | |
| std::string | to_string (const QuantLib::Period &period) |
| Convert QuantLib::Period to std::string. | |
| template<class T> | |
| std::string | to_string (const std::vector< T > &vec, const std::string &sep=",") |
| Convert vector to std::string. | |
| 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. | |
| 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) |
Grouping of all utility related classes, functions and files
| bool tryParseCdsInformation | ( | std::string | strInfo, |
| CdsReferenceInformation & | cdsInfo ) |
Attempt to parse string to CdsReferenceInformation
| [in] | strInfo | The string we wish to convert to CdsReferenceInformation |
| [out] | cdsInfo | The resulting CdsReferenceInformation if the parsing was successful. |
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.
| std::string currencyToDiscountCurve | ( | const std::string & | ccy, |
| const std::string & | baseCcy, | ||
| const std::string & | baseCcyDiscountCurve, | ||
| const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > & | curveConfigs ) |
Get the discount curve for the currency ccy.
ccy is the base currency, determines the discount curve from the configccy is not the base currency, the discount curve is by convention ccy-IN-base | void buildCollateralCurveConfig | ( | const string & | curveId, |
| const std::string & | baseCcy, | ||
| const std::string & | baseCcyDiscountCurve, | ||
| const QuantLib::ext::shared_ptr< CurveConfigurations > & | curveConfigs ) |
Auto build a curve config for a curveId of form CCY1-IN-CCY2, which represents a curve of CCY1 collateralised in CCY 2
| std::set< std::string > getCollateralisedDiscountCcy | ( | const std::string & | ccy, |
| const QuantLib::ext::shared_ptr< CurveConfigurations > & | curveConfigs ) |
Get a list of ccy's for which we have a discount curve that the given ccy is collateralised in e.g. given ccy is CHF, we have CHF-IN-EUR, CHF-IN-USD, method returns EUR, USD
| const bool isCollateralCurve | ( | const std::string & | id, |
| std::vector< std::string > & | tokens ) |
Check if curve of form CCY1-IN-CCY2
| QuantLib::ext::shared_ptr< IborIndex > 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.
strIndex does not have a tenor component, as is the usual case for overnight indices, outTenor will be populated with the empty string.| std::pair< bool, QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > > 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.
| bool isGenericIndex | ( | const std::string & | indexName | ) |
Return true if the indexName is that of an GenericIndex, otherwise false
| QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > 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:
name is of the form COMM-EXCHANGE:COMMODITYname is of the form COMM-EXCHANGE:CONTRACT:YYYY-MM or COMM-EXCHANGE:CONTRACT:YYYY-MM-DD | std::string 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 internallyCAD-BA-tenor and CAD-CDOR-tenor externally but we use CAD-CDOR-tenor internally | unsigned long long 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
| bool tryParseReal | ( | const string & | s, |
| QuantLib::Real & | result ) |
Attempt to convert text to Real.
Attempts to convert text to Real
| [in] | s | The string we wish to convert to a Real |
| [out] | result | The result of the conversion if it is valid. Null<Real>() if conversion fails |
| QuantLib::Calendar parseCalendar | ( | const string & | s | ) |
Convert text to QuantLib::Calendar.
For a joint calendar, the separate calendar names should be comma-delimited.
| QuantLib::Real convertMinorToMajorCurrency | ( | const std::string & | s, |
| QuantLib::Real | value ) |
Convert a value from a minor ccy to major.
.i.e 100 GBp to 1 GBP
| QuantLib::Weekday parseWeekday | ( | const std::string & | s | ) |
Convert text to QuantLib::Weekday
| QuantLib::Month parseMonth | ( | const std::string & | s | ) |
Convert text to QuantLib::Month
| bool tryParse | ( | const std::string & | str, |
| T & | obj, | ||
| std::function< T(const std::string &)> | parser ) |
Attempt to parse string str to obj of type T using parser
| [in] | str | The string we wish to parse. |
| [out] | obj | The resulting object if the parsing was successful. |
| [in] | parser | The function to use to attempt to parse str. This function may throw. |
true if the parsing was successful and false if not. | QuantLib::VolatilityType parseVolatilityQuoteType | ( | const std::string & | s | ) |
Convert text to QuantLib::VolatilityType
| QuantLib::CapFloor::Type parseCapFloorType | ( | const std::string & | s | ) |
Convert text to QuantLib::CapFloor::Type
| QuantLib::YoYInflationCapFloor::Type parseYoYInflationCapFloorType | ( | const std::string & | s | ) |
Convert text to QuantLib::YoYInflationCapFloor::Type
| QuantExt::CrossAssetModel::AssetType parseCamAssetType | ( | const std::string & | s | ) |
Convert text to QuantExt::CrossAssetModelTypes::AssetType
| std::pair< string, string > parseBoostAny | ( | const QuantLib::ext::any & | anyType, |
| Size | precision = 8 ) |
Convert QuantLib::ext::any to pair<string,string>, including the valueType and the value
| QuantExt::CdsOption::StrikeType parseCdsOptionStrikeType | ( | const std::string & | s | ) |
Convert text to QuantExt::CdsOption::StrikeType
| QuantLib::Average::Type parseAverageType | ( | const std::string & | s | ) |
Convert text to QuantLib::Average::Type
| QuantExt::BondIndex::PriceQuoteMethod parsePriceQuoteMethod | ( | const std::string & | s | ) |
Convert text to QuantExt::BondData::PriceQuoteMethod
Convert FX pair to market standard dominance.
Convert FX pair to market standard dominance, e.g. "USD" & "GBP" -> "GBPUSD", "USD" & "JPY" -> "USDJPY"
| std::string 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.
| std::string to_string | ( | bool | aBool | ) |
Convert bool to std::string.
Returns "true" for true and "false" for false
| std::string 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.
| std::string 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.
| std::string 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.