Class PointShifts

  • All Implemented Interfaces:
    ScenarioPerturbation<ParameterizedData>, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class PointShifts
    extends Object
    implements ScenarioPerturbation<ParameterizedData>, org.joda.beans.ImmutableBean, 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
      • metaBean

        public PointShifts.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • 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 ImmutableMap<Object,​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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object