Description Usage Arguments Value Author(s) References See Also
Compute option price via binomial option pricing model (recombining symmetric binomial tree). If no tree requested for European option, vectorized algorithm is used.
1 |
o |
An |
IncBT |
Values |
An original OptPx
object with PxBT
field as the binomial-tree-based price of an option
and (an optional) the fullly-generated binomial tree in BT
field.
IncBT = FALSE
: option price value (type double
, class numeric
)
IncBT = TRUE
: binomial tree as a list
(of length (o$NSteps+1
) of numeric matrices (2 x i
)
Each matrix is a set of possible i outcomes at time step i columns: (underlying prices, option prices)
Oleg Melnikov, Department of Statistics, Rice University, Spring 2015
Hull, J.C., Options, Futures and Other Derivatives, 9ed, 2014. Prentice Hall. ISBN 978-0-13-345631-8, http://www-2.rotman.utoronto.ca/~hull/ofod. http://amzn.com/0133456315
#See Fig.13.11, Hull/9e/p291. #Create an option and price it o = Opt(Style='Eu', Right='C', S0 = 808, ttm = .5, K = 800) o = BOPM( OptPx(o, r=0.05, q=0.02, vol=0.2, NSteps=2), IncBT=TRUE) o$PxBT #print added calculated price to PxBT field
#Fig.13.11, Hull/9e/p291: o = Opt(Style='Eu', Right='C', S0=810, ttm=.5, K=800) BOPM( OptPx(o, r=0.05, q=0.02, vol=0.2, NSteps=2), IncBT=TRUE)$PxBT
#DerivaGem diplays up to 10 steps: o = Opt(Style='Am', Right='C', 810, .5, 800) BOPM( OptPx(o, r=0.05, q=0.02, vol=0.2, NSteps=20), IncBT=TRUE)
#DerivaGem computes up to 500 steps: o = Opt(Style='American', Right='Put', 810, 0.5, 800) BOPM( OptPx(o, r=0.05, q=0.02, vol=0.2, NSteps=1000), IncBT=FALSE)
BOPM_Eu
for European option via vectorized approach.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.