Deposit

Deposit instrument object

Description

Create and price a Deposit instrument object using this workflow:

  1. Use fininstrument to create a Deposit instrument object.

  2. Use ratecurve to specify an interest-rate model for the Deposit instrument.

  3. Use finpricer to specify a Discount pricing method for the Deposit instrument.

For more information on this workflow, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available models and pricing methods for a Deposit instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

DepositObj = fininstrument(InstrumentType,'Maturity',maturity_date,'Rate',rate_value) creates a Deposit object by specifying InstrumentType and sets the properties for the required name-value pair arguments Maturity and Rate.

example

DepositObj = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, DepositObj = fininstrument("Deposit",'Maturity',datetime(2019,1,30),'Rate',0.027,'Period',2,'Basis',1,'Principal',100,'BusinessDayConvention',"follow",'Name',"deposit_instrument") creates a Deposit instrument with an interest rate of .027 and a maturity of January 30, 2019. You can specify multiple name-value pair arguments.

Input Arguments

expand all

Instrument type, specified as a string with the value of "Deposit" or a character vector with the value of 'Deposit'.

Data Types: char | string

Deposit Name-Value Pair Arguments

Specify required and optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: DepositObj = fininstrument("Deposit",'Maturity',datetime(2019,1,30),'Rate',0.027,'Period',2,'Basis',1,'Principal',100,'BusinessDayConvention',"follow",'Name',"deposit_instrument")

Required Deposit Name-Value Pair Arguments

expand all

Maturity date, specified as the comma-separated pair consisting of 'Maturity' and a datetime, serial date number, date character vector, or date string.

If you use a date character vector or date string, the format must be recognizable by datetime because the Maturity property is stored as a datetime.

Data Types: char | double | string | datetime

Deposit interest rate, specified as the comma-separated pair consisting of 'Rate' and a scalar decimal.

Data Types: double

Optional Deposit Name-Value Pair Arguments

expand all

Frequency of payments per year, specified as the comma-separated pair consisting of 'Period' and scalar integer. Values for Period are: 0, 1, 2, 3, 4, 6, or 12.

Data Types: double

Day count basis, specified as the comma-separated pair consisting of 'Basis' and a scalar integer using one of the following values:

  • 0 — actual/actual

  • 1 — 30/360 (SIA)

  • 2 — actual/360

  • 3 — actual/365

  • 4 — 30/360 (PSA)

  • 5 — 30/360 (ISDA)

  • 6 — 30/360 (European)

  • 7 — actual/365 (Japanese)

  • 8 — actual/actual (ICMA)

  • 9 — actual/360 (ICMA)

  • 10 — actual/365 (ICMA)

  • 11 — 30/360E (ICMA)

  • 12 — actual/365 (ISDA)

  • 13 — BUS/252

For more information, see Basis.

Data Types: double

Principal amount, specified as the comma-separated pair consisting of 'Principal' and a scalar numeric.

Data Types: double

Business day convention, specified as the comma-separated pair consisting of 'BusinessDayConvention' and a string or character vector. The selection for business day convention determines how nonbusiness days are treated. Nonbusiness days are defined as weekends plus any other date that businesses are not open (for example, statutory holidays). Values are:

  • "actual" — Nonbusiness days are effectively ignored. Cash flows that fall on nonbusiness days are assumed to be distributed on the actual date.

  • "follow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day.

  • "modifiedfollow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day. However if the following business day is in a different month, the previous business day is adopted instead.

  • "previous" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day.

  • "modifiedprevious" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day. However if the previous business day is in a different month, the following business day is adopted instead.

Data Types: char | string

Holidays used in computing business days, specified as the comma-separated pair consisting of 'Holidays' and dates using datetimes, serial date numbers, cell array of date character vectors, or date string array. For example:

H = holidays(datetime('today'),datetime(2025,12,15));
DepositObj = fininstrument("deposit",'Maturity',datetime(2025,12,15),'Rate',0.027,'Holidays',H)

Data Types: double | cell | datetime | string

User-defined name for the instrument, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector.

Data Types: char | string

Properties

expand all

Maturity date, returned as a datetime.

Data Types: datetime

Deposit interest rate, returned as a scalar decimal.

Data Types: double

Frequency of payments per year, returned as a scalar integer.

Data Types: double

Day count basis, returned as a scalar integer.

Data Types: double

Principal amount, returned as a scalar numeric.

Data Types: double

Business day convention, returned as a string.

Data Types: string

Holidays used in computing business days, returned as datetimes.

Data Types: datetime

User-defined name for the instrument, returned as a string.

Data Types: string

Object Functions

cashflowsComputes cash flow for FixedBond, FloatBond, Swap, FRA, Swap, or Deposit instrument

Examples

collapse all

This example shows the workflow to price a Deposit instrument when using a ratecurve and a Discount pricing method.

Create Deposit Instrument Object

Use fininstrument to create a Deposit instrument object.

DepositObj = fininstrument("Deposit",'Maturity',datetime(2019,3,15),'Rate',0.0195,'Period',2,'Basis',1,'Principal',100,'Name',"deposit_instrument")
DepositObj = 
  Deposit with properties:

                     Rate: 0.0195
                   Period: 2
                    Basis: 1
                 Maturity: 15-Mar-2019
                Principal: 100
    BusinessDayConvention: "actual"
                 Holidays: NaT
                     Name: "deposit_instrument"

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018,9,15);
Type = 'zero';
ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
 
myRC = ratecurve('zero',Settle,ZeroDates,ZeroRates)
myRC = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 0
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Sep-2018
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create Discount Pricer Object

Use finpricer to create a Discount pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("Discount", 'DiscountCurve',myRC)
outPricer = 
  Discount with properties:

    DiscountCurve: [1x1 ratecurve]

Price Deposit Instrument

Use price to compute the price and sensitivities for the Deposit instrument.

[Price, outPR] = price(outPricer, DepositObj,["all"])
Price = 0.9725
outPR = 
  priceresult with properties:

       Results: [1x2 table]
    PricerData: []

outPR.Results
ans=1×2 table
     Price        DV01   
    _______    __________

    0.97249    4.8225e-05

More About

expand all

Introduced in R2020a