Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Lattice Methods : Finance/ShortRateTree

Finance

 ShortRateTree
 return a trinomial tree approximating the evolution of the instantaneous rate in the given model

 Calling Sequence ShortRateTree(M, G) ShortRateTree(M, T, N) ShortRateTree(X, G) ShortRateTree(X, T, N)

Parameters

 M - short-rate model data structure; short-rate model G - time grid data structure; time grid T - positive; stopping time N - posint; number of times steps X - stochastic process; process to be approximated

Description

 • The ShortRateTree(M, G) calling sequence returns a trinomial tree approximating the stochastic process that represents the instantaneous spot rate in the given short-rate model. The constructed tree will be based on the time discretization given by G.
 • Assume that the time grid G consists of $N$ points ${T}_{1}$, ${T}_{1}$, ..., ${T}_{N}$. Then the resulting trinomial tree will have $N$ levels, each level representing possible states of the discretized process at time ${T}_{i}$, $i=1..N$. At level $i$, $i=1..N$ the tree has $i$ nodes, ${S}_{i,1}$, ..., ${S}_{i,n}$, where $n$ is the number of nodes at level $i$ (see GetSize). Each node ${S}_{i,j}$ has three descendants at level $i+1$, ${S}_{i+1,j}$ (the upper descendant), ${S}_{i+1,j+1}$ (the middle descendant) and ${S}_{i+1,j+2}$ (the lower descendant). The initial state of the underlying process and the transition probabilities (i.e. the probability of going from ${S}_{i,j}$ to ${S}_{i+1,j}$, the probability of going from ${S}_{i,j}$ to ${S}_{i+1,j+1}$, and the probability of going from ${S}_{i,j}$ to ${S}_{i+1,j+2}$) will be calculated based on the given model.
 • The ShortRateTree(M, T, N) calling sequence is similar except that in this case a uniform time grid with step size $\frac{T}{N}$ is used instead of G.
 • The ShortRateTree(X, G) and ShortRateTree(X, T, N) commands construct a trinomial tree approximating an Ito process X. This tree is constructed using the procedure proposed by Hull and White [4], [5] (see also [1] and [2]). This construction requires that the diffusion term in the corresponding SDE is independent of the state variable X.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

Construct a trinomial for the Vasicek model.

 > $M≔\mathrm{VasicekModel}\left(0.05,0.03,0.5,0.03\right)$
 ${M}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)
 > $T≔\mathrm{ShortRateTree}\left(M,3,20\right)$
 ${T}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (2)
 > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$
 > $\mathrm{GetSize}\left(T,1\right)$
 ${1}$ (3)
 > $\mathrm{GetSize}\left(T,2\right)$
 ${3}$ (4)
 > $\mathrm{GetSize}\left(T,3\right)$
 ${5}$ (5)
 > $\mathrm{GetSize}\left(T,10\right)$
 ${15}$ (6)
 > $\mathrm{GetSize}\left(T,11\right)$
 ${15}$ (7)

Construct a trinomial tree approximating a given Ito process.

 > $X≔\mathrm{ItoProcess}\left(0.,\mathrm{sin}\left(t\right),0.05,x,t\right)$
 ${X}{≔}{\mathrm{_X1}}$ (8)
 > $T≔\mathrm{ShortRateTree}\left(X,3.0,20\right)$
 ${T}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (9)
 > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true}\right)$
 > $\mathrm{PathPlot}\left(X\left(t\right),t=0..3,\mathrm{timesteps}=20,\mathrm{replications}=10,\mathrm{thickness}=2,\mathrm{gridlines}=\mathrm{true},\mathrm{axes}=\mathrm{BOXED}\right)$

References

 Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice, New York: Springer-Verlag, 2001.
 Glasserman, P., Monte Carlo Methods in Financial Engineering, New York: Springer-Verlag, 2004.
 Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
 Hull, J., and White, A., Numerical Procedures for Implementing Term Structure Models I: Single-Factor Models, Journal of Derivatives, 1994, 7-16.
 Hull, J., and White, A., Using Hull-White Interest Rate Trees, Journal of Derivatives, 1996, 26-36.

Compatibility

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