Interface RecoveryRates
-
- All Superinterfaces:
MarketDataView
,ParameterizedData
- All Known Implementing Classes:
ConstantRecoveryRates
public interface RecoveryRates extends MarketDataView, ParameterizedData
Recovery rates.This represents the recovery rates of a legal entity.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description StandardId
getLegalEntityId()
Gets the standard identifier of a legal entity.LocalDate
getValuationDate()
Gets the valuation date.static RecoveryRates
of(StandardId legalEntityId, LocalDate valuationDate, Curve curve)
Obtains an instance from a curve.double
recoveryRate(LocalDate date)
Gets the recovery rate for the specified date.RecoveryRates
withParameter(int parameterIndex, double newValue)
Returns a copy of the data with the value at the specified index altered.RecoveryRates
withPerturbation(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
-
of
static RecoveryRates of(StandardId legalEntityId, LocalDate valuationDate, Curve curve)
Obtains an instance from a curve.If the curve is
ConstantCurve
,ConstantRecoveryRates
is always instantiated.- Parameters:
legalEntityId
- the legal entity identifiervaluationDate
- the valuation date for which the curve is validcurve
- the underlying curve- Returns:
- the instance
-
getValuationDate
LocalDate getValuationDate()
Gets the valuation date.- Specified by:
getValuationDate
in interfaceMarketDataView
- Returns:
- the valuation date
-
getLegalEntityId
StandardId getLegalEntityId()
Gets the standard identifier of a legal entity.- Returns:
- the legal entity ID
-
recoveryRate
double recoveryRate(LocalDate date)
Gets the recovery rate for the specified date.- Parameters:
date
- the date- Returns:
- the recovery rate
-
withParameter
RecoveryRates withParameter(int parameterIndex, double newValue)
Description copied from interface:ParameterizedData
Returns 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:
withParameter
in 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
RecoveryRates withPerturbation(ParameterPerturbation perturbation)
Description copied from interface:ParameterizedData
Returns 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:
withPerturbation
in interfaceParameterizedData
- Parameters:
perturbation
- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
-