Learn R Programming

QFRM (version 1.0.1)

CompoundLT: Compound option valuation via lattice tree (LT) model

Description

CompoundLT prices a compound option using the binomial tree (BT) method. The inputs it takes are two OptPx objects. It pulls the S from the o2 input which should be the option with the greater time to maturity.

Usage

CompoundLT(o1 = OptPx(Opt(Style = "Compound")), o2 = OptPx(Opt(Style = "Compound")))

Arguments

o1
The OptPx object with the shorter time to maturity
o2
The OptPx object with the longer time to maturity

Value

User-supplied o1 option with fields o2 and PxLT, as the second option and calculated price, respectively.

References

Hull, John C., Options, Futures and Other Derivatives, 9ed, 2014. Prentice Hall. ISBN 978-0-13-345631-8, http://www-2.rotman.utoronto.ca/~hull/ofod/index.html.

Examples

Run this code
(o = CompoundLT())$PxLT # Uses default arguments

#Put option on a Call:
o = Opt(Style="Compound", S0=50, ttm=.5, Right="P", K = 50)
o1 = OptPx(o, r = .1, vol = .4, NSteps = 5)
o = Opt(Style="Compound", S0=50, ttm=.75, Right="C", K = 60)
o2 = OptPx(o, r = .1, vol = .4, NSteps = 5)
(o = CompoundLT(o1, o2))$PxLT

#Call option on a Call:
o = Opt(Style = "Compound", S0 = 50, ttm= .5, Right = "Call", K = 50)
o1 = OptPx(o, r = .1, vol = .4, NSteps = 5)
o = Opt(Style = "Compound", S0 = 50, ttm= .75, Right = "Call", K = 5)
o2 = OptPx(o, r = .1, vol = .4, NSteps = 5)
(o = CompoundLT(o1, o2))$PxLT

#Put option on a Put:
o = Opt(Style = "Compound", S0 = 50, ttm= .5, Right = "Put", K = 40)
o1 = OptPx(o, r = .1, vol = .4, NSteps = 5)
o = Opt(Style = "Compound", S0 = 50, ttm= .75, Right = "Put", K = 50)
o2 = OptPx(o, r = .1, vol = .4, NSteps = 5)
(o = CompoundLT(o1, o2))$PxMC

#Call option on a Put:
o = Opt(Style = "Compound", S0 = 50, ttm= .5, Right = "Call", K = 30)
o1 = OptPx(o, r = .1, vol = .4, NSteps = 5)
o = Opt(Style = "Compound", S0 = 50, ttm= .75, Right = "Put", K = 80)
o2 = OptPx(o, r = .1, vol = .4, NSteps = 5)
(o = CompoundLT(o1, o2))$PxLT

Run the code above in your browser using DataLab