public final class IborRateSwapLegConvention extends Object implements FloatRateSwapLegConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a floating leg based on the observed value
of an Ibor index such as 'GBP-LIBOR-3M' or 'EUR-EURIBOR-1M'.
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 getters will default any missing information on the fly, avoiding both null and Optional.
| Modifier and Type | Class and Description |
|---|---|
static class |
IborRateSwapLegConvention.Builder
The bean-builder for
IborRateSwapLegConvention. |
static class |
IborRateSwapLegConvention.Meta
The meta-bean for
IborRateSwapLegConvention. |
| Modifier and Type | Method and Description |
|---|---|
static IborRateSwapLegConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
BusinessDayAdjustment |
getAccrualBusinessDayAdjustment()
Gets the business day adjustment to apply to accrual schedule dates,
providing a default result if no override specified.
|
Frequency |
getAccrualFrequency()
Gets the periodic frequency of accrual.
|
CompoundingMethod |
getCompoundingMethod()
Gets the compounding method to use when there is more than one accrual period
in each payment period, providing a default result if no override specified.
|
Currency |
getCurrency()
Gets the leg currency, optional with defaulting getter.
|
DayCount |
getDayCount()
Gets the day count convention applicable,
providing a default result if no override specified.
|
BusinessDayAdjustment |
getEndDateBusinessDayAdjustment()
Gets the business day adjustment to apply to the end date,
providing a default result if no override specified.
|
DaysAdjustment |
getFixingDateOffset()
The offset of the fixing date from each adjusted reset date,
providing a default result if no override specified.
|
FixingRelativeTo |
getFixingRelativeTo()
Gets the base date that each fixing is made relative to, optional with defaulting getter.
|
IborIndex |
getIndex()
Gets the Ibor index.
|
DaysAdjustment |
getPaymentDateOffset()
Gets the offset of payment from the base date,
providing a default result if no override specified.
|
Frequency |
getPaymentFrequency()
Gets the periodic frequency of payments,
providing a default result if no override specified.
|
RollConvention |
getRollConvention()
Gets the convention defining how to roll dates,
providing a default result if no override specified.
|
BusinessDayAdjustment |
getStartDateBusinessDayAdjustment()
Gets the business day adjustment to apply to the start date,
providing a default result if no override specified.
|
StubConvention |
getStubConvention()
Gets the convention defining how to handle stubs,
providing a default result if no override specified.
|
int |
hashCode() |
boolean |
isNotionalExchange()
Gets the flag indicating whether to exchange the notional.
|
static IborRateSwapLegConvention.Meta |
meta()
The meta-bean for
IborRateSwapLegConvention. |
IborRateSwapLegConvention.Meta |
metaBean() |
static IborRateSwapLegConvention |
of(IborIndex index)
Obtains a convention based on the specified index.
|
IborRateSwapLegConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
RateCalculationSwapLeg |
toLeg(LocalDate startDate,
LocalDate endDate,
PayReceive payReceive,
double notional)
Creates a leg based on this convention.
|
RateCalculationSwapLeg |
toLeg(LocalDate startDate,
LocalDate endDate,
PayReceive payReceive,
double notional,
double spread)
Creates a leg based on this convention.
|
String |
toString() |
public static IborRateSwapLegConvention of(IborIndex index)
The standard market convention for an Ibor rate leg is based on the index, with the stub convention set to 'SmartInitial'. Use the builder for unusual conventions.
index - the index, the market convention values are extracted from the indexpublic Currency getCurrency()
This is the currency of the swap leg 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.
getCurrency in interface FloatRateSwapLegConventionpublic 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.
getDayCount in interface FloatRateSwapLegConventionpublic Frequency getAccrualFrequency()
Interest will be accrued over periods at the specified periodic frequency, such as every 3 months.
This will default to the tenor of the index if not specified.
public BusinessDayAdjustment getAccrualBusinessDayAdjustment()
Each date in the calculated schedule is determined without taking into account weekends and holidays. The adjustment specified here is used to convert those dates to valid business days. The start date and end date have their own business day adjustment rules.
This will default to 'ModifiedFollowing' using the index fixing calendar if not specified.
getAccrualBusinessDayAdjustment in interface FloatRateSwapLegConventionpublic BusinessDayAdjustment getStartDateBusinessDayAdjustment()
The start date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the start date to a valid business day.
This will default to the accrualDatesBusinessDayAdjustment if not specified.
getStartDateBusinessDayAdjustment in interface FloatRateSwapLegConventionpublic BusinessDayAdjustment getEndDateBusinessDayAdjustment()
The end date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the end date to a valid business day.
This will default to the accrualDatesBusinessDayAdjustment if not specified.
getEndDateBusinessDayAdjustment in interface FloatRateSwapLegConventionpublic StubConvention getStubConvention()
The stub convention is used during schedule construction to determine whether the irregular remaining period occurs at the start or end of the schedule. It also determines whether the irregular period is shorter or longer than the regular period.
This will default to 'SmartInitial' if not specified.
public RollConvention getRollConvention()
The schedule periods are determined at the high level by repeatedly adding the frequency to the start date, or subtracting it from the end date. The roll convention provides the detailed rule to adjust the day-of-month or day-of-week.
This will default to 'EOM' if not specified.
public FixingRelativeTo getFixingRelativeTo()
The fixing date is relative to either the start or end of each reset period.
Note that in most cases, the reset frequency matches the accrual frequency and thus there is only one fixing for the accrual period.
This will default to 'PeriodStart' if not specified.
public DaysAdjustment getFixingDateOffset()
The offset is applied to the base date specified by fixingRelativeTo.
The offset is typically a negative number of 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 Frequency getPaymentFrequency()
Regular payments will be made at the specified periodic frequency. The frequency must be the same as, or a multiple of, the accrual periodic frequency.
Compounding applies if the payment frequency does not equal the accrual frequency.
This will default to the accrual frequency if not specified.
public DaysAdjustment getPaymentDateOffset()
The offset is applied to the unadjusted date specified by paymentRelativeTo.
Offset can be based on calendar days or business days.
getPaymentDateOffset in interface FloatRateSwapLegConventionpublic CompoundingMethod getCompoundingMethod()
Compounding is used when combining accrual periods.
public RateCalculationSwapLeg toLeg(LocalDate startDate, LocalDate endDate, PayReceive payReceive, double notional)
This returns a leg based on the specified date. The notional is unsigned, with pay/receive determining the direction of the leg. If the leg is 'Pay', the fixed rate is paid to the counterparty. If the leg is 'Receive', the fixed rate is received from the counterparty.
startDate - the start dateendDate - the end datepayReceive - determines if the leg is to be paid or receivednotional - the notionalpublic RateCalculationSwapLeg toLeg(LocalDate startDate, LocalDate endDate, PayReceive payReceive, double notional, double spread)
This returns a leg based on the specified date. The notional is unsigned, with pay/receive determining the direction of the leg. If the leg is 'Pay', the fixed rate is paid to the counterparty. If the leg is 'Receive', the fixed rate is received from the counterparty.
startDate - the start dateendDate - the end datepayReceive - determines if the leg is to be paid or receivednotional - the notionalspread - the spread to applypublic static IborRateSwapLegConvention.Meta meta()
IborRateSwapLegConvention.public static IborRateSwapLegConvention.Builder builder()
public IborRateSwapLegConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic IborIndex getIndex()
The floating rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
getIndex in interface FloatRateSwapLegConventionpublic boolean isNotionalExchange()
If 'true', the notional there is both an initial exchange and a final exchange of notional.
This will default to 'false' if not specified.
public IborRateSwapLegConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.