Description Usage Arguments Value Author(s) References Examples
S3 object constructor for price of gap option using BS model
1 2 3 4 |
o |
An object of class |
K2 |
Strike price that determine if the option pays off. |
An original OptPx
object with PxBS
field as the price of the option
and user-supplied K2
parameter
Tong Liu, Department of Statistics, Rice University, Spring 2015
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
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
|
[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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.