Class IborCapFloorLeg
- java.lang.Object
-
- com.opengamma.strata.product.capfloor.IborCapFloorLeg
-
- All Implemented Interfaces:
Resolvable<ResolvedIborCapFloorLeg>
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborCapFloorLeg extends Object implements Resolvable<ResolvedIborCapFloorLeg>, org.joda.beans.ImmutableBean, Serializable
An Ibor cap/floor leg of a cap/floor product.This defines a single cap/floor leg for an Ibor cap/floor product. The cap/floor instruments are defined as a set of call/put options on successive Ibor index rates, known as Ibor caplets/floorlets.
The periodic payments in the resolved leg are caplets or floorlets depending on the data in this leg. The
capSchedule
field is used to represent strike values of individual caplets, whereasfloorSchedule
is used to represent strike values of individual floorlets. EithercapSchedule
orfloorSchedule
must be present, and not both.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborCapFloorLeg.Builder
The bean-builder forIborCapFloorLeg
.static class
IborCapFloorLeg.Meta
The meta-bean forIborCapFloorLeg
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IborCapFloorLeg.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
IborRateCalculation
getCalculation()
Gets the interest rate accrual calculation.Optional<ValueSchedule>
getCapSchedule()
Gets the cap schedule, optional.Currency
getCurrency()
Gets the currency of the leg associated with the notional.AdjustableDate
getEndDate()
Gets the accrual end date of the leg.Optional<ValueSchedule>
getFloorSchedule()
Gets the floor schedule, optional.IborIndex
getIndex()
Gets the Ibor index.ValueSchedule
getNotional()
Gets the notional amount, must be non-negative.DaysAdjustment
getPaymentDateOffset()
Gets the offset of payment from the base calculation period date, defaulted to 'None'.PeriodicSchedule
getPaymentSchedule()
Gets the periodic payment schedule.PayReceive
getPayReceive()
Gets whether the leg is pay or receive.AdjustableDate
getStartDate()
Gets the accrual start date of the leg.int
hashCode()
static IborCapFloorLeg.Meta
meta()
The meta-bean forIborCapFloorLeg
.IborCapFloorLeg.Meta
metaBean()
ResolvedIborCapFloorLeg
resolve(ReferenceData refData)
Resolves this object using the specified reference data.IborCapFloorLeg.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
getStartDate
public AdjustableDate getStartDate()
Gets the accrual start date of the leg.This is the first accrual date in the leg, often known as the effective date.
- Returns:
- the start date of the leg
-
getEndDate
public AdjustableDate getEndDate()
Gets the accrual end date of the leg.This is the last accrual date in the leg, often known as the termination date.
- Returns:
- the end date of the leg
-
getIndex
public IborIndex getIndex()
Gets the Ibor index.The rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
- Returns:
- the Ibor index
-
resolve
public ResolvedIborCapFloorLeg resolve(ReferenceData refData)
Description copied from interface:Resolvable
Resolves this object using the specified reference data.This converts the object implementing this interface to the equivalent resolved form. All
ReferenceDataId
identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.
- Specified by:
resolve
in interfaceResolvable<ResolvedIborCapFloorLeg>
- Parameters:
refData
- the reference data to use when resolving- Returns:
- the resolved instance
-
meta
public static IborCapFloorLeg.Meta meta()
The meta-bean forIborCapFloorLeg
.- Returns:
- the meta-bean, not null
-
builder
public static IborCapFloorLeg.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public IborCapFloorLeg.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getPayReceive
public PayReceive getPayReceive()
Gets whether the leg is pay or receive.A value of 'Pay' implies that the resulting amount is paid to the counterparty. A value of 'Receive' implies that the resulting amount is received from the counterparty.
- Returns:
- the value of the property, not null
-
getPaymentSchedule
public PeriodicSchedule getPaymentSchedule()
Gets the periodic payment schedule.This is used to define the periodic payment periods. These are used directly or indirectly to determine other dates in the leg.
- Returns:
- the value of the property, not null
-
getPaymentDateOffset
public DaysAdjustment getPaymentDateOffset()
Gets the offset of payment from the base calculation period date, defaulted to 'None'.The offset is applied to the adjusted end date of each payment period. Offset can be based on calendar days or business days.
- Returns:
- the value of the property, not null
-
getCurrency
public Currency getCurrency()
Gets the currency of the leg associated with the notional.This is the currency of the leg and the currency that payoff calculation is made in. The amounts of the notional are expressed in terms of this currency.
- Returns:
- the value of the property, not null
-
getNotional
public ValueSchedule getNotional()
Gets the notional amount, must be non-negative.The notional amount applicable during the period. The currency of the notional is specified by
currency
.- Returns:
- the value of the property, not null
-
getCalculation
public IborRateCalculation getCalculation()
Gets the interest rate accrual calculation.The interest rate accrual is based on Ibor index.
- Returns:
- the value of the property, not null
-
getCapSchedule
public Optional<ValueSchedule> getCapSchedule()
Gets the cap schedule, optional.This defines the strike value of a cap as an initial value and a list of adjustments. Thus individual caplets may have different strike values. The cap rate is only allowed to change at payment period boundaries.
If the product is not a cap, the cap schedule will be absent.
- Returns:
- the optional value of the property, not null
-
getFloorSchedule
public Optional<ValueSchedule> getFloorSchedule()
Gets the floor schedule, optional.This defines the strike value of a floor as an initial value and a list of adjustments. Thus individual floorlets may have different strike values. The floor rate is only allowed to change at payment period boundaries.
If the product is not a floor, the floor schedule will be absent.
- Returns:
- the optional value of the property, not null
-
toBuilder
public IborCapFloorLeg.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-