Class CurveSensitivitiesBuilder


  • public final class CurveSensitivitiesBuilder
    extends Object
    Builder for CurveSensitivities.
    • Method Detail

      • add

        public CurveSensitivitiesBuilder add​(CurveSensitivities other)
        Adds another set of sensitivities to the builder.

        Values with the same market data name and currency will be merged.

        Parameters:
        other - the other sensitivities
        Returns:
        this, for chaining
      • add

        public CurveSensitivitiesBuilder add​(CurveSensitivitiesType type,
                                             CurveName curveName,
                                             Currency currency,
                                             ParameterMetadata metadata,
                                             double sensitivityValue)
        Adds a single sensitivity to the builder.

        Values with the same market data name and currency will be merged.

        Parameters:
        type - the sensitivity type
        curveName - the curve name
        currency - the currency of the sensitivity
        metadata - the sensitivity metadata, not empty
        sensitivityValue - the sensitivity value
        Returns:
        this, for chaining
      • build

        public CurveSensitivities build()
        Builds the sensitivity from the provided data.

        If all the values for a single sensitivity are tenor-based, or all are date-based, then the resulting sensitivity will have the tenors sorted.

        Returns:
        the sensitivities instance