getZeroRates
Get zero rates for input dates for
IRFunctionCurve
Description
computes zero rates for input dates for an F
= getZeroRates(CurveObj
,InpDates
)IRFunctionCurve
object.
adds optional name-value pair arguments. F
= getZeroRates(___,Name,Value
)
Examples
Get Zero Rates For Input Dates For an IRFunctionCurve
This example shows how to get zero rates for input dates for an IRFunctionCurve
.
irfc = IRFunctionCurve('Forward',today,@(t) polyval([-0.0001 0.003 0.02],t));
getZeroRates(irfc, today+30:30:today+720)
ans = 24×1
0.0201
0.0202
0.0204
0.0205
0.0206
0.0207
0.0209
0.0210
0.0211
0.0212
⋮
Input Arguments
CurveObj
— Interest-rate curve object
object
Interest-rate curve object, specified by using IRFunctionCurve
.
Data Types: object
InpDates
— Input dates
vector
Input dates, specified using MATLAB® date format. The input dates must be after the
Settle
date of IRFunctionCurve
.
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: F = getZeroRates(irfc,
CurveSettle+30:30:CurveSettle+720)
Compounding
— Compounding frequency per-year for zero rates
CurveObj.Compounding
(default) | possible values include: –1
, 0
,
1
, 2
, 3
,
4
, 6
,
12
.
Compounding frequency per-year for zero rates, specified as the
comma-separated pair consisting of 'Compounding'
and
a scalar numeric using one of the supported values:
−1
= Continuous compounding0
= Simple interest (no compounding)1
= Annual compounding2
= Semiannual compounding3
= Compounding three times per year4
= Quarterly compounding6
= Bimonthly compounding12
= Monthly compounding
Data Types: double
Basis
— Day count basis for the zero rates
0
(actual/actual) (default) | integer from 0
to 13
Day count basis for the zero rates, specified as the comma-separated
pair consisting of 'Basis'
and a scalar integer.
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
Output Arguments
F
— Zero rates
vector
Zero rates, returned as a vector.
Version History
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)