Class HullWhiteOneFactorPiecewiseConstantParametersProvider

  • All Implemented Interfaces:
    java.io.Serializable, Bean, ImmutableBean

    public final class HullWhiteOneFactorPiecewiseConstantParametersProvider
    extends java.lang.Object
    implements ImmutableBean, java.io.Serializable
    Hull-White one factor model with piecewise constant volatility.

    Reference: Henrard, M. "The Irony in the derivatives discounting Part II: the crisis", Wilmott Journal, 2010, 2, 301-316

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static HullWhiteOneFactorPiecewiseConstantParametersProvider of​(HullWhiteOneFactorPiecewiseConstantParameters parameters,
                                                                               DayCount dayCount,
                                                                               java.time.LocalDate valuationDate,
                                                                               java.time.LocalTime valuationTime,
                                                                               java.time.ZoneId valuationZone)
        Obtains an instance from Hull-White model parameters and the date, time and zone for which it is valid.
        Parameters:
        parameters - the Hull-White model parameters
        dayCount - the day count applicable to the model
        valuationDate - the valuation date
        valuationTime - the valuation time
        valuationZone - the valuation time zone
        Returns:
        the provider
      • futuresConvexityFactor

        public double futuresConvexityFactor​(java.time.LocalDate referenceDate,
                                             java.time.LocalDate startDate,
                                             java.time.LocalDate endDate)
        Calculates the future convexity factor for the specified period at the future reference date.
        Parameters:
        referenceDate - the reference date
        startDate - the start date of the period
        endDate - the end date of the period
        Returns:
        the convexity factor
      • futuresConvexityFactorAdjoint

        public ValueDerivatives futuresConvexityFactorAdjoint​(java.time.LocalDate referenceDate,
                                                              java.time.LocalDate startDate,
                                                              java.time.LocalDate endDate)
        Calculates the future convexity factor and its derivative for the specified period at the future reference date.
        Parameters:
        referenceDate - the reference date
        startDate - the start date of the period
        endDate - the end date of the period
        Returns:
        the convexity factor
      • relativeTime

        public double relativeTime​(java.time.LocalDate date)
        Converts a date to a relative year fraction.

        When the date is after the valuation date, the returned number is negative.

        Parameters:
        date - the date to find the relative year fraction of
        Returns:
        the relative year fraction
      • alpha

        public double alpha​(java.time.LocalDate startDate,
                            java.time.LocalDate endDate,
                            java.time.LocalDate numeraireDate,
                            java.time.LocalDate maturityDate)
        Calculates the alpha value for the specified period with respect to the maturity date.

        The alpha is computed with a bond numeraire of numeraireDate.

        Parameters:
        startDate - the start date of the period
        endDate - the end date of the period
        numeraireDate - the numeraire date
        maturityDate - the maturity date
        Returns:
        the alpha
      • alphaAdjoint

        public ValueDerivatives alphaAdjoint​(java.time.LocalDate startDate,
                                             java.time.LocalDate endDate,
                                             java.time.LocalDate numeraireDate,
                                             java.time.LocalDate maturityDate)
        Calculates the alpha and its derivative values for the specified period with respect to the maturity date.

        The alpha is computed with a bond numeraire of numeraireDate.

        Parameters:
        startDate - the start date of the period
        endDate - the end date of the period
        numeraireDate - the numeraire date
        maturityDate - the maturity date
        Returns:
        the alpha adjoint
      • getModel

        public com.opengamma.strata.pricer.impl.rate.model.HullWhiteOneFactorPiecewiseConstantInterestRateModel getModel()
        Returns a Hull-White one-factor model.
        Returns:
        the model
      • getDayCount

        public DayCount getDayCount()
        Gets the day count applicable to the model.
        Returns:
        the value of the property, not null
      • getValuationDateTime

        public java.time.ZonedDateTime getValuationDateTime()
        Gets the valuation date.

        The volatilities are calibrated for this date-time.

        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