GapBS: Gap option valuation via Black-Scholes (BS) model

Description Usage Arguments Value Author(s) References Examples

View source: R/Gap.R

Description

S3 object constructor for price of gap option using BS model

Usage

1
2
3
4
GapBS(o = OptPx(Opt(Style = "Gap", Right = "Put", S0 = 5e+05, K = 4e+05, ttm =
  1, ContrSize = 1, SName =
  "Insurance coverage example #26.1, p.601, OFOD, J.C.Hull, 9ed."), r = 0.05, q
  = 0, vol = 0.2), K2 = 350000)

Arguments

o

An object of class OptPx

K2

Strike price that determine if the option pays off.

Value

An original OptPx object with PxBS field as the price of the option and user-supplied K2 parameter

Author(s)

Tong Liu, Department of Statistics, Rice University, Spring 2015

References

Hull, John C., Options, Futures and Other Derivatives, 9ed, 2014. Prentice Hall. ISBN 978-0-13-345631-8. http://www.mathworks.com/help/fininst/gapbybls.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#See J.C.Hull, OFOD'2014, 9-ed, Example 26.1, p.601
(o <- GapBS())$PxBS

GapBS(o=OptPx(Opt(Style='Gap',Right='Put',K=57)))

#See http://www.mathworks.com/help/fininst/gapbybls.html
o = Opt(Style='Gap',Right='Put',K=57,ttm=0.5,S0=52)
o = GapBS(OptPx(o,vol=0.2,r=0.09),K2=50)

o = Opt(Style='Gap',Right='Put',K=57,ttm=0.5,S0=50)
(o <- GapBS(OptPx(o,vol=0.2,r=0.09),K2=50))$PxBS

Example output

[1] 1895.689
$S0
[1] 50

$ttm
[1] 2

$K
[1] 57

$Style
$Style$Name
[1] "Gap"

$Style$Vanilla
[1] FALSE

$Style$Exotic
[1] TRUE

$Style$European
[1] FALSE

$Style$American
[1] FALSE

$Style$Asian
[1] FALSE

$Style$Binary
[1] FALSE

$Style$AverageStrike
[1] FALSE

$Style$Barrier
[1] FALSE

$Style$Chooser
[1] FALSE

$Style$Compound
[1] FALSE

$Style$DeferredPayment
[1] FALSE

$Style$ForeignEquity
[1] FALSE

$Style$ForwardStart
[1] FALSE

$Style$Gap
[1] TRUE

$Style$HolderExtendible
[1] FALSE

$Style$Ladder
[1] FALSE

$Style$Lookback
[1] FALSE

$Style$MOPM
[1] FALSE

$Style$Perpetual
[1] FALSE

$Style$Quotient
[1] FALSE

$Style$Rainbow
[1] FALSE

$Style$Shout
[1] FALSE

$Style$SimpleChooser
[1] FALSE

$Style$VarianceSwap
[1] FALSE


$Right
$Right$Name
[1] "Put"

$Right$Call
[1] FALSE

$Right$Put
[1] TRUE

$Right$Other
[1] FALSE

$Right$SignCP
[1] -1


$Curr
[1] "$"

$ContrSize
[1] 100

$SName
[1] "A stock share"

$SSymbol
[1] ""

$r
[1] 0.05

$q
[1] 0

$rf
[1] 0

$vol
[1] 0.3

$NSteps
[1] 3

$u
[1] 1.277556

$d
[1] 0.7827445

$dt
[1] 0.6666667

$a
[1] 1.033895

$p
[1] 0.5075682

$SYld
[1] 0.05

$DF_ttm
[1] 0.9048374

$DF_dt
[1] 0.9672161

$PxBS
[1] 1.575733

$K2
[1] 350000

attr(,"class")
[1] "Opt"   "OptPx"
[1] 4.486604

QFRM documentation built on May 2, 2019, 8:26 a.m.

Related to GapBS in QFRM...