Class ResolvedTermDeposit
- java.lang.Object
-
- com.opengamma.strata.product.deposit.ResolvedTermDeposit
-
- All Implemented Interfaces:
ResolvedProduct
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ResolvedTermDeposit extends Object implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
A term deposit, resolved for pricing.This is the resolved form of
TermDeposit
and is an input to the pricers. Applications will typically create aResolvedTermDeposit
from aTermDeposit
usingTermDeposit.resolve(ReferenceData)
.A
ResolvedTermDeposit
is bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResolvedTermDeposit.Builder
The bean-builder forResolvedTermDeposit
.static class
ResolvedTermDeposit.Meta
The meta-bean forResolvedTermDeposit
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedTermDeposit.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
Currency
getCurrency()
Gets the primary currency.LocalDate
getEndDate()
Gets the end date of the deposit.double
getInterest()
Gets the accrued interest.double
getNotional()
Gets the notional amount.double
getRate()
Gets the fixed rate of interest.LocalDate
getStartDate()
Gets the start date of the deposit.double
getYearFraction()
Gets the year fraction between the start and end date.int
hashCode()
static ResolvedTermDeposit.Meta
meta()
The meta-bean forResolvedTermDeposit
.ResolvedTermDeposit.Meta
metaBean()
ResolvedTermDeposit.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
getInterest
public double getInterest()
Gets the accrued interest.The interest is
rate * principal * yearFraction
.- Returns:
- the accrued interest
-
meta
public static ResolvedTermDeposit.Meta meta()
The meta-bean forResolvedTermDeposit
.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedTermDeposit.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedTermDeposit.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getCurrency
public Currency getCurrency()
Gets the primary currency.This is the currency of the deposit and the currency that payment is made in.
- Returns:
- the value of the property, not null
-
getNotional
public double getNotional()
Gets the notional amount.The amount that is deposited. It is a positive signed amount if the deposit is 'Buy', and a negative signed amount if the deposit is 'Sell'.
The currency of the notional is specified by
currency
.- Returns:
- the value of the property
-
getStartDate
public LocalDate getStartDate()
Gets the start date of the deposit.This is the first date that interest accrues.
This is an adjusted date, which should be a valid business day
- Returns:
- the value of the property, not null
-
getEndDate
public LocalDate getEndDate()
Gets the end date of the deposit.This is the last day that interest accrues. This date must be after the start date.
This is an adjusted date, which should be a valid business day
- Returns:
- the value of the property, not null
-
getYearFraction
public double getYearFraction()
Gets the year fraction between the start and end date.The value is usually calculated using a
DayCount
. Typically the value will be close to 1 for one year and close to 0.5 for six months. The fraction may be greater than 1, but not less than 0.- Returns:
- the value of the property
-
getRate
public double getRate()
Gets the fixed rate of interest. A 5% rate will be expressed as 0.05.- Returns:
- the value of the property
-
toBuilder
public ResolvedTermDeposit.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-