public final class ImmutableTermDepositConvention extends Object implements TermDepositConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a term deposit.
The convention is defined by three dates.
TermDepositTemplate,
not by this convention.| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTermDepositConvention.Builder
The bean-builder for
ImmutableTermDepositConvention. |
static class |
ImmutableTermDepositConvention.Meta
The meta-bean for
ImmutableTermDepositConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableTermDepositConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
BusinessDayAdjustment |
getBusinessDayAdjustment()
Gets the business day adjustment to apply to the start and end date.
|
Currency |
getCurrency()
Gets the primary currency.
|
DayCount |
getDayCount()
Gets the day count convention.
|
String |
getName()
Gets the convention name, such as 'GBP-Deposit-ON'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.
|
int |
hashCode() |
static ImmutableTermDepositConvention.Meta |
meta()
The meta-bean for
ImmutableTermDepositConvention. |
ImmutableTermDepositConvention.Meta |
metaBean() |
static ImmutableTermDepositConvention |
of(String name,
Currency currency,
BusinessDayAdjustment businessDayAdjustment,
DayCount dayCount,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified currency, business day adjustment,
day count convention and spot date offset.
|
ImmutableTermDepositConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
TermDepositTrade |
toTrade(TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notional,
double rate)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcalculateSpotDateFromTradeDate, createTrade, createTrade, extendedEnum, of, toTradepublic static ImmutableTermDepositConvention of(String name, Currency currency, BusinessDayAdjustment businessDayAdjustment, DayCount dayCount, DaysAdjustment spotDateOffset)
name - the name of the convention, such as 'GBP-Deposit-ON'currency - the currency, in which the payments are madebusinessDayAdjustment - the business day adjustment to apply to the start and end datedayCount - the day count convention, used to convert dates to a numerical valuespotDateOffset - the offset of the spot value date from the trade datepublic TermDepositTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double rate)
TermDepositConventionThis returns a trade based on the specified dates. The notional is unsigned, with buy/sell determining the direction of the trade. If buying the term deposit, the principal is paid at the start date and the principal plus interest is received at the end date. If selling the term deposit, the principal is received at the start date and the principal plus interest is paid at the end date.
toTrade in interface TermDepositConventiontradeInfo - additional information about the tradestartDate - the start dateendDate - the end datebuySell - the buy/sell flagnotional - the notional amount, in the payment currency of the templaterate - the fixed rate, typically derived from the marketpublic static ImmutableTermDepositConvention.Meta meta()
ImmutableTermDepositConvention.public static ImmutableTermDepositConvention.Builder builder()
public ImmutableTermDepositConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic Currency getCurrency()
This is the currency of the term deposit and the currency that payment is made in.
getCurrency in interface TermDepositConventionpublic String getName()
getName in interface NamedgetName in interface TermDepositConventionpublic BusinessDayAdjustment getBusinessDayAdjustment()
The start and end date will be adjusted as defined here.
public DayCount getDayCount()
This is used to convert dates to a numerical value.
public DaysAdjustment getSpotDateOffset()
The offset is applied to the trade date and is typically plus 2 business days. The start date of the term deposit is equal to the spot date and the end date of the term deposit is relative to the start date.
getSpotDateOffset in interface TermDepositConventionpublic ImmutableTermDepositConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.