35 QuantLib::Real
getFactor(
const std::string&
name,
const QuantLib::Date& d)
const;
37 void addFactor(std::string
name, QuantLib::Date d, QuantLib::Real factor);
46 std::set<std::string>
names()
const;
48 std::set<QuantLib::Date>
dates(
const std::string&
name)
const;
56 std::map<std::string, std::vector<std::pair<QuantLib::Date, QuantLib::Real>>>
data_;
Class to hold market data adjustment factors - for example equity stock splits.
QuantLib::Real getFactor(const std::string &name, const QuantLib::Date &d) const
Returns the adjustment factor for a name on a given date.
AdjustmentFactors(QuantLib::Date asof)
std::map< std::string, std::vector< std::pair< QuantLib::Date, QuantLib::Real > > > data_
Map of names to adjustment factors.
virtual void fromXML(ore::data::XMLNode *node) override
std::set< QuantLib::Date > dates(const std::string &name) const
dates with contributions to an adjustment factor for a name
QuantLib::Date asof_
Asof date - only apply adjustments before this date.
std::set< std::string > names() const
names with adjustment factors
virtual ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
void addFactor(std::string name, QuantLib::Date d, QuantLib::Real factor)
Add an adjustment factor.
QuantLib::Real getFactorContribution(const std::string &name, const QuantLib::Date &d) const
gets the contribution to an adjustment factor for a name on a given date
bool hasFactor(const std::string &name) const
Check if we have any adjustment factors for a name.
Small XML Document wrapper class.
Base class for all serializable classes.
Serializable Credit Default Swap.