Instrument Wrapper. More...
#include <ored/portfolio/instrumentwrapper.hpp>
Inheritance diagram for InstrumentWrapper:Public Member Functions | |
| InstrumentWrapper (const QuantLib::ext::shared_ptr< QuantLib::Instrument > &inst, const Real multiplier=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 >()) | |
| virtual void | initialise (const std::vector< QuantLib::Date > &dates)=0 |
| Initialise with the given date grid. | |
| virtual void | reset ()=0 |
| reset is called every time a new path is about to be priced. More... | |
| virtual QuantLib::Real | NPV () const =0 |
| Return the NPV of this instrument. | |
| virtual const std::map< std::string, boost::any > & | additionalResults () const =0 |
| Return the additional results of this instrument. | |
| QuantLib::Real | additionalInstrumentsNPV () const |
| virtual void | updateQlInstruments () |
| call update on enclosed instrument(s) | |
| virtual bool | isOption () |
| is it an Option? | |
| QuantLib::ext::shared_ptr< QuantLib::Instrument > | qlInstrument (const bool calculate=false) const |
| Inspectors. More... | |
| Real | multiplier () const |
| virtual Real | multiplier2 () const |
| const std::vector< QuantLib::ext::shared_ptr< QuantLib::Instrument > > & | additionalInstruments () const |
| const std::vector< Real > & | additionalMultipliers () const |
| boost::timer::nanosecond_type | getCumulativePricingTime () const |
| Get cumulative timing spent on pricing. | |
| std::size_t | getNumberOfPricings () const |
| Get number of pricings. | |
| void | resetPricingStats () const |
| Reset pricing statistics. | |
Protected Member Functions | |
| Real | getTimedNPV (const QuantLib::ext::shared_ptr< QuantLib::Instrument > &instr) const |
Instrument Wrapper.
Wrap Instrument base class Derived classes should
|
pure virtual |
reset is called every time a new path is about to be priced.
For path dependent Wrappers, this is when internal state should be reset
Implemented in OptionWrapper, VanillaInstrument, CompositeInstrumentWrapper, and BondPositionInstrumentWrapper.
| QuantLib::ext::shared_ptr<QuantLib::Instrument> qlInstrument | ( | const bool | calculate = false | ) | const |
Inspectors.
The "QuantLib" instrument Pass true if you trigger a calculation on the returned instrument and want to record the timing for that calculation. If in doubt whether a calculation is triggered, pass false.
| Real multiplier | ( | ) | const |
The multiplier
|
virtual |
multiplier to be applied on top of multiplier(), e.g. -1 for short options
Reimplemented in OptionWrapper.
| const std::vector<QuantLib::ext::shared_ptr<QuantLib::Instrument> >& additionalInstruments | ( | ) | const |
additional instruments
| const std::vector<Real>& additionalMultipliers | ( | ) | const |
multipliers for additional instruments