FX Linked cash-flow. More...
#include <qle/cashflows/fxlinkedcashflow.hpp>
Public Member Functions | |
| FXLinkedCashFlow (const Date &cashFlowDate, const Date &fixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex, const Date &fxResetStart=Null< Date >(), Real domesticAmount=Null< Real >()) | |
CashFlow interface | |
| Date | date () const override |
| Real | amount () const override |
LazyObject interface | |
| void | performCalculations () const override |
Visitability | |
| void | accept (AcyclicVisitor &) override |
| Public Member Functions inherited from FXLinked | |
| FXLinked (const Date &fixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex, const Date &fxResetStart=Null< Date >(), Real domesticAmount=Null< Real >()) | |
| Date | fxFixingDate () const |
| Real | foreignAmount () const |
| const QuantLib::ext::shared_ptr< FxIndex > & | fxIndex () const |
| Real | fxRate () const |
FXLinked interface | |
| QuantLib::ext::shared_ptr< FXLinked > | clone (QuantLib::ext::shared_ptr< FxIndex > fxIndex) override |
Additional Inherited Members | |
| Protected Attributes inherited from FXLinked | |
| Date | fxFixingDate_ |
| Real | foreignAmount_ |
| QuantLib::ext::shared_ptr< FxIndex > | fxIndex_ |
| Date | fxResetStart_ |
| Real | domesticAmount_ |
FX Linked cash-flow.
Cashflow of Domestic currency where the amount is fx linked to some fixed foreign amount.
For example: a JPY flow based off 1M USD, if the USDJPY FX rate is 123.45 then the JPY amount is 123.45 M JPY.
FXLinkedCashFlow checks the FX fixing date against the eval date
For future fixings (date > eval) this class calculates the FX Fwd rate (using the provided FX Spot rate and FOR and DOM yield curves)
For todays fixing (date = eval) this class converts the foreign amount using the provided FX Spot rate.
For previous fixings (date < eval) this class checks the QuantLib IndexManager to get the FX fixing at which the foreign rate should be converted at. The name of the index is a parameter to the constructor.
This is not a lazy object.