public final class ImmutableIborFixingDepositConvention extends Object implements IborFixingDepositConvention, org.joda.beans.ImmutableBean, Serializable
This defines the convention for an Ibor fixing deposit against a particular index.
In most cases, the index contains sufficient information to fully define the convention.
As such, no other fields need to be specified when creating an instance.
The name of the convention is the same as the name of the index by default.
The getters will default any missing information on the fly, avoiding both null and Optional.
The convention is defined by four dates.
IborFixingDepositTemplate,
not by this convention. However, the period is typically equal to the tenor of the index.| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableIborFixingDepositConvention.Builder
The bean-builder for
ImmutableIborFixingDepositConvention. |
static class |
ImmutableIborFixingDepositConvention.Meta
The meta-bean for
ImmutableIborFixingDepositConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableIborFixingDepositConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
IborFixingDepositTrade |
createTrade(LocalDate tradeDate,
Period depositPeriod,
BuySell buySell,
double notional,
double fixedRate,
ReferenceData refData)
Creates a trade based on this convention.
|
boolean |
equals(Object obj) |
BusinessDayAdjustment |
getBusinessDayAdjustment()
Gets the business day adjustment to apply to the start and end date,
providing a default result if no override specified.
|
Currency |
getCurrency()
Gets the primary currency,
providing a default result if no override specified.
|
DayCount |
getDayCount()
Gets the day count convention applicable,
providing a default result if no override specified.
|
DaysAdjustment |
getFixingDateOffset()
Gets the offset of the fixing date from the start date,
providing a default result if no override specified.
|
IborIndex |
getIndex()
Gets the Ibor index.
|
String |
getName()
Gets the convention name, such as 'GBP-LIBOR-3M'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date,
providing a default result if no override specified.
|
int |
hashCode() |
static ImmutableIborFixingDepositConvention.Meta |
meta()
The meta-bean for
ImmutableIborFixingDepositConvention. |
ImmutableIborFixingDepositConvention.Meta |
metaBean() |
static ImmutableIborFixingDepositConvention |
of(IborIndex index)
Obtains a convention based on the specified index.
|
ImmutableIborFixingDepositConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
IborFixingDepositTrade |
toTrade(TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notional,
double fixedRate)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcalculateSpotDateFromTradeDate, extendedEnum, of, toTradepublic static ImmutableIborFixingDepositConvention of(IborIndex index)
The standard convention for an Ibor fixing deposit is based exclusively on the index.
This creates an instance that contains the index.
The instance is not dereferenced using the FraConvention name, as such
the result of this method and IborFixingDepositConvention.of(IborIndex) can differ.
Use the builder for unusual conventions.
of in interface IborFixingDepositConventionindex - the index, the convention values are extracted from the indexpublic String getName()
This will default to the name of the index if not specified.
getName in interface NamedgetName in interface IborFixingDepositConventionpublic Currency getCurrency()
This is the currency of the Ibor fixing deposit and the currency that payment is made in. The data model permits this currency to differ from that of the index, however the two are typically the same.
This will default to the currency of the index if not specified.
public DayCount getDayCount()
This is used to convert dates to a numerical value. The data model permits the day count to differ from that of the index, however the two are typically the same.
This will default to the day count of the index if not specified.
public DaysAdjustment getSpotDateOffset()
The offset is applied to the trade date and is typically plus 2 business days. The start and end date of the term are relative to the spot date.
This will default to the effective date offset of the index if not specified.
getSpotDateOffset in interface IborFixingDepositConventionpublic BusinessDayAdjustment getBusinessDayAdjustment()
The start and end date are typically defined as valid business days and thus do not need to be adjusted. If this optional property is present, then the start and end date will be adjusted as defined here.
This will default to 'ModifiedFollowing' using the index fixing calendar if not specified.
public DaysAdjustment getFixingDateOffset()
The offset is applied to the start date and is typically minus 2 business days. The data model permits the offset to differ from that of the index, however the two are typically the same.
This will default to the fixing date offset of the index if not specified.
public IborFixingDepositTrade createTrade(LocalDate tradeDate, Period depositPeriod, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
IborFixingDepositConventionThis returns a trade based on the specified deposit period.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the Ibor fixing deposit, the floating rate is paid to the counterparty, with the fixed rate being received. If selling the Ibor fixing deposit, the floating rate is received from the counterparty, with the fixed rate being paid.
createTrade in interface IborFixingDepositConventiontradeDate - the date of the tradedepositPeriod - the period between the start date and the end datebuySell - the buy/sell flagnotional - the notional amount, in the payment currency of the templatefixedRate - the fixed rate, typically derived from the marketrefData - the reference data, used to resolve the trade datespublic IborFixingDepositTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
IborFixingDepositConventionThis returns a trade based on the specified dates. The notional is unsigned, with buy/sell determining the direction of the trade. If buying the Ibor fixing deposit, the floating rate is paid to the counterparty, with the fixed rate being received. If selling the Ibor fixing deposit, the floating rate is received from the counterparty, with the fixed rate being paid.
toTrade in interface IborFixingDepositConventiontradeInfo - additional information about the tradestartDate - the start dateendDate - the end datebuySell - the buy/sell flagnotional - the notional amount, in the payment currency of the templatefixedRate - the fixed rate, typically derived from the marketpublic static ImmutableIborFixingDepositConvention.Meta meta()
ImmutableIborFixingDepositConvention.public static ImmutableIborFixingDepositConvention.Builder builder()
public ImmutableIborFixingDepositConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic IborIndex getIndex()
The floating rate to be paid or received is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
getIndex in interface IborFixingDepositConventionpublic ImmutableIborFixingDepositConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.