35#include <ql/time/date.hpp>
37#include <ql/shared_ptr.hpp>
55 virtual std::vector<QuantLib::ext::shared_ptr<MarketDatum>>
loadQuotes(
const QuantLib::Date&)
const = 0;
58 virtual QuantLib::ext::shared_ptr<MarketDatum>
get(
const std::string&
name,
const QuantLib::Date& d)
const;
61 virtual std::set<QuantLib::ext::shared_ptr<MarketDatum>>
get(
const std::set<std::string>& names,
62 const QuantLib::Date& asof)
const;
65 virtual std::set<QuantLib::ext::shared_ptr<MarketDatum>>
get(
const Wildcard& wildcard,
const QuantLib::Date& asof)
const;
68 virtual bool has(
const std::string&
name,
const QuantLib::Date& d)
const;
71 virtual bool hasQuotes(
const QuantLib::Date& d)
const;
81 virtual QuantLib::ext::shared_ptr<MarketDatum>
get(
const std::pair<std::string, bool>&
name,
const QuantLib::Date& d)
const;
85 virtual bool hasFixing(
const string&
name,
const QuantLib::Date& d)
const;
97 std::pair<bool, string>
checkFxDuplicate(
const ext::shared_ptr<MarketDatum>,
const QuantLib::Date&);
102 template <
class Archive>
void serialize(Archive& ar,
const unsigned int version) {}
Market data loader base class.
virtual std::vector< QuantLib::ext::shared_ptr< MarketDatum > > loadQuotes(const QuantLib::Date &) const =0
get all quotes, TODO change the return value to std::set
virtual Fixing getFixing(const string &name, const QuantLib::Date &d) const
Default implementation for getFixing.
virtual QuantLib::ext::shared_ptr< MarketDatum > get(const std::string &name, const QuantLib::Date &d) const
get quote by its unique name, throws if not existent, override in derived classes for performance
virtual bool hasQuotes(const QuantLib::Date &d) const
check if there are quotes for a date
void setActualDate(const QuantLib::Date &d)
std::pair< bool, string > checkFxDuplicate(const ext::shared_ptr< MarketDatum >, const QuantLib::Date &)
void serialize(Archive &ar, const unsigned int version)
virtual std::set< Fixing > loadFixings() const =0
const Date & actualDate() const
friend class boost::serialization::access
Serialization.
virtual bool has(const std::string &name, const QuantLib::Date &d) const
Default implementation, returns false if get throws or returns a null pointer.
virtual bool hasFixing(const string &name, const QuantLib::Date &d) const
virtual std::set< QuantExt::Dividend > loadDividends() const
Optional load dividends method.
Classes and functions for log message handling.
Market data representation.
Serializable Credit Default Swap.
utilities for wildcard handling