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) | |
CashFlow interface | |
Date | date () const override |
Real | amount () const override |
Visitability | |
void | accept (AcyclicVisitor &) override |
Observer interface | |
void | update () override |
Public Member Functions inherited from FXLinked | |
FXLinked (const Date &fixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex) | |
virtual | ~FXLinked () |
Date | fxFixingDate () const |
Real | foreignAmount () const |
const QuantLib::ext::shared_ptr< FxIndex > & | fxIndex () const |
Real | fxRate () const |
virtual QuantLib::ext::shared_ptr< FXLinked > | clone (QuantLib::ext::shared_ptr< FxIndex > fxIndex)=0 |
FXLinked interface | |
Date | cashFlowDate_ |
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_ |
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.
Definition at line 101 of file fxlinkedcashflow.hpp.
FXLinkedCashFlow | ( | const Date & | cashFlowDate, |
const Date & | fixingDate, | ||
Real | foreignAmount, | ||
QuantLib::ext::shared_ptr< FxIndex > | fxIndex | ||
) |
Definition at line 43 of file fxlinkedcashflow.cpp.
|
override |
|
override |
Definition at line 109 of file fxlinkedcashflow.hpp.
|
override |
Definition at line 133 of file fxlinkedcashflow.hpp.
|
override |
Definition at line 119 of file fxlinkedcashflow.hpp.
|
overridevirtual |
Implements FXLinked.
Definition at line 56 of file fxlinkedcashflow.cpp.
|
private |
Definition at line 128 of file fxlinkedcashflow.hpp.