Class IborCapFloor
- java.lang.Object
-
- com.opengamma.strata.product.capfloor.IborCapFloor
-
- All Implemented Interfaces:
Resolvable<ResolvedIborCapFloor>
,Product
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborCapFloor extends Object implements Product, Resolvable<ResolvedIborCapFloor>, org.joda.beans.ImmutableBean, Serializable
An Ibor cap/floor product.The Ibor cap/floor product consists of two legs, a cap/floor leg and a pay leg. The cap/floor leg involves a set of call/put options on successive Ibor index rates, known as Ibor caplets/floorlets. The pay leg is any swap leg from a standard interest rate swap. The pay leg is absent for typical Ibor cap/floor products, with the premium paid upfront instead, as defined in
IborCapFloorTrade
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborCapFloor.Meta
The meta-bean forIborCapFloor
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableSet<Currency>
allCurrencies()
Returns the set of currencies the product refers to.ImmutableSet<Index>
allIndices()
Returns the set of indices referred to by the cap/floor.ImmutableSet<Currency>
allPaymentCurrencies()
Returns the set of currencies that the product pays in.boolean
equals(Object obj)
IborCapFloorLeg
getCapFloorLeg()
Gets the Ibor cap/floor leg of the product.Optional<SwapLeg>
getPayLeg()
Gets the optional pay leg of the product.int
hashCode()
static IborCapFloor.Meta
meta()
The meta-bean forIborCapFloor
.IborCapFloor.Meta
metaBean()
static IborCapFloor
of(IborCapFloorLeg capFloorLeg)
Obtains an instance from a cap/floor leg with no pay leg.static IborCapFloor
of(IborCapFloorLeg capFloorLeg, SwapLeg payLeg)
Obtains an instance from a cap/floor leg and a pay leg.ResolvedIborCapFloor
resolve(ReferenceData refData)
Resolves this object using the specified reference data.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Product
isCrossCurrency
-
-
-
-
Method Detail
-
of
public static IborCapFloor of(IborCapFloorLeg capFloorLeg)
Obtains an instance from a cap/floor leg with no pay leg.The pay leg is absent in the resulting cap/floor.
- Parameters:
capFloorLeg
- the cap/floor leg- Returns:
- the cap/floor
-
of
public static IborCapFloor of(IborCapFloorLeg capFloorLeg, SwapLeg payLeg)
Obtains an instance from a cap/floor leg and a pay leg.- Parameters:
capFloorLeg
- the cap/floor legpayLeg
- the pay leg- Returns:
- the cap/floor
-
allPaymentCurrencies
public ImmutableSet<Currency> allPaymentCurrencies()
Description copied from interface:Product
Returns the set of currencies that the product pays in.This returns the complete set of payment currencies. This will typically return one or two currencies.
- Specified by:
allPaymentCurrencies
in interfaceProduct
- Returns:
- the set of payment currencies
-
allCurrencies
public ImmutableSet<Currency> allCurrencies()
Description copied from interface:Product
Returns the set of currencies the product refers to.This returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.
- Specified by:
allCurrencies
in interfaceProduct
- Returns:
- the set of currencies the product refers to
-
allIndices
public ImmutableSet<Index> allIndices()
Returns the set of indices referred to by the cap/floor.A cap/floor will typically refer to one index, such as 'GBP-LIBOR-3M'. Calling this method will return the complete list of indices.
- Returns:
- the set of indices referred to by this cap/floor
-
resolve
public ResolvedIborCapFloor 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<ResolvedIborCapFloor>
- Parameters:
refData
- the reference data to use when resolving- Returns:
- the resolved instance
-
meta
public static IborCapFloor.Meta meta()
The meta-bean forIborCapFloor
.- Returns:
- the meta-bean, not null
-
metaBean
public IborCapFloor.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getCapFloorLeg
public IborCapFloorLeg getCapFloorLeg()
Gets the Ibor cap/floor leg of the product.This is associated with periodic payments based on Ibor rate. The payments are Ibor caplets or Ibor floorlets.
- Returns:
- the value of the property, not null
-
getPayLeg
public Optional<SwapLeg> getPayLeg()
Gets the optional pay leg of the product.These periodic payments are not made for typical cap/floor products. Instead the premium is paid upfront.
- Returns:
- the optional value of the property, not null
-
-