26#include <ql/instrument.hpp>
27#include <ql/time/date.hpp>
31#include <boost/timer/timer.hpp>
52 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
58 virtual void initialise(
const std::vector<QuantLib::Date>& dates) = 0;
66 virtual QuantLib::Real
NPV()
const = 0;
84 QuantLib::ext::shared_ptr<QuantLib::Instrument>
qlInstrument(
const bool calculate =
false)
const;
115 Real
getTimedNPV(
const QuantLib::ext::shared_ptr<QuantLib::Instrument>& instr)
const;
132 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
135 void initialise(
const std::vector<QuantLib::Date>&)
override{};
138 QuantLib::Real
NPV()
const override;
const std::vector< Real > & additionalMultipliers() const
virtual Real multiplier2() const
virtual void reset()=0
reset is called every time a new path is about to be priced.
std::size_t getNumberOfPricings() const
Get number of pricings.
virtual QuantLib::Real NPV() const =0
Return the NPV of this instrument.
virtual bool isOption()
is it an Option?
virtual ~InstrumentWrapper()
virtual void updateQlInstruments()
call update on enclosed instrument(s)
std::size_t numberOfPricings_
virtual void initialise(const std::vector< QuantLib::Date > &dates)=0
Initialise with the given date grid.
const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > & additionalInstruments() const
std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > additionalInstruments_
virtual const std::map< std::string, boost::any > & additionalResults() const =0
Return the additional results of this instrument.
boost::timer::nanosecond_type cumulativePricingTime_
QuantLib::Real additionalInstrumentsNPV() const
boost::timer::nanosecond_type getCumulativePricingTime() const
Get cumulative timing spent on pricing.
Real getTimedNPV(const QuantLib::ext::shared_ptr< QuantLib::Instrument > &instr) const
std::vector< Real > additionalMultipliers_
void resetPricingStats() const
Reset pricing statistics.
QuantLib::ext::shared_ptr< QuantLib::Instrument > instrument_
QuantLib::ext::shared_ptr< QuantLib::Instrument > qlInstrument(const bool calculate=false) const
Inspectors.
Vanilla Instrument Wrapper.
QuantLib::Real NPV() const override
Return the NPV of this instrument.
const std::map< std::string, boost::any > & additionalResults() const override
Return the additional results of this instrument.
void initialise(const std::vector< QuantLib::Date > &) override
Initialise with the given date grid.
void reset() override
reset is called every time a new path is about to be priced.
Serializable Credit Default Swap.