Class VolatilityIborCapletFloorletPeriodPricer

    • Constructor Detail

      • VolatilityIborCapletFloorletPeriodPricer

        public VolatilityIborCapletFloorletPeriodPricer()
    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(IborCapletFloorletPeriod period,
                                           RatesProvider ratesProvider,
                                           IborCapletFloorletVolatilities volatilities)
        Calculates the present value of the Ibor caplet/floorlet period.

        The result is expressed using the currency of the period.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the present value
      • impliedVolatility

        public double impliedVolatility​(IborCapletFloorletPeriod period,
                                        RatesProvider ratesProvider,
                                        IborCapletFloorletVolatilities volatilities)
        Computes the implied volatility of the Ibor caplet/floorlet.
        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the implied volatility
      • forwardRate

        public double forwardRate​(IborCapletFloorletPeriod period,
                                  RatesProvider ratesProvider)
        Computes the forward rate for the Ibor caplet/floorlet.
        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        Returns:
        the forward rate
      • presentValueDelta

        public CurrencyAmount presentValueDelta​(IborCapletFloorletPeriod period,
                                                RatesProvider ratesProvider,
                                                IborCapletFloorletVolatilities volatilities)
        Calculates the present value delta of the Ibor caplet/floorlet period.

        The present value delta is given by the first derivative of the present value with respect to forward.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the present value delta
      • presentValueGamma

        public CurrencyAmount presentValueGamma​(IborCapletFloorletPeriod period,
                                                RatesProvider ratesProvider,
                                                IborCapletFloorletVolatilities volatilities)
        Calculates the present value gamma of the Ibor caplet/floorlet period.

        The present value gamma is given by the second derivative of the present value with respect to forward.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the present value gamma
      • presentValueTheta

        public CurrencyAmount presentValueTheta​(IborCapletFloorletPeriod period,
                                                RatesProvider ratesProvider,
                                                IborCapletFloorletVolatilities volatilities)
        Calculates the present value theta of the Ibor caplet/floorlet period.

        The present value theta is given by the minus of the present value sensitivity to the timeToExpiry parameter of the model.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the present value theta
      • presentValueSensitivityRates

        public PointSensitivityBuilder presentValueSensitivityRates​(IborCapletFloorletPeriod period,
                                                                    RatesProvider ratesProvider,
                                                                    IborCapletFloorletVolatilities volatilities)
        Calculates the present value rates sensitivity of the Ibor caplet/floorlet.

        The present value rates sensitivity of the caplet/floorlet is the sensitivity of the present value to the underlying curves.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the present value curve sensitivity
      • presentValueSensitivityModelParamsVolatility

        public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility​(IborCapletFloorletPeriod period,
                                                                                    RatesProvider ratesProvider,
                                                                                    IborCapletFloorletVolatilities volatilities)
        Calculates the present value volatility sensitivity of the Ibor caplet/floorlet.

        The present value volatility sensitivity of the caplet/floorlet is the sensitivity of the present value to the implied volatility.

        The sensitivity to the implied volatility is also called vega.

        Parameters:
        period - the Ibor caplet/floorlet period
        ratesProvider - the rates provider
        volatilities - the volatilities
        Returns:
        the point sensitivity to the volatility
      • validate

        protected void validate​(IborCapletFloorletVolatilities volatilities)
        Validate the volatilities provider.

        This validate method should be overridden such that a correct implementation of IborCapletFloorletVolatilities is used for pricing.

        Parameters:
        volatilities - the volatilities