Class CurveSensitivitiesBuilder

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

      • 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.

        type - the sensitivity type
        curveName - the curve name
        currency - the currency of the sensitivity
        metadata - the sensitivity metadata, not empty
        sensitivityValue - the sensitivity value
        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.

        the sensitivities instance