Class TermDeposit

  • All Implemented Interfaces:
    Resolvable<ResolvedTermDeposit>, Product, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class TermDeposit
    extends Object
    implements Product, Resolvable<ResolvedTermDeposit>, org.joda.beans.ImmutableBean, Serializable
    A term deposit.

    A term deposit is a financial instrument that provides a fixed rate of interest on an amount for a specific term. For example, investing GBP 1,000 for 3 months at a 1% interest rate.

    The instrument has two payments, one at the start date and one at the end date. For example, investing GBP 1,000 for 3 months implies an initial payment to the counterparty of GBP 1,000 and a final payment from the counterparty of GBP 1,000 plus interest.

    See Also:
    Serialized Form
    • Method Detail

      • allCurrencies

        public ImmutableSet<Currency> allCurrencies()
        Description copied from interface: Product
        Returns the set of currencies the product refers to.

        This returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.

        Specified by:
        allCurrencies in interface Product
        Returns:
        the set of currencies the product refers to
      • resolve

        public ResolvedTermDeposit resolve​(ReferenceData refData)
        Description copied from interface: Resolvable
        Resolves this object using the specified reference data.

        This converts the object implementing this interface to the equivalent resolved form. All ReferenceDataId identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.

        Resolved objects may be 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.

        Specified by:
        resolve in interface Resolvable<ResolvedTermDeposit>
        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved instance
      • meta

        public static TermDeposit.Meta meta()
        The meta-bean for TermDeposit.
        Returns:
        the meta-bean, not null
      • builder

        public static TermDeposit.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public TermDeposit.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getBuySell

        public BuySell getBuySell()
        Gets whether the term deposit is 'Buy' or 'Sell'.

        A value of 'Buy' implies payment of the principal at the start date and receipt of the principal plus interest at the end date. A value of 'Sell' implies the opposite. In other words, 'Buy' refers to buying the service of "money storage", with the benefit of receiving interest.

        Returns:
        the value of the property, not null
      • getCurrency

        public Currency getCurrency()
        Gets the primary currency.

        This is the currency of the term 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 notional represents the principal amount, and must be non-negative. 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.

        Interest accrues from this date. This date is typically set to be a valid business day. Optionally, the businessDayAdjustment property may be set to provide a rule for adjustment.

        Returns:
        the value of the property, not null
      • getEndDate

        public LocalDate getEndDate()
        Gets the end date of the deposit.

        Interest accrues until this date. This date is typically set to be a valid business day. Optionally, the businessDayAdjustment property may be set to provide a rule for adjustment. This date must be after the start date.

        Returns:
        the value of the property, not null
      • getBusinessDayAdjustment

        public Optional<BusinessDayAdjustment> getBusinessDayAdjustment()
        Gets the business day adjustment to apply to the start and end date, optional.

        The start and end date are typically defined as valid business days and thus do not need to be adjusted. If this optional property is present, then the start and end date will be adjusted as defined here.

        Returns:
        the optional value of the property, not null
      • getDayCount

        public DayCount getDayCount()
        Gets the day count convention.

        This is used to convert dates to a numerical value.

        Returns:
        the value of the property, not null
      • getRate

        public double getRate()
        Gets the fixed interest rate to be paid. A 5% rate will be expressed as 0.05.
        Returns:
        the value of the property
      • toBuilder

        public TermDeposit.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object