Class PointShifts

  • All Implemented Interfaces:
    ScenarioPerturbation<ParameterizedData>, java.io.Serializable, Bean, ImmutableBean

    public final class PointShifts
    extends java.lang.Object
    implements ScenarioPerturbation<ParameterizedData>, ImmutableBean, java.io.Serializable
    A perturbation that applies different shifts to specific points in a parameterized data.

    Examples of parameterized data include curve, option volatilities and model parameters.

    This class contains a set of shifts, each one associated with a different parameter in the data. Each shift has an associated key that is matched against the parameterized data. In order for this to work the parameterized data must have matching and unique parameter metadata.

    When matching the shift to the parameterized data, either the identifier or label parameter may be used. A shift is not applied if there is no point on the parameterized data with a matching identifier.

    See Also:
    ParameterMetadata.getIdentifier(), Serialized Form
    • Method Detail

      • builder

        public static PointShiftsBuilder builder​(ShiftType shiftType)
        Returns a new mutable builder for building instances of ParameterizedDataPointShifts.
        Parameters:
        shiftType - the type of shift to apply to the rates
        Returns:
        a new mutable builder for building instances of ParameterizedDataPointShifts
      • meta

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

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

        public DoubleMatrix getShifts()
        Gets the shift to apply to the rates.

        There is one row in the matrix for each scenario and one column for each parameter in the data. Node indices are found using nodeIndices.

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

        public com.google.common.collect.ImmutableMap<java.lang.Object,​java.lang.Integer> getNodeIndices()
        Gets indices of each parameter, keyed by an object identifying the node.

        The key is typically the node identifier. The key may also be the node label.

        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