Interface IborFutureOptionVolatilities
-
- All Superinterfaces:
MarketDataView,ParameterizedData
- All Known Subinterfaces:
NormalIborFutureOptionVolatilities
- All Known Implementing Classes:
NormalIborFutureOptionExpirySimpleMoneynessVolatilities
public interface IborFutureOptionVolatilities extends MarketDataView, ParameterizedData
Volatilities for pricing Ibor futures.This provides access to the volatilities for various pricing models, such as normal.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IborIndexgetIndex()Gets the index of the underlying future for which the data is valid.IborFutureOptionVolatilitiesNamegetName()Gets the name of these volatilities.default LocalDategetValuationDate()Gets the valuation date.ZonedDateTimegetValuationDateTime()Gets the valuation date-time.ValueTypegetVolatilityType()Gets the type of volatility returned by thevolatility(java.time.ZonedDateTime, java.time.LocalDate, double, double)method.CurrencyParameterSensitivitiesparameterSensitivity(PointSensitivities pointSensitivities)Calculates the parameter sensitivity.default CurrencyParameterSensitivitiesparameterSensitivity(PointSensitivity... pointSensitivities)Calculates the parameter sensitivity.doublerelativeTime(ZonedDateTime dateTime)Converts a time and date to a relative year fraction.doublevolatility(double expiry, LocalDate fixingDate, double strikePrice, double futurePrice)Calculates the volatility at the specified expiry.default doublevolatility(ZonedDateTime expiryDateTime, LocalDate fixingDate, double strikePrice, double futurePrice)Calculates the volatility at the specified expiry.IborFutureOptionVolatilitieswithParameter(int parameterIndex, double newValue)Returns a copy of the data with the value at the specified index altered.IborFutureOptionVolatilitieswithPerturbation(ParameterPerturbation perturbation)Returns a perturbed copy of the data.-
Methods inherited from interface com.opengamma.strata.market.MarketDataView
findData
-
Methods inherited from interface com.opengamma.strata.market.param.ParameterizedData
findParameterIndex, getParameter, getParameterCount, getParameterMetadata
-
-
-
-
Method Detail
-
getName
IborFutureOptionVolatilitiesName getName()
Gets the name of these volatilities.- Returns:
- the name
-
getIndex
IborIndex getIndex()
Gets the index of the underlying future for which the data is valid.- Returns:
- the index
-
getVolatilityType
ValueType getVolatilityType()
Gets the type of volatility returned by thevolatility(java.time.ZonedDateTime, java.time.LocalDate, double, double)method.- Returns:
- the type
-
getValuationDate
default LocalDate getValuationDate()
Gets the valuation date.The volatilities are calibrated for this date.
- Specified by:
getValuationDatein interfaceMarketDataView- Returns:
- the valuation date
-
getValuationDateTime
ZonedDateTime getValuationDateTime()
Gets the valuation date-time.The volatilities are calibrated for this date-time.
- Returns:
- the valuation date-time
-
withParameter
IborFutureOptionVolatilities withParameter(int parameterIndex, double newValue)
Description copied from interface:ParameterizedDataReturns a copy of the data with the value at the specified index altered.This instance is immutable and unaffected by this method call.
- Specified by:
withParameterin interfaceParameterizedData- Parameters:
parameterIndex- the zero-based index of the parameter to getnewValue- the new value for the specified parameter- Returns:
- a parameterized data instance based on this with the specified parameter altered
-
withPerturbation
IborFutureOptionVolatilities withPerturbation(ParameterPerturbation perturbation)
Description copied from interface:ParameterizedDataReturns a perturbed copy of the data.The perturbation instance will be invoked once for each parameter in this instance, returning the perturbed value for that parameter. The result of this method is a new instance that is based on those perturbed values.
This instance is immutable and unaffected by this method call.
- Specified by:
withPerturbationin interfaceParameterizedData- Parameters:
perturbation- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
volatility
default double volatility(ZonedDateTime expiryDateTime, LocalDate fixingDate, double strikePrice, double futurePrice)
Calculates the volatility at the specified expiry.- Parameters:
expiryDateTime- the option expiryfixingDate- the underlying future fixing datestrikePrice- the option strike pricefuturePrice- the price of the underlying future- Returns:
- the volatility
- Throws:
RuntimeException- if the value cannot be obtained
-
volatility
double volatility(double expiry, LocalDate fixingDate, double strikePrice, double futurePrice)Calculates the volatility at the specified expiry.This relies on expiry supplied by
relativeTime(ZonedDateTime).- Parameters:
expiry- the time to expiry as a year fractionfixingDate- the underlying future fixing datestrikePrice- the option strike pricefuturePrice- the price of the underlying future- Returns:
- the volatility
- Throws:
RuntimeException- if the value cannot be obtained
-
parameterSensitivity
default CurrencyParameterSensitivities parameterSensitivity(PointSensitivity... pointSensitivities)
Calculates the parameter sensitivity.This computes the
CurrencyParameterSensitivitiesassociated with thePointSensitivities. This corresponds to the projection of the point sensitivity to the internal parameters representation.- Parameters:
pointSensitivities- the point sensitivities- Returns:
- the sensitivity to the underlying parameters
-
parameterSensitivity
CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
Calculates the parameter sensitivity.This computes the
CurrencyParameterSensitivitiesassociated with thePointSensitivities. This corresponds to the projection of the point sensitivity to the internal parameters representation.- Parameters:
pointSensitivities- the point sensitivities- Returns:
- the sensitivity to the underlying parameters
-
relativeTime
double relativeTime(ZonedDateTime dateTime)
Converts a time and date to a relative year fraction.When the date is after the valuation date (and potentially time), the returned number is negative.
- Parameters:
dateTime- the date-time to find the relative year fraction of- Returns:
- the relative year fraction
-
-