public final class FixedRateSwapLegConvention extends Object implements SwapLegConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a fixed leg in a specific currency.
Some fields are mandatory, others are optional, providing the ability to override
The getters will default any missing information on the fly, avoiding both null and Optional.
| Modifier and Type | Class and Description |
|---|---|
static class |
FixedRateSwapLegConvention.Builder
The bean-builder for
FixedRateSwapLegConvention. |
static class |
FixedRateSwapLegConvention.Meta
The meta-bean for
FixedRateSwapLegConvention. |
| Modifier and Type | Method and Description |
|---|---|
static FixedRateSwapLegConvention.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.
|
Frequency |
getAccrualFrequency()
Gets the periodic frequency of accrual.
|
FixedAccrualMethod |
getAccrualMethod()
Gets the accrual method using the fixed rate, defaulted to 'None'.
|
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.
|
DayCount |
getDayCount()
Gets the day count convention applicable.
|
BusinessDayAdjustment |
getEndDateBusinessDayAdjustment()
Gets the business day adjustment to apply to the end date,
providing a default result if no override specified.
|
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() |
static FixedRateSwapLegConvention.Meta |
meta()
The meta-bean for
FixedRateSwapLegConvention. |
FixedRateSwapLegConvention.Meta |
metaBean() |
static FixedRateSwapLegConvention |
of(Currency currency,
DayCount dayCount,
Frequency accrualFrequency,
BusinessDayAdjustment accrualBusinessDayAdjustment)
Obtains a convention based on the specified parameters.
|
FixedRateSwapLegConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
RateCalculationSwapLeg |
toLeg(LocalDate startDate,
LocalDate endDate,
PayReceive payReceive,
double notional,
double fixedRate)
Creates a leg based on this convention.
|
String |
toString() |
public static FixedRateSwapLegConvention of(Currency currency, DayCount dayCount, Frequency accrualFrequency, BusinessDayAdjustment accrualBusinessDayAdjustment)
The standard market convention for a fixed rate leg is based on these parameters, with the stub convention set to 'SmartInitial'. Use the builder for unusual conventions.
currency - the currency of the legdayCount - the day countaccrualFrequency - the accrual frequencyaccrualBusinessDayAdjustment - the accrual business day adjustmentpublic 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.
public 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.
public 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 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.
public CompoundingMethod getCompoundingMethod()
Compounding is used when combining accrual periods.
public RateCalculationSwapLeg toLeg(LocalDate startDate, LocalDate endDate, PayReceive payReceive, double notional, double fixedRate)
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 notionalfixedRate - the fixed rate, typically derived from the marketpublic static FixedRateSwapLegConvention.Meta meta()
FixedRateSwapLegConvention.public static FixedRateSwapLegConvention.Builder builder()
public FixedRateSwapLegConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic Currency getCurrency()
This is the currency of the swap leg and the currency that payment is made in.
public DayCount getDayCount()
This is used to convert schedule period dates to a numerical value.
public Frequency getAccrualFrequency()
Interest will be accrued over periods at the specified periodic frequency, such as every 3 months.
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 may have their own business day adjustment rules. If those are not present, then this adjustment is used instead.
public FixedAccrualMethod getAccrualMethod()
This is normally 'None', but can be set forBrazilian swaps.
public FixedRateSwapLegConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.