27#include <ql/instrument.hpp>
28#include <ql/quotes/simplequote.hpp>
47 typedef std::tuple<ext::shared_ptr<Instrument>, Real, Handle<Quote>>
component;
48 typedef std::list<component>::iterator
iterator;
53 void add(
const ext::shared_ptr<Instrument>& instrument, Real multiplier = 1.0,
54 const Handle<Quote>& fx = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.0)));
56 void subtract(
const ext::shared_ptr<Instrument>& instrument, Real multiplier = 1.0,
57 const Handle<Quote>& fx = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.0)));
void performCalculations() const override
bool isExpired() const override
std::list< component >::iterator iterator
std::list< component >::const_iterator const_iterator
void deepUpdate() override
void add(const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0, const Handle< Quote > &fx=Handle< Quote >(QuantLib::ext::make_shared< SimpleQuote >(1.0)))
adds an instrument to the composite
std::list< component > components_
std::tuple< ext::shared_ptr< Instrument >, Real, Handle< Quote > > component
void subtract(const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0, const Handle< Quote > &fx=Handle< Quote >(QuantLib::ext::make_shared< SimpleQuote >(1.0)))
shorts an instrument from the composite