Class FxRateShifts

    • Method Detail

      • of

        public static FxRateShifts of​(ShiftType shiftType,
                                      DoubleArray shiftAmount,
                                      CurrencyPair currencyPair)
        Creates an instance.
        Parameters:
        shiftType - the shift type
        shiftAmount - the shift amount
        currencyPair - the currency pair
        Returns:
        the instance
      • applyTo

        public MarketDataBox<FxRate> applyTo​(MarketDataBox<FxRate> marketData,
                                             ReferenceData refData)
        Description copied from interface: ScenarioPerturbation
        Applies this perturbation to the market data in a box, returning a box containing new, modified data.

        The original market data must not be altered. Instead a perturbed copy must be returned.

        Specified by:
        applyTo in interface ScenarioPerturbation<FxRate>
        Parameters:
        marketData - the market data to perturb
        refData - the reference data
        Returns:
        new market data derived by applying the perturbation to the input data
      • getScenarioCount

        public int getScenarioCount()
        Description copied from interface: ScenarioPerturbation
        Returns the number of scenarios for which this perturbation generates data.
        Specified by:
        getScenarioCount in interface ScenarioPerturbation<FxRate>
        Returns:
        the number of scenarios for which this perturbation generates data
      • meta

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

        public ShiftType getShiftType()
        Gets the type of shift applied to the FX rate.
        Returns:
        the value of the property, not null
      • getShiftAmount

        public DoubleArray getShiftAmount()
        Gets the shifts to apply to FxRate.

        Each element in the array corresponds to each scenario.

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

        public CurrencyPair getCurrencyPair()
        Gets the currency pair for which the shifts are applied.

        This also defines the direction of the FX rate to be shifted.

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object