42 OptionWrapper(
const QuantLib::ext::shared_ptr<QuantLib::Instrument>& inst,
const bool isLongOption,
44 const std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>& undInst,
48 const Real undMultiplier = 1.0,
50 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
54 void initialise(
const std::vector<QuantLib::Date>& dates)
override;
55 void reset()
override;
56 QuantLib::Real
NPV()
const override;
125 const QuantLib::ext::shared_ptr<QuantLib::Instrument>& undInst,
129 const Real undMultiplier = 1.0,
131 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
148 const QuantLib::ext::shared_ptr<QuantLib::Instrument>& undInst,
152 const Real undMultiplier = 1.0,
154 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
171 const std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>& undInsts,
175 const Real undMultiplier = 1.0,
177 std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument>>(),
181 QL_REQUIRE(exerciseDates.size() == undInsts.size(),
182 "sizes of exercise date and underlying instrument vectors do not match");
bool exercise() const override
AmericanOptionWrapper(const QuantLib::ext::shared_ptr< QuantLib::Instrument > &inst, const bool isLongOption, const QuantLib::Date &exerciseDate, const bool isPhysicalDelivery, const QuantLib::ext::shared_ptr< QuantLib::Instrument > &undInst, const Real multiplier=1.0, const Real undMultiplier=1.0, const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > &additionalInstruments=std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > >(), const std::vector< Real > &additionalMultipliers=std::vector< Real >())
QuantLib::ext::shared_ptr< QuantLib::Instrument > getUnderlying() const
bool exercise() const override
BermudanOptionWrapper(const QuantLib::ext::shared_ptr< QuantLib::Instrument > &inst, const bool isLongOption, const std::vector< QuantLib::Date > &exerciseDates, const bool isPhysicalDelivery, const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > &undInsts, const Real multiplier=1.0, const Real undMultiplier=1.0, const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > &additionalInstruments=std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > >(), const std::vector< Real > &additionalMultipliers=std::vector< Real >())
bool convertToEuropean() const
EuropeanOptionWrapper(const QuantLib::ext::shared_ptr< QuantLib::Instrument > &inst, const bool isLongOption, const QuantLib::Date &exerciseDate, const bool isPhysicalDelivery, const QuantLib::ext::shared_ptr< QuantLib::Instrument > &undInst, const Real multiplier=1.0, const Real undMultiplier=1.0, const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > &additionalInstruments=std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > >(), const std::vector< Real > &additionalMultipliers=std::vector< Real >())
bool exercise() const override
const std::vector< Real > & additionalMultipliers() const
virtual void updateQlInstruments()
call update on enclosed instrument(s)
const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > & additionalInstruments() const
Real getTimedNPV(const QuantLib::ext::shared_ptr< QuantLib::Instrument > &instr) const
const QuantLib::Date & exerciseDate() const
the (actual) date the option was exercised
QuantLib::Real NPV() const override
Return the NPV of this instrument.
QuantLib::Date exerciseDate_
bool isOption() override
is it an Option?
virtual bool exercise() const =0
const std::map< std::string, boost::any > & additionalResults() const override
Return the additional results of this instrument.
void enableExercise()
disable exercise decisions
std::vector< QuantLib::Date > effectiveExerciseDates_
const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > & underlyingInstruments() const
return the underlying instruments
void updateQlInstruments() override
call update on enclosed instrument(s)
void disableExercise()
enable exercise decisions
Real underlyingMultiplier() const
the underlying multiplier
bool isExercised() const
return true if option is exercised
void initialise(const std::vector< QuantLib::Date > &dates) override
Initialise with the given date grid.
QuantLib::ext::shared_ptr< QuantLib::Instrument > activeUnderlyingInstrument_
const QuantLib::ext::shared_ptr< QuantLib::Instrument > & activeUnderlyingInstrument(const bool calculate=false) const
Real multiplier2() const override
bool isPhysicalDelivery() const
return true for physical delivery, false for cash settlement
bool isLong() const
return true if option is long, false if option is short
void reset() override
reset is called every time a new path is about to be priced.
std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > underlyingInstruments_
std::vector< QuantLib::Date > contractExerciseDates_
Base class for wrapper of QL instrument, used to store "state" of trade under each scenario.
Serializable Credit Default Swap.