Finance - Maple Programming Help

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

Finance

 DiscountFactor
 return a discount factor for the specified date or time

 Calling Sequence DiscountFactor(rate, time, opts) DiscountFactor(rate, date, opts)

Parameters

 rate - real constant, list(realcons), Vector, or a yield term structure; given interest rate time - non-negative real number, list(non-negative), or Vector; time in years date - a string containing a date specification in a format recognized by ParseDate or a Date data structure; date opts - equations of the form option = value where option is one of referencedate, compounding, or daycounter; specify options for the DiscountFactor command

Options

 • compounding = Simple, Continuous, Annual, Semiannual, EveryFourthMonth, Quarterly, Bimonthly, Monthly, SimpleThenAnnual, SimpleThenSemiannual, SimpleThenEveryFourthMonth, SimpleThenQuarterly, SimpleThenBimonthly, or SimpleThenMonthly -- This option specifies the compounding type for the given interest rate.
 • daycounter = Actual360, Actual365Fixed, AFB, Bond, Euro, Historical, ISDA, ISMA, OneDay, Simple, Thirty360BondBasis, Thirty360EuroBondBasis, Thirty360European, Thirty360Italian, Thirty360USA, or a day counter data structure created using the DayCounter constructor -- This option provides a day counter that will be used to convert the period between two dates to a fraction of the year. The default day count convention can be set using the Settings command.
 • referencedate =  a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the reference date, that is, the date when the discount factor is equal to 1.

Description

 • The DiscountFactor(rate, time, opts) calling sequence computes the discount factor at the specified time corresponding to the given interest rate.  The interest rate and time can be given as lists in which case the array or their combinations are returned.
 • The DiscountFactor(rate, date, opts) calling sequence computes the discount factor on the specified date corresponding to the given interest rate. The value of the daycounter option is used to compute the distance between date and the reference date (which is set to the global evaluation date by default).

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{rate1}≔0.06:$
 > $\mathrm{discount1}≔\mathrm{DiscountFactor}\left(\mathrm{rate1},1.0,\mathrm{compounding}=\mathrm{Monthly}\right)$
 ${\mathrm{discount1}}{≔}{0.9419053397}$ (1)
 > $\mathrm{rate2}≔\mathrm{ImpliedRate}\left(\frac{1}{\mathrm{discount1}},1.0,\mathrm{Monthly}\right)$
 ${\mathrm{rate2}}{≔}{0.06000000013}$ (2)
 > $\mathrm{cmpdlist}≔\left[1.2,1.05,1.8\right]:$
 > $\mathrm{timelist}≔\left[0.2,2.5,3.2\right]:$
 > $\mathrm{cflist}≔\mathrm{DiscountFactor}\left(\mathrm{cmpdlist},\mathrm{timelist},\mathrm{compounding}=\mathrm{Monthly}\right)$
 ${\mathrm{cflist}}{≔}\left[\begin{array}{ccc}{0.795531820376998}& {0.0573085533011679}& {0.0257348054799413}\\ {0.817654370555386}& {0.0807461884847159}& {0.0399131679844736}\\ {0.715031514024719}& {0.0151030544938847}& {0.00466877484657962}\end{array}\right]$ (3)
 > $\mathrm{DiscountFactor}\left(\mathrm{rate1},"January 02, 2006",\mathrm{compounding}=\mathrm{Monthly},\mathrm{daycounter}=\mathrm{Actual365Fixed},\mathrm{referencedate}="January 02, 2005"\right)$
 ${0.9419053397}$ (4)
 > $\mathrm{rate3}≔\mathrm{ZeroCurve}\left(0.05,\mathrm{referencedate}="January 02, 2005"\right)$
 ${\mathrm{rate3}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (5)
 > $\mathrm{discount3}≔\mathrm{DiscountFactor}\left(\mathrm{rate3},"January 02, 2006"\right)$
 ${\mathrm{discount3}}{≔}{0.9512294245}$ (6)
 > $\mathrm{ImpliedRate}\left(\frac{1}{\mathrm{discount3}},"January 02, 2005","January 02, 2006",\mathrm{Continuous}\right)$
 ${0.04999999964}$ (7)
 > $\mathrm{ImpliedRate}\left(\frac{1}{\mathrm{discount3}},"January 02, 2005","January 02, 2006",\mathrm{Monthly}\right)$
 ${0.05010431113}$ (8)

Compatibility

 • The Finance[DiscountFactor] command was introduced in Maple 15.