Class FxNdf

  • All Implemented Interfaces:
    Resolvable<ResolvedFxNdf>, FxProduct, Product, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class FxNdf
    extends Object
    implements FxProduct, Resolvable<ResolvedFxNdf>, org.joda.beans.ImmutableBean, Serializable
    A Non-Deliverable Forward (NDF).

    An NDF is a financial instrument that returns the difference between a fixed FX rate agreed at the inception of the trade and the FX rate at maturity. It is primarily used to handle FX requirements for currencies that have settlement restrictions. For example, the forward may be between USD and CNY (Chinese Yuan).

    See Also:
    Serialized Form
    • Method Detail

      • getCurrencyPair

        public CurrencyPair getCurrencyPair()
        Description copied from interface: FxProduct
        Gets the currency pair that the FX trade is based on, in conventional order.

        This represents the main currency pair of the FX. If the trade settles in a third currency, that is not recorded here.

        Specified by:
        getCurrencyPair in interface FxProduct
        Returns:
        the currency pair
      • allPaymentCurrencies

        public ImmutableSet<Currency> allPaymentCurrencies()
        Description copied from interface: Product
        Returns the set of currencies that the product pays in.

        This returns the complete set of payment currencies. This will typically return one or two currencies.

        Specified by:
        allPaymentCurrencies in interface Product
        Returns:
        the set of payment currencies
      • getSettlementCurrency

        public Currency getSettlementCurrency()
        Gets the settlement currency.
        Returns:
        the currency that is to be settled
      • getNonDeliverableCurrency

        public Currency getNonDeliverableCurrency()
        Gets the non-deliverable currency.

        Returns the currency that is not the settlement currency.

        Returns:
        the currency that is not to be settled
      • resolve

        public ResolvedFxNdf resolve​(ReferenceData refData)
        Description copied from interface: Resolvable
        Resolves this object using the specified reference data.

        This converts the object implementing this interface to the equivalent resolved form. All ReferenceDataId identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.

        Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.

        Specified by:
        resolve in interface Resolvable<ResolvedFxNdf>
        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved instance
      • meta

        public static FxNdf.Meta meta()
        The meta-bean for FxNdf.
        Returns:
        the meta-bean, not null
      • builder

        public static FxNdf.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public FxNdf.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getSettlementCurrencyNotional

        public CurrencyAmount getSettlementCurrencyNotional()
        Gets the notional amount in the settlement currency, positive if receiving, negative if paying.

        The amount is signed. A positive amount indicates the payment is to be received. A negative amount indicates the payment is to be paid.

        This must be specified in one of the two currencies of the forward.

        Returns:
        the value of the property, not null
      • getAgreedFxRate

        public FxRate getAgreedFxRate()
        Gets the FX rate agreed for the value date at the inception of the trade.

        The settlement amount is based on the difference between this rate and the rate observed on the fixing date using the index.

        The forward is between the two currencies defined by the rate.

        Returns:
        the value of the property, not null
      • getIndex

        public FxIndex getIndex()
        Gets the index defining the FX rate to observe on the fixing date.

        The index is used to settle the trade by providing the actual FX rate on the fixing date. The value of the trade is based on the difference between the actual rate and the agreed rate.

        The forward is between the two currencies defined by the index.

        Returns:
        the value of the property, not null
      • getPaymentDate

        public LocalDate getPaymentDate()
        Gets the date that the forward settles.

        On this date, the settlement amount will be exchanged. This date should be a valid business day.

        Returns:
        the value of the property, not null
      • toBuilder

        public FxNdf.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object