Class HullWhiteOneFactorPiecewiseConstantParametersProvider
- java.lang.Object
-
- com.opengamma.strata.pricer.model.HullWhiteOneFactorPiecewiseConstantParametersProvider
-
- All Implemented Interfaces:
Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class HullWhiteOneFactorPiecewiseConstantParametersProvider extends Object implements org.joda.beans.ImmutableBean, 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHullWhiteOneFactorPiecewiseConstantParametersProvider.MetaThe meta-bean forHullWhiteOneFactorPiecewiseConstantParametersProvider.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublealpha(LocalDate startDate, LocalDate endDate, LocalDate numeraireDate, LocalDate maturityDate)Calculates the alpha value for the specified period with respect to the maturity date.ValueDerivativesalphaAdjoint(LocalDate startDate, LocalDate endDate, LocalDate numeraireDate, LocalDate maturityDate)Calculates the alpha and its derivative values for the specified period with respect to the maturity date.booleanequals(Object obj)doublefuturesConvexityFactor(LocalDate referenceDate, LocalDate startDate, LocalDate endDate)Calculates the future convexity factor for the specified period at the future reference date.ValueDerivativesfuturesConvexityFactorAdjoint(LocalDate referenceDate, LocalDate startDate, LocalDate endDate)Calculates the future convexity factor and its derivative for the specified period at the future reference date.DayCountgetDayCount()Gets the day count applicable to the model.HullWhiteOneFactorPiecewiseConstantInterestRateModelgetModel()Returns a Hull-White one-factor model.HullWhiteOneFactorPiecewiseConstantParametersgetParameters()Gets the Hull-White model parameters.ZonedDateTimegetValuationDateTime()Gets the valuation date.inthashCode()static HullWhiteOneFactorPiecewiseConstantParametersProvider.Metameta()The meta-bean forHullWhiteOneFactorPiecewiseConstantParametersProvider.HullWhiteOneFactorPiecewiseConstantParametersProvider.MetametaBean()static HullWhiteOneFactorPiecewiseConstantParametersProviderof(HullWhiteOneFactorPiecewiseConstantParameters parameters, DayCount dayCount, LocalDate valuationDate, LocalTime valuationTime, ZoneId valuationZone)Obtains an instance from Hull-White model parameters and the date, time and zone for which it is valid.static HullWhiteOneFactorPiecewiseConstantParametersProviderof(HullWhiteOneFactorPiecewiseConstantParameters parameters, DayCount dayCount, ZonedDateTime valuationDateTime)Obtains an instance from Hull-White model parameters and the date-time for which it is valid.doublerelativeTime(LocalDate date)Converts a date to a relative year fraction.StringtoString()
-
-
-
Method Detail
-
of
public static HullWhiteOneFactorPiecewiseConstantParametersProvider of(HullWhiteOneFactorPiecewiseConstantParameters parameters, DayCount dayCount, ZonedDateTime valuationDateTime)
Obtains an instance from Hull-White model parameters and the date-time for which it is valid.- Parameters:
parameters- the Hull-White model parametersdayCount- the day count applicable to the modelvaluationDateTime- the valuation date-time- Returns:
- the provider
-
of
public static HullWhiteOneFactorPiecewiseConstantParametersProvider of(HullWhiteOneFactorPiecewiseConstantParameters parameters, DayCount dayCount, LocalDate valuationDate, LocalTime valuationTime, 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 parametersdayCount- the day count applicable to the modelvaluationDate- the valuation datevaluationTime- the valuation timevaluationZone- the valuation time zone- Returns:
- the provider
-
futuresConvexityFactor
public double futuresConvexityFactor(LocalDate referenceDate, LocalDate startDate, LocalDate endDate)
Calculates the future convexity factor for the specified period at the future reference date.- Parameters:
referenceDate- the reference datestartDate- the start date of the periodendDate- the end date of the period- Returns:
- the convexity factor
-
futuresConvexityFactorAdjoint
public ValueDerivatives futuresConvexityFactorAdjoint(LocalDate referenceDate, LocalDate startDate, LocalDate endDate)
Calculates the future convexity factor and its derivative for the specified period at the future reference date.- Parameters:
referenceDate- the reference datestartDate- the start date of the periodendDate- the end date of the period- Returns:
- the convexity factor
-
relativeTime
public double relativeTime(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(LocalDate startDate, LocalDate endDate, LocalDate numeraireDate, 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 periodendDate- the end date of the periodnumeraireDate- the numeraire datematurityDate- the maturity date- Returns:
- the alpha
-
alphaAdjoint
public ValueDerivatives alphaAdjoint(LocalDate startDate, LocalDate endDate, LocalDate numeraireDate, 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 periodendDate- the end date of the periodnumeraireDate- the numeraire datematurityDate- the maturity date- Returns:
- the alpha adjoint
-
getModel
public HullWhiteOneFactorPiecewiseConstantInterestRateModel getModel()
Returns a Hull-White one-factor model.- Returns:
- the model
-
meta
public static HullWhiteOneFactorPiecewiseConstantParametersProvider.Meta meta()
The meta-bean forHullWhiteOneFactorPiecewiseConstantParametersProvider.- Returns:
- the meta-bean, not null
-
metaBean
public HullWhiteOneFactorPiecewiseConstantParametersProvider.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getParameters
public HullWhiteOneFactorPiecewiseConstantParameters getParameters()
Gets the Hull-White model parameters.- Returns:
- the value of the property, not null
-
getDayCount
public DayCount getDayCount()
Gets the day count applicable to the model.- Returns:
- the value of the property, not null
-
getValuationDateTime
public ZonedDateTime getValuationDateTime()
Gets the valuation date.The volatilities are calibrated for this date-time.
- Returns:
- the value of the property, not null
-
-