Implementation of modified Corrado-Su formula for option pricing.
Arguments
- type
'call' for call option, any other value for put.
- spot
current stock price.
- strike
the strike price.
- time
time to option expiration in years.
- rate
the risk-free interest rate.
- yield
the dividends that are expected to be paid.
- sigma
volatility of the stock price.
- mu3
skewness.
- mu4
kurtosis.
Recycle rule
These arguments handle the recycle rule so vectors can be provided and once those vectors differs in length the recycle rule is applied.
Examples
spot <- 25
sigma <- 0.2
time <- 0.5
strike <- 26
rate <- 0.12
yield <- 0
skewness <- 1
kurtosis <- 4
csmprice(c("call", "put"), spot, strike, time, rate, yield, sigma, 0, 3) ==
bsmprice(c("call", "put"), spot, strike, time, rate, yield, sigma)
#> [1] TRUE FALSE
csmprice(
"put", spot, strike, time, rate, 0:100 / 100, sigma, skewness, kurtosis
)
#> [1] 1.112048 1.172468 1.234637 1.298520 1.364080 1.431277 1.500065 1.570396
#> [9] 1.642219 1.715480 1.790123 1.866088 1.943316 2.021744 2.101308 2.181944
#> [17] 2.263585 2.346168 2.429626 2.513893 2.598905 2.684597 2.770908 2.857774
#> [25] 2.945136 3.032937 3.121119 3.209630 3.298416 3.387430 3.476624 3.565956
#> [33] 3.655383 3.744867 3.834374 3.923869 4.013324 4.102710 4.192004 4.281183
#> [41] 4.370227 4.459121 4.547848 4.636397 4.724756 4.812917 4.900873 4.988618
#> [49] 5.076148 5.163461 5.250555 5.337429 5.424083 5.510519 5.596737 5.682740
#> [57] 5.768530 5.854108 5.939478 6.024642 6.109603 6.194361 6.278921 6.363282
#> [65] 6.447447 6.531416 6.615191 6.698770 6.782155 6.865344 6.948336 7.031130
#> [73] 7.113724 7.196114 7.278299 7.360276 7.442040 7.523588 7.604917 7.686021
#> [81] 7.766896 7.847538 7.927941 8.008102 8.088014 8.167673 8.247074 8.326212
#> [89] 8.405082 8.483678 8.561998 8.640034 8.717784 8.795243 8.872407 8.949271
#> [97] 9.025832 9.102086 9.178030 9.253661 9.328976