26#include <ql/index.hpp>
27#include <ql/indexes/iborindex.hpp>
28#include <ql/indexes/inflationindex.hpp>
29#include <ql/indexes/swapindex.hpp>
38using QuantLib::Handle;
39using QuantLib::IborIndex;
42using QuantLib::SwapIndex;
43using QuantLib::YieldTermStructure;
44using QuantLib::ZeroInflationIndex;
45using QuantLib::ZeroInflationTermStructure;
52QuantLib::ext::shared_ptr<QuantExt::FxIndex>
53parseFxIndex(
const string& s,
const Handle<Quote>& fxSpot = Handle<Quote>(),
54 const Handle<YieldTermStructure>& sourceYts = Handle<YieldTermStructure>(),
55 const Handle<YieldTermStructure>& targetYts = Handle<YieldTermStructure>(),
56 const bool useConventions =
false);
62QuantLib::ext::shared_ptr<IborIndex>
parseIborIndex(
const string& s,
63 const Handle<YieldTermStructure>& h = Handle<YieldTermStructure>());
78 const std::string& strIndex, std::string& outTenor,
79 const QuantLib::Handle<QuantLib::YieldTermStructure>& h = QuantLib::Handle<QuantLib::YieldTermStructure>());
85bool tryParseIborIndex(
const string& s, QuantLib::ext::shared_ptr<IborIndex>& index);
102std::pair<bool, QuantLib::ext::shared_ptr<QuantLib::ZeroInflationIndex>>
isInflationIndex(
const std::string& indexName);
125QuantLib::ext::shared_ptr<QuantExt::EquityIndex2>
parseEquityIndex(
const string& s);
131QuantLib::ext::shared_ptr<SwapIndex>
132parseSwapIndex(
const string& s,
const Handle<YieldTermStructure>& forwarding = Handle<YieldTermStructure>(),
133 const Handle<YieldTermStructure>& discounting = Handle<YieldTermStructure>());
139QuantLib::ext::shared_ptr<ZeroInflationIndex>
140parseZeroInflationIndex(
const string& s,
const Handle<ZeroInflationTermStructure>& h = Handle<ZeroInflationTermStructure>());
143QuantLib::ext::shared_ptr<ZeroInflationIndex>
145 const Handle<ZeroInflationTermStructure>& h = Handle<ZeroInflationTermStructure>());
151QuantLib::ext::shared_ptr<QuantExt::BondIndex>
parseBondIndex(
const string& s);
169 const std::string&
name,
bool hasPrefix =
true,
170 const QuantLib::Handle<QuantExt::PriceTermStructure>& ts = QuantLib::Handle<QuantExt::PriceTermStructure>(),
171 const QuantLib::Calendar& cal = QuantLib::NullCalendar(),
const bool enforceFutureIndex =
true);
183QuantLib::ext::shared_ptr<Index>
parseIndex(
const string& s);
207bool isFxIndex(
const std::string& indexName);
QuantLib::ext::shared_ptr< ZeroInflationIndex > parseZeroInflationIndex(const string &s, const Handle< ZeroInflationTermStructure > &h)
Convert std::string to QuantLib::ZeroInflationIndex.
QuantLib::ext::shared_ptr< SwapIndex > parseSwapIndex(const string &s, const Handle< YieldTermStructure > &f, const Handle< YieldTermStructure > &d)
Convert std::string to QuantLib::SwapIndex.
bool isEquityIndex(const string &indexName)
Return true if the indexName is that of an EquityIndex, otherwise false.
QuantLib::ext::shared_ptr< IborIndex > parseIborIndex(const string &s, const Handle< YieldTermStructure > &h)
Convert std::string to QuantLib::IborIndex.
bool isOvernightIndex(const string &indexName)
Return true if the indexName is that of an overnight index, otherwise false.
bool isBmaIndex(const string &indexName)
Return true if the indexName is that of an bma/sifma index, otherwise false.
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > parseEquityIndex(const string &s)
Convert std::string (e.g SP5) to QuantExt::EquityIndex.
QuantLib::ext::shared_ptr< FxIndex > parseFxIndex(const string &s, const Handle< Quote > &fxSpot, const Handle< YieldTermStructure > &sourceYts, const Handle< YieldTermStructure > &targetYts, const bool useConventions)
Convert std::string to QuantExt::FxIndex.
pair< bool, QuantLib::ext::shared_ptr< ZeroInflationIndex > > isInflationIndex(const string &indexName)
bool isCommodityIndex(const string &indexName)
Return true if the indexName is that of an CommodityIndex, otherwise false.
bool tryParseIborIndex(const string &s, QuantLib::ext::shared_ptr< IborIndex > &index)
Try to convert std::string to QuantLib::IborIndex.
string internalIndexName(const string &indexName)
bool isGenericIndex(const string &indexName)
QuantLib::ext::shared_ptr< BondIndex > parseBondIndex(const string &name)
Convert std::string to QuantExt::BondIndex.
bool isGenericIborIndex(const string &indexName)
Return true if the indexName is that of a generic ibor index, otherwise false.
QuantLib::ext::shared_ptr< Index > parseIndex(const string &s)
Convert std::string to QuantLib::Index.
QuantLib::ext::shared_ptr< QuantLib::Index > parseGenericIndex(const string &s)
Convert std::string (GENERIC-...) to QuantExt::Index.
QuantLib::ext::shared_ptr< ConstantMaturityBondIndex > parseConstantMaturityBondIndex(const string &name)
Convert std::string to QuantExt::ConstantMaturityBondIndex.
bool isFxIndex(const std::string &indexName)
QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > parseCommodityIndex(const string &name, bool hasPrefix, const Handle< PriceTermStructure > &ts, const Calendar &cal, const bool enforceFutureIndex)
std::string inverseFxIndex(const std::string &indexName)
Serializable Credit Default Swap.