Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Interest Rates : Finance/EquivalentRate

Finance

 EquivalentRate
 calculate equivalent interest rate

 Calling Sequence EquivalentRate(rate, old, new, interval) EquivalentRate(rate, old, new, startdate, enddate, opts)

Parameters

 rate - positive constant, list or Vector; given interest rate old - Annual, Bimonthly, Continuous, EveryFourthMonth, Monthly, Quarterly, Semiannual, Simple, SimpleThenAnnual, SimpleThenBimonthly, SimpleThenEveryFourthMonth, SimpleThenMonthly, SimpleThenQuarterly, or SimpleThenSemiannual; compounding type for the original interest rate new - Annual, Bimonthly, Continuous, EveryFourthMonth, Monthly, Quarterly, Semiannual, Simple, SimpleThenAnnual, SimpleThenBimonthly, SimpleThenEveryFourthMonth, SimpleThenMonthly, SimpleThenQuarterly, or SimpleThenSemiannual; compounding type for the desired interest rate interval - non-negative constant, list(non-negative), or Vector; duration of the compounding interval in years startdate - a string containing a date specification in a format recognized by ParseDate or a Date data structure; start of the compounding interval enddate - a string containing a date specification in a format recognized by ParseDate or a Date data structure; end of the compounding interval opts - equation of the form option = value where option is daycounter; specify options for the EquivalentRate command

Options

 • daycounter = Actual360, Actual365Fixed, AFB, Bond, Euro, Historical, ISDA, ISMA, OneDay, Simple, Thirty360BondBasis, Thirty360EuroBondBasis, Thirty360European, Thirty360Italian, Thirty360USA, or a day counter data structure -- This option specifies the convention used to convert the amount of time between two dates to year fractions.

Description

 • The EquivalentRate command calculates an equivalent rate for the specified compounding interval and compounding type. The parameter rate is the original rate. It must be a positive constant. The old and new parameters are the original compounding type and the new compounding type respectively. The parameter interval is the duration of the compounding period. Alternatively, one can specify the beginning and the end of the compounding period as dates.
 • The optional parameter interval can be used to specify the length of the compounding interval in years. This parameter is relevant only when the conversion involves simple compounding.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{rate1}≔0.06:$
 > $\mathrm{rate2}≔\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Monthly}\right)$
 ${\mathrm{rate2}}{≔}{0.06015025031}$ (1)
 > $\mathrm{evalf}\left(\mathrm{exp}\left(\mathrm{rate1}\right)\right)$
 ${1.061836547}$ (2)
 > $\mathrm{evalf}\left({\left(1+\frac{\mathrm{rate2}}{12}\right)}^{12}\right)$
 ${1.061836548}$ (3)
 > $\mathrm{intervalL}≔\left[1.2,2.5,4.8\right]:$
 > $\mathrm{ratelist}≔\mathrm{EquivalentRate}\left(0.65,\mathrm{Continuous},\mathrm{Simple},\mathrm{intervalL}\right)$
 ${\mathrm{ratelist}}{≔}\left[\begin{array}{ccc}{0.984560221248501}& {1.63136761487203}& {4.50966242566154}\end{array}\right]$ (4)

This is an example of converting from/to simple compounding.

 > $\mathrm{startdate}≔"Jan-05-2006"$
 ${\mathrm{startdate}}{≔}{"Jan-05-2006"}$ (5)
 > $\mathrm{enddate}≔"Dec-31-2006"$
 ${\mathrm{enddate}}{≔}{"Dec-31-2006"}$ (6)
 > $\mathrm{interval}≔\mathrm{YearFraction}\left(\mathrm{startdate},\mathrm{enddate}\right)$
 ${\mathrm{interval}}{≔}{0.9863013699}$ (7)
 > $\mathrm{Settings}\left(\mathrm{daycounter}\right)$
 ${\mathrm{Historical}}$ (8)
 > $\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Simple},\mathrm{interval}\right)$
 ${0.06181088722}$ (9)
 > $\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Simple},"Jan-05-2006","Jan-05-2007",\mathrm{daycounter}=\mathrm{ISMA}\right)$
 ${0.06183654655}$ (10)

Here are more conversions.

 > $\mathrm{rate3}≔\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Quarterly}\right)$
 ${\mathrm{rate3}}{≔}{0.06045225846}$ (11)
 > $\mathrm{rate4}≔\mathrm{EquivalentRate}\left(\mathrm{rate2},\mathrm{Monthly},\mathrm{Quarterly}\right)$
 ${\mathrm{rate4}}{≔}{0.06045225846}$ (12)
 > $\mathrm{rate5}≔\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Simple},1.0\right)$
 ${\mathrm{rate5}}{≔}{0.06183654655}$ (13)
 > $\mathrm{EquivalentRate}\left(\mathrm{rate5},\mathrm{Simple},\mathrm{Continuous},1.0\right)$
 ${0.06000000000}$ (14)
 > $\mathrm{EquivalentRate}\left(\mathrm{rate1},\mathrm{Continuous},\mathrm{Simple},5.0\right)$
 ${0.06997176152}$ (15)

References

 Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice. New York: Springer-Verlag, 2001.
 Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
 Kellison, S.G., Theory of Interest, 2nd edition, Irwin: McGraw-Hill, 1991.

Compatibility

 • The Finance[EquivalentRate] command was introduced in Maple 15.
 • For more information on Maple 15 changes, see Updates in Maple 15.