This is an R
implementation of the original Matlab code of Matthias Held ("matthias.held@whu.edu") to calculate Bakshi/Kapadia/Madan moments of option implied return distribution.
CURRENTLY THIS PACKAGE IS UNDER HEAVY DEVELOPMENT AND NOT ALL THE FUNCTIONS HAVE YET BEEN IMPLEMENTED TO THEIR FULL EXTENT!
You can install IMOMBOX from github with:
# install.packages("devtools")
devtools::install_github("diffform/IMOMBOX")
The example data is provided in the originally matlab package and contains observations of call and put option prices from 2013-09-20
written on the German DAX index with a maturity of 2013-10-18
(28 days to maturity). Based on these options we calculate risk neutral prices for the first four moment contracts, i.e. the contracts that pay R1, R2, R3 and R4.
require(IMOMBOX)
#> Loading required package: IMOMBOX
data(DAX)
# Only use Strikes and prices, have R calculate S0 and df
Option2price(DAX$XC,DAX$C,DAX$XP,DAX$P)
#> Estimated spot price S0: 8676.151 and estimated discount factor df: 0.9999221
#> [1] -0.0008807785 0.0019554410 -0.0001197590 0.0000228430
So, we find that an option that pays R2 in 28 days from now commands a price of 0.002.