Description Usage Arguments Author(s) Examples
Calculate the price for an American or European option with a series of discrete dividend yields, using a recombining tree approach as outlined in Haug (2004).
1 2 3 4 5 6 7 8 9 | DiscreteDivYield(type = c("ac", "ap", "ec", "ep"),
S,
X,
T,
r,
v,
n,
d,
dT)
|
type |
|
S |
|
X |
|
T |
|
r |
|
v |
|
n |
|
d |
|
dT |
Jeffrey A. Ryan adapted from Espen Haug 2004
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | DiscreteDivYield('ac',S=100,X=102,T=0.5,r=0.1,v=0.30,n=10,d=0.15,dT=0.4)
# Example table from 9-8 from Haug 2004 p. 394
## Not run:
# dividend yields
d <- c(0.01, 0.02, 0.05, 0.10, 0.15, 0.20)
# dividend times
dT <- c(0.1, 0.25, 0.4)
ex9_8 <- matrix(ncol=6,nrow=12)
# calls, sigma=0.15
ex9_8[1:6,1:3] <- sapply(dT, function(dT) sapply(d, function(d) DiscreteDivYield('ac', S=100, X=102, T=0.5, r=0.1, n=500, v=0.15, d=d, dT)$OV[[1]]))
# calls, sigma=0.30
ex9_8[1:6,4:6] <- sapply(dT, function(dT) sapply(d, function(d) DiscreteDivYield('ac', S=100, X=102, T=0.5, r=0.1, n=500, v=0.30, d=d, dT)$OV[[1]]))
# puts, sigma=0.15
ex9_8[7:12,1:3] <- sapply(dT, function(dT) sapply(d, function(d) DiscreteDivYield('ap', S=100, X=102, T=0.5, r=0.1, n=500, v=0.15, d=d, dT)$OV[[1]]))
# puts, sigma=0.30
ex9_8[7:12,4:6] <- sapply(dT, function(dT) sapply(d, function(d) DiscreteDivYield('ap', S=100, X=102, T=0.5, r=0.1, n=500, v=0.30, d=d, dT)$OV[[1]]))
ex9_8
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.