Finance Package Commands for Term Structures - Maple Programming Help

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

Finance Package Commands for Term Structures

Overview

The Finance package also provides for creating and manipulating term structures of interest rates as well as volatility term structures. Here is the list of relevant commands:

 - calculate benchmark rate based on a specified calendar - return a compound factor for the specified date or time - construct a yield curve based on known discount rates - return a discount factor for the specified date or time - calculate equivalent interest rate - construct a yield curve based on known forward rates - calculate interest rate implied by a given compound factor - compute par rates based on a given term structure - construct a yield curve based on known zero rates - compute zero rates based on a given term structure

Discount Factor and Compound Factor

The DiscountFactor command returns the discount factor corresponding to the specified interest rate, compounding type, and frequency.

 > $\mathrm{restart};$$\mathrm{with}\left(\mathrm{Finance}\right):$
 >
 ${\mathrm{DF1}}{:=}{0.8187307531}$ (2.1)
 > $\frac{1}{{ⅇ}^{0.2}};$
 ${0.8187307532}$ (2.2)
 >
 ${\mathrm{DF2}}{:=}{0.8333333333}$ (2.3)
 > $\frac{1}{1+0.2};$
 ${0.8333333333}$ (2.4)

The CompoundFactor command returns the compound factor corresponding to the specified interest rate, compounding type, and frequency.

 > $\mathrm{CF1}:=\mathrm{CompoundFactor}\left(1,0.2,\mathrm{compounding}=\mathrm{Continuous}\right);$
 ${\mathrm{CF1}}{:=}{1.221402758}$ (2.5)
 > $\mathrm{CF1}\mathrm{DF1};$
 ${0.9999999999}$ (2.6)
 > $\mathrm{CF2}:=\mathrm{CompoundFactor}\left(1,0.2,\mathrm{compounding}=\mathrm{Simple}\right);$
 ${\mathrm{CF2}}{:=}{1.200000000}$ (2.7)
 > $1+0.2;$
 ${1.2}$ (2.8)

Interest Rate Calculations

The EquivalentRate command generates a desired interest rate that is equivalent to the given interest rate.

 > $\mathrm{Times}:=1;$
 ${\mathrm{Times}}{:=}{1}$ (3.1)
 > $\mathrm{R1}:=0.06;$
 ${\mathrm{R1}}{:=}{0.06}$ (3.2)
 > $\mathrm{R2}:=\mathrm{EquivalentRate}\left(\mathrm{R1},\mathrm{Continuous},\mathrm{Monthly},1\right);$
 ${\mathrm{R2}}{:=}{0.06015025031}$ (3.3)
 > $\mathrm{V1}:={ⅇ}^{\mathrm{R1}};$
 ${\mathrm{V1}}{:=}{1.061836547}$ (3.4)
 > $\mathrm{V2}:={\left(1+\frac{\mathrm{R2}}{12}\right)}^{12};$
 ${\mathrm{V2}}{:=}{1.061836548}$ (3.5)

The ImpliedRate command returns the implied rate for the given compound factor.

 > $\mathrm{r1}:=0.2;$
 ${\mathrm{r1}}{:=}{0.2}$ (3.6)
 >
 ${\mathrm{CF1}}{:=}{1.221402758}$ (3.7)
 >
 ${\mathrm{r2}}{:=}{0.1999999999}$ (3.8)
 > $\mathrm{r3}:=\mathrm{ln}\left(\mathrm{CF1}\right);$
 ${\mathrm{r3}}{:=}{0.1999999999}$ (3.9)

The ZeroRate (short for zero-coupon rate) command computes the rate of interest earned on an investment that starts today and ends at a future certain day (in years).

 > $\mathrm{times}:=\left[0,0.5,1,1.5,2\right];$
 ${\mathrm{times}}{:=}\left[{0}{,}{0.5}{,}{1}{,}{1.5}{,}{2}\right]$ (3.10)
 > $\mathrm{rates}:=\left[0.01,0.04,0.06,0.07,0.075\right];$
 ${\mathrm{rates}}{:=}\left[{0.01}{,}{0.04}{,}{0.06}{,}{0.07}{,}{0.075}\right]$ (3.11)

Use the input interest rates at different maturity times to construct a piecewise function.

 > $\mathrm{CurveFitting}:-\mathrm{Spline}\left(\mathrm{times},\mathrm{rates},t,\mathrm{degree}=1\right);$
 ${{}\begin{array}{cc}{0.01000000000}{+}{0.06000000000}{}{t}& {t}{<}{0.5}\\ {0.02000000000}{+}{0.04000000000}{}{t}& {t}{<}{1}\\ {0.04000000000}{+}{0.02000000000}{}{t}& {t}{<}{1.5}\\ {0.05500000000}{+}{0.01000000000}{}{t}& {\mathrm{otherwise}}\end{array}$ (3.12)
 > $F:=\mathrm{unapply}\left(,t\right):$
 > $\mathrm{Plot_F}:=\mathrm{plot}\left(F\left(t\right),t=0..2\right):$
 > $\mathrm{ZC}:=\mathrm{ZeroCurve}\left(F\right):$

First consider the case of continuously compounded interest.

 > $\mathrm{ZR}:=\left[\mathrm{seq}\left(\mathrm{ZeroRate}\left(\mathrm{ZC},\frac{i}{100},\mathrm{compounding}=\mathrm{Continuous}\right),i=1..200\right)\right];$
 ${\mathrm{ZR}}{:=}\left[{0.01060000000}{,}{0.01120000000}{,}{0.01180000000}{,}{0.01240000000}{,}{0.01300000000}{,}{0.01360000000}{,}{0.01420000000}{,}{0.01480000000}{,}{0.01540000000}{,}{0.01600000000}{,}{0.01660000000}{,}{0.01720000000}{,}{0.01780000000}{,}{0.01840000000}{,}{0.01900000000}{,}{0.01960000000}{,}{0.02020000000}{,}{0.02080000000}{,}{0.02140000000}{,}{0.02200000000}{,}{0.02260000000}{,}{0.02320000000}{,}{0.02380000000}{,}{0.02440000000}{,}{0.02500000000}{,}{0.02560000000}{,}{0.02620000000}{,}{0.02680000000}{,}{0.02740000000}{,}{0.02800000000}{,}{0.02860000000}{,}{0.02920000000}{,}{0.02980000000}{,}{0.03040000000}{,}{0.03100000000}{,}{0.03160000000}{,}{0.03220000000}{,}{0.03280000000}{,}{0.03340000000}{,}{0.03400000000}{,}{0.03460000000}{,}{0.03520000000}{,}{0.03580000000}{,}{0.03640000000}{,}{0.03700000000}{,}{0.03760000000}{,}{0.03820000000}{,}{0.03880000000}{,}{0.03940000000}{,}{0.04000000000}{,}{0.04040000000}{,}{0.04080000000}{,}{0.04120000000}{,}{0.04160000000}{,}{0.04200000000}{,}{0.04240000000}{,}{0.04280000000}{,}{0.04320000000}{,}{0.04360000000}{,}{0.04400000000}{,}{0.04440000000}{,}{0.04480000000}{,}{0.04520000000}{,}{0.04560000000}{,}{0.04600000000}{,}{0.04640000000}{,}{0.04680000000}{,}{0.04720000000}{,}{0.04760000000}{,}{0.04800000000}{,}{0.04840000000}{,}{0.04880000000}{,}{0.04920000000}{,}{0.04960000000}{,}{0.05000000000}{,}{0.05040000000}{,}{0.05080000000}{,}{0.05120000000}{,}{0.05160000000}{,}{0.05200000000}{,}{0.05240000000}{,}{0.05280000000}{,}{0.05320000000}{,}{0.05360000000}{,}{0.05400000000}{,}{0.05440000000}{,}{0.05480000000}{,}{0.05520000000}{,}{0.05560000000}{,}{0.05600000000}{,}{0.05640000000}{,}{0.05680000000}{,}{0.05720000000}{,}{0.05760000000}{,}{0.05800000000}{,}{0.05840000000}{,}{0.05880000000}{,}{0.05920000000}{,}{0.05960000000}{,}{0.06000000000}{,}{0.06020000000}{,}{0.06040000000}{,}{0.06060000000}{,}{0.06080000000}{,}{0.06100000000}{,}{0.06120000000}{,}{0.06140000000}{,}{0.06160000000}{,}{0.06180000000}{,}{0.06200000000}{,}{0.06220000000}{,}{0.06240000000}{,}{0.06260000000}{,}{0.06280000000}{,}{0.06300000000}{,}{0.06320000000}{,}{0.06340000000}{,}{0.06360000000}{,}{0.06380000000}{,}{0.06400000000}{,}{0.06420000000}{,}{0.06440000000}{,}{0.06460000000}{,}{0.06480000000}{,}{0.06500000000}{,}{0.06520000000}{,}{0.06540000000}{,}{0.06560000000}{,}{0.06580000000}{,}{0.06600000000}{,}{0.06620000000}{,}{0.06640000000}{,}{0.06660000000}{,}{0.06680000000}{,}{0.06700000000}{,}{0.06720000000}{,}{0.06740000000}{,}{0.06760000000}{,}{0.06780000000}{,}{0.06800000000}{,}{0.06820000000}{,}{0.06840000000}{,}{0.06860000000}{,}{0.06880000000}{,}{0.06900000000}{,}{0.06920000000}{,}{0.06940000000}{,}{0.06960000000}{,}{0.06980000000}{,}{0.07000000000}{,}{0.07010000000}{,}{0.07020000000}{,}{0.07030000000}{,}{0.07040000000}{,}{0.07050000000}{,}{0.07060000000}{,}{0.07070000000}{,}{0.07080000000}{,}{0.07090000000}{,}{0.07100000000}{,}{0.07110000000}{,}{0.07120000000}{,}{0.07130000000}{,}{0.07140000000}{,}{0.07150000000}{,}{0.07160000000}{,}{0.07170000000}{,}{0.07180000000}{,}{0.07190000000}{,}{0.07200000000}{,}{0.07210000000}{,}{0.07220000000}{,}{0.07230000000}{,}{0.07240000000}{,}{0.07250000000}{,}{0.07260000000}{,}{0.07270000000}{,}{0.07280000000}{,}{0.07290000000}{,}{0.07300000000}{,}{0.07310000000}{,}{0.07320000000}{,}{0.07330000000}{,}{0.07340000000}{,}{0.07350000000}{,}{0.07360000000}{,}{0.07370000000}{,}{0.07380000000}{,}{0.07390000000}{,}{0.07400000000}{,}{0.07410000000}{,}{0.07420000000}{,}{0.07430000000}{,}{0.07440000000}{,}{0.07450000000}{,}{0.07460000000}{,}{0.07470000000}{,}{0.07480000000}{,}{0.07490000000}{,}{0.07500000000}\right]$ (3.13)
 > $\mathrm{Plot_ZR}:=\mathrm{Statistics}:-\mathrm{PointPlot}\left(\mathrm{ZR},\mathrm{xcoords}=\left[\mathrm{seq}\left(\frac{i}{100},i=1..200\right)\right]\right):$
 > ${\mathrm{plots}}_{\mathrm{display}}\left(\mathrm{Plot_ZR},\mathrm{Plot_F},\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right);$

Next consider the case of simply compounded interest.

 > $\mathrm{ZRS}:=\left[\mathrm{seq}\left(\mathrm{ZeroRate}\left(\mathrm{ZC},\frac{i}{100},\mathrm{compounding}=\mathrm{Simple}\right),i=1..200\right)\right];$
 ${\mathrm{ZRS}}{:=}\left[{0.01060056182}{,}{0.01120125449}{,}{0.01180208885}{,}{0.01240307571}{,}{0.01300422592}{,}{0.01360555031}{,}{0.01420705974}{,}{0.01480876506}{,}{0.01541067713}{,}{0.01601280683}{,}{0.01661516503}{,}{0.01721776262}{,}{0.01782061049}{,}{0.01842371956}{,}{0.01902710074}{,}{0.01963076495}{,}{0.02023472314}{,}{0.02083898624}{,}{0.02144356523}{,}{0.02204847106}{,}{0.02265371474}{,}{0.02325930726}{,}{0.02386525962}{,}{0.02447158286}{,}{0.02507828802}{,}{0.02568538614}{,}{0.02629288830}{,}{0.02690080559}{,}{0.02750914911}{,}{0.02811792997}{,}{0.02872715932}{,}{0.02933684830}{,}{0.02994700810}{,}{0.03055764989}{,}{0.03116878489}{,}{0.03178042432}{,}{0.03239257944}{,}{0.03300526151}{,}{0.03361848182}{,}{0.03423225168}{,}{0.03484658243}{,}{0.03546148541}{,}{0.03607697201}{,}{0.03669305363}{,}{0.03730974168}{,}{0.03792704762}{,}{0.03854498292}{,}{0.03916355907}{,}{0.03978278760}{,}{0.04040268005}{,}{0.04081907405}{,}{0.04123588351}{,}{0.04165311365}{,}{0.04207076971}{,}{0.04248885694}{,}{0.04290738059}{,}{0.04332634593}{,}{0.04374575824}{,}{0.04416562281}{,}{0.04458594495}{,}{0.04500672997}{,}{0.04542798320}{,}{0.04584970999}{,}{0.04627191567}{,}{0.04669460562}{,}{0.04711778521}{,}{0.04754145985}{,}{0.04796563492}{,}{0.04839031584}{,}{0.04881550806}{,}{0.04924121700}{,}{0.04966744814}{,}{0.05009420693}{,}{0.05052149886}{,}{0.05094932944}{,}{0.05137770418}{,}{0.05180662860}{,}{0.05223610825}{,}{0.05266614868}{,}{0.05309675547}{,}{0.05352793421}{,}{0.05395969049}{,}{0.05439202994}{,}{0.05482495819}{,}{0.05525848088}{,}{0.05569260369}{,}{0.05612733229}{,}{0.05656267239}{,}{0.05699862969}{,}{0.05743520992}{,}{0.05787241884}{,}{0.05831026220}{,}{0.05874874579}{,}{0.05918787541}{,}{0.05962765686}{,}{0.06006809599}{,}{0.06050919865}{,}{0.06095097070}{,}{0.06139341803}{,}{0.06183654655}{,}{0.06206780301}{,}{0.06229936591}{,}{0.06253123685}{,}{0.06276341743}{,}{0.06299590925}{,}{0.06322871393}{,}{0.06346183309}{,}{0.06369526833}{,}{0.06392902129}{,}{0.06416309359}{,}{0.06439748686}{,}{0.06463220274}{,}{0.06486724286}{,}{0.06510260887}{,}{0.06533830243}{,}{0.06557432518}{,}{0.06581067878}{,}{0.06604736489}{,}{0.06628438518}{,}{0.06652174131}{,}{0.06675943498}{,}{0.06699746785}{,}{0.06723584160}{,}{0.06747455794}{,}{0.06771361854}{,}{0.06795302512}{,}{0.06819277937}{,}{0.06843288300}{,}{0.06867333772}{,}{0.06891414526}{,}{0.06915530732}{,}{0.06939682565}{,}{0.06963870196}{,}{0.06988093800}{,}{0.07012353551}{,}{0.07036649623}{,}{0.07060982192}{,}{0.07085351432}{,}{0.07109757521}{,}{0.07134200635}{,}{0.07158680951}{,}{0.07183198646}{,}{0.07207753899}{,}{0.07232346888}{,}{0.07256977793}{,}{0.07281646793}{,}{0.07306354069}{,}{0.07331099800}{,}{0.07355884169}{,}{0.07380707357}{,}{0.07394452145}{,}{0.07408215440}{,}{0.07421997297}{,}{0.07435797770}{,}{0.07449616913}{,}{0.07463454782}{,}{0.07477311431}{,}{0.07491186914}{,}{0.07505081287}{,}{0.07518994605}{,}{0.07532926924}{,}{0.07546878298}{,}{0.07560848783}{,}{0.07574838435}{,}{0.07588847310}{,}{0.07602875464}{,}{0.07616922952}{,}{0.07630989832}{,}{0.07645076158}{,}{0.07659181989}{,}{0.07673307380}{,}{0.07687452389}{,}{0.07701617071}{,}{0.07715801485}{,}{0.07730005687}{,}{0.07744229735}{,}{0.07758473686}{,}{0.07772737598}{,}{0.07787021528}{,}{0.07801325535}{,}{0.07815649677}{,}{0.07829994010}{,}{0.07844358595}{,}{0.07858743489}{,}{0.07873148752}{,}{0.07887574441}{,}{0.07902020615}{,}{0.07916487334}{,}{0.07930974657}{,}{0.07945482644}{,}{0.07960011352}{,}{0.07974560843}{,}{0.07989131177}{,}{0.08003722412}{,}{0.08018334609}{,}{0.08032967828}{,}{0.08047622130}{,}{0.08062297574}{,}{0.08076994223}{,}{0.08091712136}\right]$ (3.14)
 > $\mathrm{ZR1}:=\mathrm{ZeroRate}\left(\mathrm{ZC},0.5,\mathrm{compounding}=\mathrm{Continuous}\right);$
 ${\mathrm{ZR1}}{:=}{0.04000000000}$ (3.15)
 > $\mathrm{ZR2}:=\mathrm{ZeroRate}\left(\mathrm{ZC},0.5,\mathrm{compounding}=\mathrm{Simple}\right);$
 ${\mathrm{ZR2}}{:=}{0.04040268005}$ (3.16)
 > $\mathrm{ZR2}=2\left({ⅇ}^{0.5\mathrm{ZR1}}-1\right);$
 ${0.04040268005}{=}{0.040402680}$ (3.17)
 > $\mathrm{Plot_ZRS}:=\mathrm{Statistics}:-\mathrm{PointPlot}\left(\mathrm{ZRS},\mathrm{xcoords}=\left[\mathrm{seq}\left(\frac{i}{100},i=1..200\right)\right]\right):$

You can see that the simple rates are a little larger than corresponding continuous compounding rates.

 > ${\mathrm{plots}}_{\mathrm{display}}\left(\mathrm{Plot_ZRS},\mathrm{Plot_F},\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true},\mathrm{axes}=\mathrm{BOXED}\right);$

The forward rate is defined as the rate of interest implied by current zero rates for periods of time in the future.

 > $\mathrm{ForwardRate}\left(\mathrm{ZC},1,2\right);$
 ${0.09000000000}$ (3.18)

Set compounding = Continuous so that the input interest rates are continuous compounding.

 > ZR := [seq(ZeroRate(ZC, i/100, compounding = Continuous), i = 1..200)];
 ${\mathrm{ZR}}{:=}\left[{0.01060000000}{,}{0.01120000000}{,}{0.01180000000}{,}{0.01240000000}{,}{0.01300000000}{,}{0.01360000000}{,}{0.01420000000}{,}{0.01480000000}{,}{0.01540000000}{,}{0.01600000000}{,}{0.01660000000}{,}{0.01720000000}{,}{0.01780000000}{,}{0.01840000000}{,}{0.01900000000}{,}{0.01960000000}{,}{0.02020000000}{,}{0.02080000000}{,}{0.02140000000}{,}{0.02200000000}{,}{0.02260000000}{,}{0.02320000000}{,}{0.02380000000}{,}{0.02440000000}{,}{0.02500000000}{,}{0.02560000000}{,}{0.02620000000}{,}{0.02680000000}{,}{0.02740000000}{,}{0.02800000000}{,}{0.02860000000}{,}{0.02920000000}{,}{0.02980000000}{,}{0.03040000000}{,}{0.03100000000}{,}{0.03160000000}{,}{0.03220000000}{,}{0.03280000000}{,}{0.03340000000}{,}{0.03400000000}{,}{0.03460000000}{,}{0.03520000000}{,}{0.03580000000}{,}{0.03640000000}{,}{0.03700000000}{,}{0.03760000000}{,}{0.03820000000}{,}{0.03880000000}{,}{0.03940000000}{,}{0.04000000000}{,}{0.04040000000}{,}{0.04080000000}{,}{0.04120000000}{,}{0.04160000000}{,}{0.04200000000}{,}{0.04240000000}{,}{0.04280000000}{,}{0.04320000000}{,}{0.04360000000}{,}{0.04400000000}{,}{0.04440000000}{,}{0.04480000000}{,}{0.04520000000}{,}{0.04560000000}{,}{0.04600000000}{,}{0.04640000000}{,}{0.04680000000}{,}{0.04720000000}{,}{0.04760000000}{,}{0.04800000000}{,}{0.04840000000}{,}{0.04880000000}{,}{0.04920000000}{,}{0.04960000000}{,}{0.05000000000}{,}{0.05040000000}{,}{0.05080000000}{,}{0.05120000000}{,}{0.05160000000}{,}{0.05200000000}{,}{0.05240000000}{,}{0.05280000000}{,}{0.05320000000}{,}{0.05360000000}{,}{0.05400000000}{,}{0.05440000000}{,}{0.05480000000}{,}{0.05520000000}{,}{0.05560000000}{,}{0.05600000000}{,}{0.05640000000}{,}{0.05680000000}{,}{0.05720000000}{,}{0.05760000000}{,}{0.05800000000}{,}{0.05840000000}{,}{0.05880000000}{,}{0.05920000000}{,}{0.05960000000}{,}{0.06000000000}{,}{0.06020000000}{,}{0.06040000000}{,}{0.06060000000}{,}{0.06080000000}{,}{0.06100000000}{,}{0.06120000000}{,}{0.06140000000}{,}{0.06160000000}{,}{0.06180000000}{,}{0.06200000000}{,}{0.06220000000}{,}{0.06240000000}{,}{0.06260000000}{,}{0.06280000000}{,}{0.06300000000}{,}{0.06320000000}{,}{0.06340000000}{,}{0.06360000000}{,}{0.06380000000}{,}{0.06400000000}{,}{0.06420000000}{,}{0.06440000000}{,}{0.06460000000}{,}{0.06480000000}{,}{0.06500000000}{,}{0.06520000000}{,}{0.06540000000}{,}{0.06560000000}{,}{0.06580000000}{,}{0.06600000000}{,}{0.06620000000}{,}{0.06640000000}{,}{0.06660000000}{,}{0.06680000000}{,}{0.06700000000}{,}{0.06720000000}{,}{0.06740000000}{,}{0.06760000000}{,}{0.06780000000}{,}{0.06800000000}{,}{0.06820000000}{,}{0.06840000000}{,}{0.06860000000}{,}{0.06880000000}{,}{0.06900000000}{,}{0.06920000000}{,}{0.06940000000}{,}{0.06960000000}{,}{0.06980000000}{,}{0.07000000000}{,}{0.07010000000}{,}{0.07020000000}{,}{0.07030000000}{,}{0.07040000000}{,}{0.07050000000}{,}{0.07060000000}{,}{0.07070000000}{,}{0.07080000000}{,}{0.07090000000}{,}{0.07100000000}{,}{0.07110000000}{,}{0.07120000000}{,}{0.07130000000}{,}{0.07140000000}{,}{0.07150000000}{,}{0.07160000000}{,}{0.07170000000}{,}{0.07180000000}{,}{0.07190000000}{,}{0.07200000000}{,}{0.07210000000}{,}{0.07220000000}{,}{0.07230000000}{,}{0.07240000000}{,}{0.07250000000}{,}{0.07260000000}{,}{0.07270000000}{,}{0.07280000000}{,}{0.07290000000}{,}{0.07300000000}{,}{0.07310000000}{,}{0.07320000000}{,}{0.07330000000}{,}{0.07340000000}{,}{0.07350000000}{,}{0.07360000000}{,}{0.07370000000}{,}{0.07380000000}{,}{0.07390000000}{,}{0.07400000000}{,}{0.07410000000}{,}{0.07420000000}{,}{0.07430000000}{,}{0.07440000000}{,}{0.07450000000}{,}{0.07460000000}{,}{0.07470000000}{,}{0.07480000000}{,}{0.07490000000}{,}{0.07500000000}\right]$ (3.19)
 > $\mathrm{Plot_ZR}:=\mathrm{Statistics}:-\mathrm{PointPlot}\left(\mathrm{ZR},\mathrm{xcoords}=\left[\mathrm{seq}\left(\frac{i}{100},i=1..200\right)\right]\right):$

Construct a yield term structure based on a piecewise interpolation of the given zero rates.

 > $\mathrm{IZC}:=\mathrm{ZeroCurve}\left(\left["Jan-01-2006","July-01-2006","Jan-01-2007","Jan-01-2008","July-01-2008"\right],\mathrm{rates}\right):$
 > $\mathrm{IZR}:=\left[\mathrm{seq}\left(\mathrm{ZeroRate}\left(\mathrm{IZC},\frac{i}{100},\mathrm{compounding}=\mathrm{Continuous}\right),i=1..200\right)\right];$
 ${\mathrm{IZR}}{:=}\left[{0.01028350086}{,}{0.01057503900}{,}{0.01087484226}{,}{0.01118314498}{,}{0.01150018810}{,}{0.01182621942}{,}{0.01216149376}{,}{0.01250627316}{,}{0.01286082708}{,}{0.01322543264}{,}{0.01360037479}{,}{0.01398594659}{,}{0.01438244938}{,}{0.01479019306}{,}{0.01520949630}{,}{0.01564068683}{,}{0.01608410165}{,}{0.01654008732}{,}{0.01700900022}{,}{0.01749120684}{,}{0.01798708406}{,}{0.01849701944}{,}{0.01902141154}{,}{0.01956067019}{,}{0.02011521688}{,}{0.02068548501}{,}{0.02127192029}{,}{0.02187498106}{,}{0.02249513866}{,}{0.02313287778}{,}{0.02378869685}{,}{0.02446310846}{,}{0.02515663969}{,}{0.02586983259}{,}{0.02660324457}{,}{0.02735744885}{,}{0.02813303488}{,}{0.02893060884}{,}{0.02975079409}{,}{0.03059423167}{,}{0.03146158077}{,}{0.03235351930}{,}{0.03327074435}{,}{0.03421397282}{,}{0.03518394190}{,}{0.03618140968}{,}{0.03720715576}{,}{0.03826198183}{,}{0.03934671231}{,}{0.04013243564}{,}{0.04045653022}{,}{0.04078324208}{,}{0.04111259233}{,}{0.04144460230}{,}{0.04177929345}{,}{0.04211668744}{,}{0.04245680611}{,}{0.04279967144}{,}{0.04314530563}{,}{0.04349373103}{,}{0.04384497018}{,}{0.04419904581}{,}{0.04455598082}{,}{0.04491579831}{,}{0.04527852155}{,}{0.04564417400}{,}{0.04601277933}{,}{0.04638436138}{,}{0.04675894418}{,}{0.04713655198}{,}{0.04751720920}{,}{0.04790094046}{,}{0.04828777059}{,}{0.04867772462}{,}{0.04907082777}{,}{0.04946710548}{,}{0.04986658338}{,}{0.05026928731}{,}{0.05067524333}{,}{0.05108447770}{,}{0.05149701689}{,}{0.05191288759}{,}{0.05233211672}{,}{0.05275473138}{,}{0.05318075892}{,}{0.05361022689}{,}{0.05404316309}{,}{0.05447959553}{,}{0.05491955243}{,}{0.05536306225}{,}{0.05581015370}{,}{0.05626085569}{,}{0.05671519738}{,}{0.05717320816}{,}{0.05763491767}{,}{0.05810035578}{,}{0.05856955258}{,}{0.05904253845}{,}{0.05951934397}{,}{0.06000000000}{,}{0.06009256173}{,}{0.06018526626}{,}{0.06027811380}{,}{0.06037110458}{,}{0.06046423881}{,}{0.06055751672}{,}{0.06065093853}{,}{0.06074450446}{,}{0.06083821474}{,}{0.06093206958}{,}{0.06102606921}{,}{0.06112021386}{,}{0.06121450374}{,}{0.06130893908}{,}{0.06140352010}{,}{0.06149824704}{,}{0.06159312011}{,}{0.06168813954}{,}{0.06178330556}{,}{0.06187861839}{,}{0.06197407826}{,}{0.06206968539}{,}{0.06216544002}{,}{0.06226134236}{,}{0.06235739266}{,}{0.06245359113}{,}{0.06254993800}{,}{0.06264643351}{,}{0.06274307789}{,}{0.06283987135}{,}{0.06293681414}{,}{0.06303390648}{,}{0.06313114861}{,}{0.06322854075}{,}{0.06332608314}{,}{0.06342377600}{,}{0.06352161958}{,}{0.06361961410}{,}{0.06371775979}{,}{0.06381605689}{,}{0.06391450564}{,}{0.06401310626}{,}{0.06411185900}{,}{0.06421076407}{,}{0.06430982173}{,}{0.06440903221}{,}{0.06450839573}{,}{0.06460791255}{,}{0.06470758289}{,}{0.06480740698}{,}{0.06490738508}{,}{0.06500751741}{,}{0.06510780422}{,}{0.06520824574}{,}{0.06530884221}{,}{0.06540959387}{,}{0.06551050096}{,}{0.06561156371}{,}{0.06571278238}{,}{0.06581415719}{,}{0.06591568840}{,}{0.06601737624}{,}{0.06611922095}{,}{0.06622122278}{,}{0.06632338196}{,}{0.06642569875}{,}{0.06652817337}{,}{0.06663080609}{,}{0.06673359714}{,}{0.06683654676}{,}{0.06693965520}{,}{0.06704292271}{,}{0.06714634952}{,}{0.06724993590}{,}{0.06735368207}{,}{0.06745758830}{,}{0.06756165482}{,}{0.06766588188}{,}{0.06777026973}{,}{0.06787481863}{,}{0.06797952881}{,}{0.06808440052}{,}{0.06818943402}{,}{0.06829462956}{,}{0.06839998738}{,}{0.06850550773}{,}{0.06861119087}{,}{0.06871703705}{,}{0.06882304652}{,}{0.06892921952}{,}{0.06903555632}{,}{0.06914205716}{,}{0.06924872231}{,}{0.06935555200}{,}{0.06946254650}{,}{0.06956970606}{,}{0.06967703094}{,}{0.06978452138}{,}{0.06989217765}{,}{0.07000000000}\right]$ (3.20)
 > $\mathrm{Plot_IZR}:=\mathrm{Statistics}:-\mathrm{PointPlot}\left(\mathrm{IZR},\mathrm{xcoords}=\left[\mathrm{seq}\left(\frac{i}{100},i=1..200\right)\right]\right):\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$

You will get the same results with the function CurveFitting:-Spline

 >

Construct yield term structures based on piecewise interpolation of the given discount rates and forward rates.

 > $\mathrm{IDC}:=\mathrm{DiscountCurve}\left(\left["Jan-01-2006","July-01-2006","Jan-01-2007","Jan-01-2008","July-01-2008"\right],\mathrm{rates}\right);$
 ${\mathrm{IDC}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (3.21)
 > $\mathrm{IFC}:=\mathrm{ForwardCurve}\left(\left["Jan-01-2006","July-01-2006","Jan-01-2007","Jan-01-2008","July-01-2008"\right],\mathrm{rates}\right);$
 ${\mathrm{IFC}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (3.22)
 >
 >

References

 • John C. Hull, Options, Futures, and Other Derivatives, Prentice Hall, 2002