An FX Swap is a financial instrument that represents the exchange of an equivalent amount in two different currencies between counterparties on two different dates.
For example, an FX swap might represent the payment of USD 1,000 and the receipt of EUR 932 on the near date, and the payment of EUR 941 and the receipt of USD 1,000 on the far date.
FxSwap can be created as follows:
FxSwap fx = FxSwap.ofForwardPoints(CurrencyAmount.of(Currency.USD, 1000), // amount EUR // other currency 0.932, // FX rate at near date 0.009, // forward points LocalDate.of(2015, 6, 15), // near date LocalDate.of(2015, 9, 15)); // far date
strata-measure module provides high-level risk measures for FX Swaps.
The main entry point is
The following measures are available:
- present value, and associated sensitivity
- par spread
- currency exposure
- current cash
These measures are also available using the calculation API.
strata-pricer module provides lower-level pricing support for FX Swaps:
The following table summarizes the fields on
FxSwap that can be used to control the product.
For more detail on the meaning of each field, see the
|nearLeg||The FxSingle near leg||Required|
|farLeg||The FxSingle far leg||Required|