Change time intervals defining interestrate environment
[Rates, EndTimes, StartTimes] = ratetimes(Compounding,
RefRates, RefEndTimes, RefStartTimes, EndTimes, StartTimes) [Rates, EndTimes, StartTimes] = ratetimes(Compounding,
RefRates, RefEndDates, RefStartDates, EndDates, StartDates,
ValuationDate)
Usage 1: ValuationDate
not passed; third
through sixth arguments are interpreted as times.
Usage 2: ValuationDate
passed and interval
points input as dates.
 Scalar value representing the rate at which the input zero rates were compounded when annualized. This argument determines the formula for the discount factors:





 (Optional) 


 (Optional) 


 (Optional) 


 (Optional) Default = 
 Scalar value in serial date number form representing
the observation date of the investment horizons entered in 
[Rates, EndTimes, StartTimes] = ratetimes(Compounding,
RefRates, RefEndTimes, RefStartTimes, EndTimes, StartTimes)
and [Rates,
EndTimes, StartTimes] = ratetimes(Compounding, RefRates, RefEndDates,
RefStartDates, EndDates, StartDates, ValuationDate)
change
time intervals defining an interestrate environment.
ratetimes
takes an interestrate environment
defined by yields over one collection of time intervals and computes
the yields over another set of time intervals. The zero rate is assumed
to be piecewise linear in time.
Rates
is an NPOINTS
byNCURVES
matrix
of rates implied by the reference interestrate structure and sampled
at new intervals.
StartTimes
is an NPOINTS
by1
column
vector of times starting the new intervals where rates are desired,
measured in periodic units.
EndTimes
is an NPOINTS
by1
column
vector of times ending the new intervals, measured in periodic
units.
If Compounding = 365
(daily), StartTimes
and EndTimes
are
measured in days. The arguments otherwise contain values, T
,
computed from SIA semiannual time factors, Tsemi
,
by the formula T = Tsemi/2 * F
, where F
is
the compounding frequency.
You can specify the investment intervals either with input times
(Usage 1) or with input dates (Usage 2). Entering the argument ValuationDate
invokes
the date interpretation; omitting ValuationDate
invokes
the default time interpretations.
Example 1. The reference environment is a collection of zero rates at 6, 12, and 24 months. Create a collection of 1year forward rates beginning at 0, 6, and 12 months.
RefRates = [0.05; 0.06; 0.065]; RefEndTimes = [1; 2; 4]; StartTimes = [0; 1; 2]; EndTimes = [2; 3; 4]; Rates = ratetimes(2, RefRates, RefEndTimes, 0, EndTimes,... StartTimes)
Rates = 0.0600 0.0688 0.0700
Example 2. Interpolate a zero
yield curve to different dates. Zero curves start at the default date
of ValuationDate
.
RefRates = [0.04; 0.05; 0.052]; RefDates = [729756; 729907; 730121]; Dates = [730241; 730486]; ValuationDate = 729391; Rates = ratetimes(2, RefRates, RefDates, [], Dates, [],... ValuationDate)
Rates = 0.0520 0.0520