FX Forward More...
#include <qle/instruments/fxforward.hpp>
Classes | |
class | arguments |
class | engine |
class | results |
Public Member Functions | |
Constructors | |
FxForward (const Real &nominal1, const Currency ¤cy1, const Real &nominal2, const Currency ¤cy2, const Date &maturityDate, const bool &payCurrency1, const bool isPhysicallySettled=true, const Date &payDate=Date(), const Currency &payCcy=Currency(), const Date &fixingDate=Date(), const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr, bool includeSettlementDateFlows=false) | |
FxForward (const Money &nominal1, const ExchangeRate &forwardRate, const Date &forwardDate, bool sellingNominal, const bool isPhysicallySettled=true, const Date &payDate=Date(), const Currency &payCcy=Currency(), const Date &fixingDate=Date(), const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr, bool includeSettlementDateFlows=false) | |
FxForward (const Money &nominal1, const Handle< Quote > &fxForwardQuote, const Currency ¤cy2, const Date &maturityDate, bool sellingNominal, const bool isPhysicallySettled=true, const Date &payDate=Date(), const Currency &payCcy=Currency(), const Date &fixingDate=Date(), const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr, bool includeSettlementDateFlows=false) | |
Results | |
const Money & | npvMoney () const |
Return NPV as money (the price currency is set in the pricing engine) More... | |
const ExchangeRate & | fairForwardRate () const |
Return the fair FX forward rate. More... | |
Additional interface | |
Real | currency1Nominal () const |
Real | currency2Nominal () const |
Currency | currency1 () const |
Currency | currency2 () const |
Date | maturityDate () const |
Date | payDate () const |
Currency | payCcy () const |
QuantLib::ext::shared_ptr< QuantExt::FxIndex > | fxIndex () const |
bool | payCurrency1 () const |
Instrument interface | |
Real | nominal1_ |
Currency | currency1_ |
Real | nominal2_ |
Currency | currency2_ |
Date | maturityDate_ |
bool | payCurrency1_ |
bool | isPhysicallySettled_ |
Date | payDate_ |
Currency | payCcy_ |
QuantLib::ext::shared_ptr< FxIndex > | fxIndex_ |
Date | fixingDate_ |
bool | includeSettlementDateFlows_ |
Money | npv_ |
ExchangeRate | fairForwardRate_ |
bool | isExpired () const override |
void | setupArguments (PricingEngine::arguments *) const override |
void | fetchResults (const PricingEngine::results *) const override |
void | setupExpired () const override |
FX Forward
This class holds the term sheet data for an FX Forward instrument.
\ingroup instruments
Definition at line 44 of file fxforward.hpp.
FxForward | ( | const Real & | nominal1, |
const Currency & | currency1, | ||
const Real & | nominal2, | ||
const Currency & | currency2, | ||
const Date & | maturityDate, | ||
const bool & | payCurrency1, | ||
const bool | isPhysicallySettled = true , |
||
const Date & | payDate = Date() , |
||
const Currency & | payCcy = Currency() , |
||
const Date & | fixingDate = Date() , |
||
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & | fxIndex = nullptr , |
||
bool | includeSettlementDateFlows = false |
||
) |
nominal1,currency1 | There are nominal1 units of currency1. |
nominal2,currency2 | There are nominal2 units of currency2. |
maturityDate | Date on which currency amounts are exchanged. |
payCurrency1 | Pay nominal1 if true, otherwise pay nominal2. |
isPhysicallySettled | if true fx forward is physically settled |
payDate | Date on which the cashflows are exchanged |
payCcy | If cash settled, the settlement currency |
fixingDate | If cash settled, the fixing date |
fxIndex | If cash settled, the FX index from which to take the fixing on the fixing date |
includeSettlementDateFlows | If true, we include cash flows on valuation date into the NPV calculation |
Definition at line 27 of file fxforward.cpp.
FxForward | ( | const Money & | nominal1, |
const ExchangeRate & | forwardRate, | ||
const Date & | forwardDate, | ||
bool | sellingNominal, | ||
const bool | isPhysicallySettled = true , |
||
const Date & | payDate = Date() , |
||
const Currency & | payCcy = Currency() , |
||
const Date & | fixingDate = Date() , |
||
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & | fxIndex = nullptr , |
||
bool | includeSettlementDateFlows = false |
||
) |
nominal1 | FX forward nominal amount (domestic currency) |
forwardRate | FX rate of the exchange |
forwardDate | Date of the exchange. |
sellingNominal | Sell (pay) nominal1 if true, otherwise buy (receive) nominal. |
isPhysicallySettled | if true fx forward is physically settled |
payDate | Date on which the cashflows are exchanged |
payCcy | If cash settled, the settlement currency |
fixingDate | If cash settled, the fixing date |
fxIndex | If cash settled, the FX index from which to take the fixing on the fixing date |
includeSettlementDateFlows | If true, we include cash flows on valuation date into the NPV calculation |
Definition at line 50 of file fxforward.cpp.
FxForward | ( | const Money & | nominal1, |
const Handle< Quote > & | fxForwardQuote, | ||
const Currency & | currency2, | ||
const Date & | maturityDate, | ||
bool | sellingNominal, | ||
const bool | isPhysicallySettled = true , |
||
const Date & | payDate = Date() , |
||
const Currency & | payCcy = Currency() , |
||
const Date & | fixingDate = Date() , |
||
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & | fxIndex = nullptr , |
||
bool | includeSettlementDateFlows = false |
||
) |
nominal1 | FX forward nominal amount 1 (domestic currency) |
fxForwardQuote | FX forward quote giving the rate in domestic units per one foreign unit |
currency2 | currency for nominal2 (foreign currency) |
maturityDate | FX Forward maturity date |
sellingNominal | Sell (pay) nominal1 if true, otherwise buy (receive) nominal1. |
isPhysicallySettled | if true fx forward is physically settled |
payDate | Date on which the cashflows are exchanged |
payCcy | If cash settled, the settlement currency |
fixingDate | If cash settled, the fixing date |
fxIndex | If cash settled, the FX index from which to take the fixing on the fixing date |
includeSettlementDateFlows | If true, we include cash flows on valuation date into the NPV calculation |
Definition at line 78 of file fxforward.cpp.
const Money & npvMoney | ( | ) | const |
Return NPV as money (the price currency is set in the pricing engine)
Definition at line 139 of file fxforward.hpp.
const ExchangeRate & fairForwardRate | ( | ) | const |
Return the fair FX forward rate.
Definition at line 144 of file fxforward.hpp.
|
override |
Definition at line 104 of file fxforward.cpp.
|
override |
Definition at line 115 of file fxforward.cpp.
|
override |
Definition at line 135 of file fxforward.cpp.
Real currency1Nominal | ( | ) | const |
Definition at line 159 of file fxforward.hpp.
Real currency2Nominal | ( | ) | const |
Definition at line 160 of file fxforward.hpp.
Currency currency1 | ( | ) | const |
Definition at line 161 of file fxforward.hpp.
Currency currency2 | ( | ) | const |
Definition at line 162 of file fxforward.hpp.
Date maturityDate | ( | ) | const |
Definition at line 163 of file fxforward.hpp.
Date payDate | ( | ) | const |
Definition at line 164 of file fxforward.hpp.
Currency payCcy | ( | ) | const |
Definition at line 165 of file fxforward.hpp.
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndex | ( | ) | const |
Definition at line 166 of file fxforward.hpp.
bool payCurrency1 | ( | ) | const |
Definition at line 167 of file fxforward.hpp.
|
overrideprivate |
Definition at line 109 of file fxforward.cpp.
|
private |
Definition at line 176 of file fxforward.hpp.
|
private |
Definition at line 177 of file fxforward.hpp.
|
private |
Definition at line 178 of file fxforward.hpp.
|
private |
Definition at line 179 of file fxforward.hpp.
|
private |
Definition at line 180 of file fxforward.hpp.
|
private |
Definition at line 181 of file fxforward.hpp.
|
private |
Definition at line 182 of file fxforward.hpp.
|
private |
Definition at line 183 of file fxforward.hpp.
|
private |
Definition at line 184 of file fxforward.hpp.
|
private |
Definition at line 185 of file fxforward.hpp.
|
private |
Definition at line 186 of file fxforward.hpp.
|
private |
Definition at line 187 of file fxforward.hpp.
|
mutableprivate |
Definition at line 190 of file fxforward.hpp.
|
mutableprivate |
Definition at line 191 of file fxforward.hpp.