Logo
Reference manual - version qle_version
Public Member Functions | List of all members
MultiCcyCompositeInstrument Class Reference

Composite instrument More...

#include <qle/instruments/multiccycompositeinstrument.hpp>

+ Inheritance diagram for MultiCcyCompositeInstrument:

Public Member Functions

void add (const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0, const Handle< Quote > &fx=Handle< Quote >(boost::make_shared< SimpleQuote >(1.0)))
 adds an instrument to the composite
 
void subtract (const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0, const Handle< Quote > &fx=Handle< Quote >(boost::make_shared< SimpleQuote >(1.0)))
 shorts an instrument from the composite
 
Observer interface
void deepUpdate () override
 

Instrument interface

bool isExpired () const override
 
void performCalculations () const override
 

Detailed Description

Composite instrument

This instrument is an aggregate of other instruments. Its NPV is the sum of the NPVs of its components, each possibly multiplied by a given factor, and an FX rate.

Warning:
Methods that drive the calculation directly (such as recalculate(), freeze() and others) might not work correctly.