Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Finance/BermudanOption

Finance

 BermudanOption
 create a new Bermudan option

 Calling Sequence BermudanOption(payoff, exercisetimes, opts) BermudanOption(payoff, exercisedates, opts)

Parameters

 payoff - payoff function exercisedates - list of dates given in a format recognized by ParseDate or a date data structure; dates when the option can be exercised exercisetimes - list of non-negative constants; times when the option can be exercised opts - (optional) equation(s) of the form option = value where option is one of referencedate or daycounter; specify options for the BermudanOption command

Options

 • referencedate = a string containing a date specification in a format recognized by ParseDate or a date data structure -- This option provides the evaluation date. It is set to the global evaluation date by default.
 • daycounter = a name representing a supported day counter (e.g. ISDA, Simple) 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. This option is used only if one of earliestexercise or latestexercise is specified as a date.

Description

 • The BermudanOption command creates a new Bermudan-style option with the specified payoff and maturity. This option can be exercised at any time or date given in the exercisetimes or exercisedates list.
 • The parameter payoff is the payoff function for the option. It can be either an algebraic expression or a procedure. A procedure defining a payoff function must accept one parameter (the value of the underlying) and return the corresponding payoff. This procedure will be called with floating-point arguments only and must return floating-point values. If payoff is given as an algebraic expression it must depend on a single variable. This expression will be converted to a Maple procedure using the unapply function.
 • The parameter exercisedates specifies the dates when the option can be exercised. It has to be given as a list of dates in any of the formats recognized by the ParseDate command. The exercise times will be computed by converting the period between referencedate and the corresponding exercise date to a fraction of the year according to the day count convention specified by daycounter.
 • The LatticePrice command can be used to price a Bermudan-style option using any given binomial or trinomial tree.

Examples

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

Set the global evaluation date to January 3, 2006.

 > $\mathrm{SetEvaluationDate}\left("January 3, 2006"\right):$
 > $\mathrm{Settings}\left(\mathrm{daycounter}=\mathrm{Thirty360European}\right)$
 ${\mathrm{Historical}}$ (1)

Construct a binomial tree approximating a Black-Scholes process with an initial value of 100, risk-free rate of 10% and constant volatility of 40%. We will assume that no dividend is paid. Build the tree by subdividing the time period 0..0.6 into 1000 equal time steps.

 > $T≔\mathrm{BlackScholesBinomialTree}\left(100,0.1,0.0,0.4,0.6,1000\right):$

Consider a Bermudan put option with a strike price of 100 that can be exercised in 3 months or in 6 months.

 > $\mathrm{P1}≔S→\mathrm{max}\left(100-S,0\right)$
 ${\mathrm{P1}}{≔}{S}{↦}{\mathrm{max}}{}\left({100}{-}{S}{,}{0}\right)$ (2)
 > $\mathrm{plot}\left(\mathrm{P1},80..120,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right)$
 > $\mathrm{A1}≔\mathrm{BermudanOption}\left(\mathrm{P1},\left[0.25,0.5\right]\right):$
 > $\mathrm{Maturity}≔\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months},\mathrm{output}=\mathrm{formatted}\right)$
 ${\mathrm{Maturity}}{≔}{"July 3, 2006"}$ (3)
 > $\mathrm{A2}≔\mathrm{BermudanOption}\left(\mathrm{P1},\left[\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),3,\mathrm{Months}\right),\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months}\right)\right]\right)$
 ${\mathrm{A2}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (4)

Calculate the price of this option using the tree constructed above. Use the risk-free rate as the discount rate.

 > $\mathrm{LatticePrice}\left(\mathrm{A1},T,0.1\right)$
 ${8.955803314}$ (5)
 > $\mathrm{LatticePrice}\left(\mathrm{A2},T,0.1\right)$
 ${8.955803314}$ (6)

Consider a Bermudan call option with a strike price of 100 that can be exercised in 3 months or in 6 months.

 > $\mathrm{P2}≔S→\mathrm{max}\left(S-100,0\right)$
 ${\mathrm{P2}}{≔}{S}{↦}{\mathrm{max}}{}\left({S}{-}{100}{,}{0}\right)$ (7)
 > $\mathrm{plot}\left(\mathrm{P2},80..120,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right)$
 > $\mathrm{A3}≔\mathrm{BermudanOption}\left(\mathrm{P2},\left[0.25,0.5\right]\right):$
 > $\mathrm{Maturity}≔\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months},\mathrm{output}=\mathrm{formatted}\right)$
 ${\mathrm{Maturity}}{≔}{"July 3, 2006"}$ (8)
 > $\mathrm{A4}≔\mathrm{BermudanOption}\left(\mathrm{P2},\left[\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),3,\mathrm{Months}\right),\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months}\right)\right]\right)$
 ${\mathrm{A4}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (9)

Calculate the price of this option using the tree constructed above. Use the risk-free rate as the discount rate.

 > $\mathrm{LatticePrice}\left(\mathrm{A3},T,0.1\right)$
 ${13.58412136}$ (10)
 > $\mathrm{LatticePrice}\left(\mathrm{A4},T,0.1\right)$
 ${13.58412136}$ (11)

Consider a more complicated payoff function.

 > $\mathrm{P3}≔S→\mathrm{piecewise}\left(S<90,0,S<100,S-90,S<110,110-S,0\right)$
 ${\mathrm{P3}}{≔}{S}{↦}\left\{\begin{array}{cc}{0}& {S}{<}{90}\\ {S}{-}{90}& {S}{<}{100}\\ {110}{-}{S}& {S}{<}{110}\\ {0}& {\mathrm{otherwise}}\end{array}\right\$ (12)
 > $\mathrm{plot}\left(\mathrm{P3},80..120,\mathrm{thickness}=2,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{color}=\mathrm{blue}\right)$
 > $\mathrm{A5}≔\mathrm{BermudanOption}\left(\mathrm{P3},\left[0.25,0.5\right]\right):$
 > $\mathrm{Maturity}≔\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months},\mathrm{output}=\mathrm{formatted}\right)$
 ${\mathrm{Maturity}}{≔}{"July 3, 2006"}$ (13)
 > $\mathrm{A6}≔\mathrm{BermudanOption}\left(\mathrm{P3},\left[\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),3,\mathrm{Months}\right),\mathrm{AdvanceDate}\left(\mathrm{EvaluationDate}\left(\right),6,\mathrm{Months}\right)\right]\right)$
 ${\mathrm{A6}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (14)

Calculate the price of this option using the tree constructed above. Use the risk-free rate as the discount rate.

 > $\mathrm{LatticePrice}\left(\mathrm{A5},T,0.1\right)$
 ${2.599601139}$ (15)
 > $\mathrm{LatticePrice}\left(\mathrm{A6},T,0.1\right)$
 ${2.599601139}$ (16)

Move the earliest exercise date and observe how the price of a Bermudan-style option approaches the price of the corresponding European-style option.

 > $E≔\mathrm{EuropeanOption}\left(\mathrm{P3},0.5\right):$
 > $A≔\left[\mathrm{seq}\left(\mathrm{BermudanOption}\left(\mathrm{P3},\left[0.1i,0.5\right]\right),i=0..5\right)\right]:$
 > $\mathrm{LatticePrice}\left(E,T,0.1\right)$
 ${1.336569904}$ (17)
 > $\mathrm{map}\left(\mathrm{LatticePrice},A,T,0.1\right)$
 $\left[{10.}{,}{3.505646277}{,}{2.824373468}{,}{2.441096215}{,}{2.102863049}{,}{1.336569904}\right]$ (18)

References

 Glasserman, P., Monte Carlo Methods in Financial Engineering, Springer-Verlag, 2004.
 Hull, J., Options, Futures and Other Derivatives, 5th. edition. Prentice Hall, 2003.
 Jackel, P., Monte Carlo Methods in Finance, John Wiley & Sons, 2002.
 Joshi, M., The Concepts and Practice of Mathematical Finance, Cambridge University Press, 2003.
 Wilmott, P., Paul Wilmott on Quantitative Finance, John Wiley and Sons Ltd, 2000.
 Wilmott, P., Howison, S., and Dewyne, J., The Mathematics of Financial Derivatives, New York: Cambridge University Press, 1995.

Compatibility

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