ImmutableList<E> targets
ImmutableMap<K,V> values
CurrencyAmount value
The amount is signed. A negative value indicates the amount is to be paid while a positive value indicates the amount is received.
AdjustableDate date
This date should normally be a valid business day.
Currency currency
For example, in the value 'GBP 12.34' the currency is 'GBP'.
double amount
For example, in the value 'GBP 12.34' the amount is 12.34.
Currency currency
DoubleArray values
ImmutableMap<K,V> currencies
rates array. Generally the position reflects the order
in which the currencies were added, so the first currency added
will be assigned 0, the second 1 etc.
An ImmutableMap is used so that the currencies are correctly
ordered when the FxMatrix.toString() method is called.
DoubleMatrix rates
If currencies c1 and c2 are assigned indexes i and j respectively
in the currencies map, then the entry [i][j] is such that
1 unit of currency c1 is worth rates[i][j] units of
currency c2.
If currencies.get(EUR) = 0 and currencies.get(USD) = 1,
then the element rates[0][1] is likely to be around
1.40 and rates[1][0] around 0.7142. The rate rates[1][0]
will be computed from fxRate[0][1] when the object is constructed
by the builder. All the element of the matrix are meaningful and coherent.
CurrencyPair pair
double rate
ImmutableSortedSet<E> amounts
private Object readResolve()
int size
ImmutableSortedMap<K,V> values
CurrencyAmount value
The amount is signed. A negative value indicates the amount is to be paid while a positive value indicates the amount is received.
LocalDate date
This date should normally be a valid business day.
LocalDate unadjusted
This date may be a non-business day. The business day adjustment is used to ensure it is a valid business day.
BusinessDayAdjustment adjustment
This is used to adjust the date if it is not a business day.
ImmutableList<E> unadjusted
These dates may be non-business days. The business day adjustment is used to ensure each date is a valid business day.
BusinessDayAdjustment adjustment
This is used to adjust each date if it is not a business day.
BusinessDayConvention convention
The convention determines whether to move forwards or backwards when it is a holiday.
HolidayCalendarId calendar
When the adjustment is made, this calendar is used to skip holidays.
int days
When the adjustment is performed, this amount will be added to the input date using the calendar to determine the addition type.
HolidayCalendarId calendar
When the adjustment is performed, this calendar is used to determine which days are business days.
If the holiday calendar is 'None' then addition uses simple date addition arithmetic without considering any days as holidays or weekends. If the holiday calendar is anything other than 'None' then addition uses that calendar, effectively repeatedly finding the next business day.
See the class-level documentation for more information.
BusinessDayAdjustment adjustment
This adjustment is applied to the result of the period addition calculation. If the addition is performed using business days then any adjustment here is expected to have a different holiday calendar to that used during addition.
If no adjustment is required, use the 'None' business day adjustment.
See the class-level documentation for more information.
HolidayCalendarId id
int weekends
Each date that has a day-of-week matching one of these days is not a business day.
int startYear
int[] lookup
Period period
When the adjustment is performed, this period will be added to the input date.
PeriodAdditionConvention additionConvention
When the adjustment is performed, this convention is used to refine the adjusted date. The most common convention is to move the end date to the last business day of the month if the start date is the last business day of the month.
BusinessDayAdjustment adjustment
This adjustment is applied to the result of the addition calculation.
If no adjustment is required, use the 'None' business day adjustment.
YearMonth yearMonth
The start of this month is used instead of the input date when starting to count the sequence.
Period minimumPeriod
This is added to the input date before starting to count the sequence.
int sequenceNumber
A value of 1 obtains the first date in the sequence.
boolean fullSequence
Many date sequences have two interlinked sequences. One is considered to be the base sequence, selected by setting this to false. The other is considered to be the full sequence, selected by setting this to true.
For example, the "base sequence" of a future is often March, June, September and December. But additionally, the nearest two "serial" months are also listed. Together these make the "full sequence".
Tenor tenor
When the adjustment is performed, this tenor will be added to the input date.
PeriodAdditionConvention additionConvention
When the adjustment is performed, this convention is used to refine the adjusted date. The most common convention is to move the end date to the last business day of the month if the start date is the last business day of the month.
BusinessDayAdjustment adjustment
This adjustment is applied to the result of the addition calculation.
If no adjustment is required, use the 'None' business day adjustment.
FxIndex index
The rate will be queried from this index.
LocalDate fixingDate
This is an adjusted date with any business day rule applied.
Valid business days are defined by FxIndex.getFixingCalendar().
LocalDate maturityDate
This is an adjusted date with any business day rule applied.
This must be equal to FxIndex.calculateMaturityFromFixing(LocalDate, ReferenceData).
IborIndex index
The rate to be paid is based on this index. It will be a well known market index such as 'GBP-LIBOR-3M'.
LocalDate fixingDate
This is an adjusted date with any business day rule applied.
Valid business days are defined by RateIndex.getFixingCalendar().
LocalDate effectiveDate
This is an adjusted date with any business day rule applied.
This must be equal to IborIndex.calculateEffectiveFromFixing(LocalDate, ReferenceData).
LocalDate maturityDate
This is an adjusted date with any business day rule applied.
This must be equal to IborIndex.calculateMaturityFromEffective(LocalDate, ReferenceData).
double yearFraction
This is calculated using the day count of the index. It represents the fraction of the year between the effective date and the maturity date. Typically the value will be close to 1 for one year and close to 0.5 for six months.
String externalName
String indexName
IborIndex or OvernightIndex.
Typically, multiple FloatingRateName names map to one Ibor or Overnight index.FloatingRateType type
Integer fixingDateOffsetDays
String name
CurrencyPair currencyPair
An index defines an FX rate in a single direction, such as from EUR to USD. This currency pair defines that direction.
In most cases, the same index can be used to convert in both directions by taking the rate or the reciprocal as necessary.
HolidayCalendarId fixingCalendar
The fixing date is when the rate is determined.
DaysAdjustment fixingDateOffset
The maturity date is the start date of the indexed deposit. In most cases, the fixing date is 2 days before the maturity date.
DaysAdjustment maturityDateOffset
The maturity date is the start date of the indexed deposit. In most cases, the maturity date is 2 days after the fixing date.
private Object readResolve()
String name
Currency currency
boolean active
Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.
HolidayCalendarId fixingCalendar
The fixing date is when the rate is determined.
LocalTime fixingTime
The rate is fixed at the fixing time of the fixing date.
ZoneId fixingZone
The time-zone of the fixing time.
DaysAdjustment fixingDateOffset
The fixing date is the date on which the index is to be observed. In most cases, the fixing date is 0 or 2 days before the effective date. This data structure allows the complex rules of some indices to be represented.
DaysAdjustment effectiveDateOffset
The effective date is the start date of the indexed deposit. In most cases, the effective date is 0 or 2 days after the fixing date. This data structure allows the complex rules of some indices to be represented.
TenorAdjustment maturityDateOffset
The maturity date is the end date of the indexed deposit and is relative to the effective date. This data structure allows the complex rules of some indices to be represented.
DayCount dayCount
DayCount defaultFixedLegDayCount
A rate index is often paid against a fixed leg, such as in a vanilla Swap. The day count convention of the fixed leg often differs from that of the index, and the default is value is available here.
String name
Currency currency
boolean active
Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.
HolidayCalendarId fixingCalendar
All dates are calculated with reference to the same calendar.
int publicationDateOffset
In most cases, the fixing rate is available on the fixing date. In a few cases, publication of the fixing rate is delayed until the following business day. This property is zero if publication is on the fixing date, or one if it is the next day.
int effectiveDateOffset
In most cases, the settlement date and start of the implied deposit is on the fixing date. In a few cases, the settlement date is the following business day. This property is zero if settlement is on the fixing date, or one if it is the next day. Maturity is always one business day after the settlement date.
DayCount dayCount
DayCount defaultFixedLegDayCount
A rate index is often paid against a fixed leg, such as in a vanilla Swap. The day count convention of the fixed leg often differs from that of the index, and the default is value is available here.
String name
Country region
Currency currency
boolean active
Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.
Frequency publicationFrequency
OvernightIndex index
The rate will be queried from this index.
LocalDate fixingDate
This is an adjusted date with any business day rule applied.
Valid business days are defined by RateIndex.getFixingCalendar().
LocalDate publicationDate
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculatePublicationFromFixing(LocalDate, ReferenceData).
LocalDate effectiveDate
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculateEffectiveFromFixing(LocalDate, ReferenceData).
LocalDate maturityDate
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculateMaturityFromEffective(LocalDate, ReferenceData).
double yearFraction
This is calculated using the day count of the index. It represents the fraction of the year between the effective date and the maturity date. Typically the value will be close to 1 for one year and close to 0.5 for six months.
PriceIndex index
The rate will be queried from this index.
YearMonth fixingMonth
The index will be observed for this month.
LocalDate startDate
This is the start date of the schedule, it is unadjusted and as such might be a weekend or holiday. Any applicable business day adjustment will be applied when creating the schedule. This is also known as the unadjusted effective date.
In most cases, the start date of a financial instrument is just after the trade date, such as two business days later. However, the start date of a schedule is permitted to be any date, which includes dates before or after the trade date.
LocalDate endDate
This is the end date of the schedule, it is unadjusted and as such might be a weekend or holiday. Any applicable business day adjustment will be applied when creating the schedule. This is also known as the unadjusted maturity date or unadjusted termination date. This date must be after the start date.
Frequency frequency
Most dates are calculated using a regular periodic frequency, such as every 3 months. The actual day-of-month or day-of-week is selected using the roll and stub conventions.
BusinessDayAdjustment businessDayAdjustment
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.
BusinessDayAdjustment startDateBusinessDayAdjustment
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.
If this property is not present, the standard businessDayAdjustment property is used instead.
BusinessDayAdjustment endDateBusinessDayAdjustment
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.
If this property is not present, the standard businessDayAdjustment property is used instead.
StubConvention stubConvention
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 property interacts with the "explicit dates" of PeriodicSchedule.getFirstRegularStartDate()
and PeriodicSchedule.getLastRegularEndDate().
The convention 'None' may be used to explicitly indicate there are no stubs. There must be no explicit dates. This will be validated during schedule construction.
The convention 'Both' may be used to explicitly indicate there is both an initial and final stub. The stubs themselves must be specified using explicit dates. This will be validated during schedule construction.
The conventions 'ShortInitial', 'LongInitial', 'SmartInitial', 'ShortFinal', 'LongFinal' and 'SmartFinal' are used to indicate the type of stub to be generated. The exact behavior varies depending on whether there are explicit dates or not:
If explicit dates are specified, then the combination of stub convention an explicit date will be validated during schedule construction. For example, the combination of an explicit dated initial stub and a stub convention of 'ShortInitial', 'LongInitial' or 'SmartInitial' is valid, but other stub conventions, such as 'ShortFinal' or 'None' would be invalid.
If explicit dates are not specified, then it is not required that a stub is generated. The convention determines whether to generate dates from the start date forward, or the end date backwards. Date generation may or may not result in a stub, but if it does then the stub will be of the correct type.
When the stub convention is not present, the generation of stubs is based on the presence or absence of the explicit dates. When there are no explicit stubs and there is a roll convention that matches the start or end date, then the stub convention will be defaulted to 'SmartInitial' or 'SmartFinal'.
RollConvention rollConvention
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.
During schedule generation, if this is present it will be used to determine the schedule. If not present, then the roll convention will be implied.
LocalDate firstRegularStartDate
This is used to identify the boundary date between the initial stub and the first regular schedule period.
This is an unadjusted date, and as such it might not be a valid business day. This date must be on or after 'startDate' and on or before 'endDate'.
During schedule generation, if this is present it will be used to determine the schedule. If not present, then the overall schedule start date will be used instead, resulting in no initial stub.
LocalDate lastRegularEndDate
This is used to identify the boundary date between the last regular schedule period and the final stub.
This is an unadjusted date, and as such it might not be a valid business day. This date must be one or after 'startDate', on or after 'firstRegularStartDate' and on or before 'endDate'.
During schedule generation, if this is present it will be used to determine the schedule. If not present, then the overall schedule end date will be used instead, resulting in no final stub.
AdjustableDate overrideStartDate
This property is rarely used, and is generally needed when accrual starts before the effective date. If specified, it overrides the start date of the first period once schedule generation has been completed. Note that all schedule generation rules apply to 'startDate', with this applied as a final step. This field primarily exists to support the FpML 'firstPeriodStartDate' concept.
If a roll convention is explicitly specified and the regular start date does not match it, then the override will be used when generating regular periods.
If set, it should be different to the start date, although this is not validated. Validation does check that it is on or before 'firstRegularStartDate' and 'lastRegularEndDate', and before 'endDate'.
During schedule generation, if this is present it will be used to override the start date of the first generated schedule period. If not present, then the start of the first period will be the normal start date.
ImmutableList<E> periods
There will be at least one period. The periods are ordered from earliest to latest. It is intended that each period is adjacent to the next one, however each period is independent and non-adjacent periods are allowed.
Frequency frequency
If the schedule was not built from a regular periodic frequency, then the frequency should be a suitable estimate.
RollConvention rollConvention
If the schedule was not built from a regular periodic frequency, then the convention should be 'None'.
PeriodicSchedule definition
LocalDate startDate
The first date in the schedule period, typically treated as inclusive. If the schedule adjusts for business days, then this is the adjusted date.
LocalDate endDate
The last date in the schedule period, typically treated as exclusive. If the schedule adjusts for business days, then this is the adjusted date.
LocalDate unadjustedStartDate
The start date before any business day adjustment. If the schedule adjusts for business days, then this is typically the regular periodic date. If the schedule does not adjust for business days, then this is the same as the start date.
When building, this will default to the start date if not specified.
LocalDate unadjustedEndDate
The end date before any business day adjustment. If the schedule adjusts for business days, then this is typically the regular periodic date. If the schedule does not adjust for business days, then this is the same as the end date.
When building, this will default to the end date if not specified.
double modifyingValue
ValueAdjustmentType type
double value
DoubleArray derivatives
double initialValue
This is used for the lifetime of the trade unless specifically varied.
List<E> steps
Each step consists of a key locating the date of the change and the adjustment that occurs.
ValueStepSequence stepSequence
This allows a regular pattern of steps to be encoded. All step dates must be unique, thus the list of steps must not contain any date implied by this sequence.
Integer periodIndex
This property is used to define the date that the step occurs in relative terms. The date is identified by specifying the zero-based index of the schedule period boundary. The change will occur at the start of the specified period. Thus an index of zero is the start of the first period or initial stub. The index must be one or greater, as a change is not permitted at the start of the first period.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. A zero-based index of '2' would refer to start of the 3rd period, which would be 2013-02-01.
LocalDate date
This property is used to define the date that the step occurs in absolute terms. This must be one of the unadjusted dates in the schedule period schedule. This is an unadjusted date and calculation period business day adjustments will apply.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. The date '2013-02-01' is an unadjusted schedule period boundary, and so may be specified here.
ValueAdjustment value
The adjustment can be an absolute value, or various kinds of relative values.
LocalDate firstStepDate
This sequence will change the value on this date, but not before. This must be one of the unadjusted dates in the schedule period schedule.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. The date '2013-02-01' is an unadjusted schedule period boundary, and so may be specified here.
LocalDate lastStepDate
This sequence will change the value on this date, but not after. This must be one of the unadjusted dates in the schedule period schedule.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. The date '2015-02-01' is an unadjusted schedule period boundary, and so may be specified here.
Frequency frequency
This sequence will change the value on each date between the start and end defined by this frequency.
The frequency is interpreted relative to the frequency of a Schedule.
It must be equal or greater than the related schedule.
ValueAdjustment adjustment
The adjustment type must not be 'Replace'.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.