BOPM(o = OptPx(), IncBT = TRUE)
OptPx
objectTRUE
or FALSE
indicating whether to include a list of all option tree values (underlying and derivative prices) in the returned OptPx
object.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
)#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.