The Risk-neutral Density Fitting Tool tool (rndfittool) allows for inferring the risk-neutral density (RND) and the Greeks embedded in a set of observed call and put option prices. The underlying methodology is fully non-structural, meaning that it does not rely on any parametric model, and it consists in approximating the RND through orthogonal polynomial expansions. A detailed description of this methodology is provided in this paper (RND and moments) and in this paper (Greeks). Please note that this tool is not a standalone software, but it fully relies on the MATLAB suite.
This code has been tested on MATLAB R2017a, R2016b, R2015b, R2014a and R2014b. However, there is a chance that it also runs on older versions of MATLAB. The following MATLAB Toolboxes are required to ensure full compatibility of the code:
There are two options to install the Risk-neutral Density Fitting Tool on your machine.
rndfittoolto run the tool.
Edit input data. Press
Edit input datato validate your changes. Change strike boundaries (you may need to repeat this step in case the fitting is not satisfactory). Press
Apply and Exitto save all changes and return to the main window.
Find greeksto compute the Greeks (still model-free).
The standard format for input data is a MAT-file (see this sample) with the following structure
Variable name: [Size Type] K: [Mx1 double] %%%%%% call: [Mx1 double] % Mandatory put: [Mx1 double] % m: [2x1 double] %%%%%% obsDate: [1x6 int] %%%%%% expDate: [1x6 int] % call_a: [Mx1 double] % Optional call_b: [Mx1 double] % put_a: [Mx1 double] % put_b: [Mx1 double] %%%%%%
Kvector of strike values
callvector of observed call prices
putvector of observed put prices
mvector containing guessed mean and variance (can be set to )
obsDateobservation date in numeric format ‘yyyy mm dd’
expDateexpiry date in numeric format ‘yyyy mm dd’
call_avector of call ask prices
call_bvector of call bid prices
put_avector of put ask prices
put_bvector of put bid prices
Input data can also be loaded from external sources and optionally converted into compatible MAT-file forma through
Edit input data. However, loading MAT-formatted data is normally faster.
The data must have .xls, .xlsx or .csv extension and be formatted with all options (e.g. date format) set to the default values provided in the OptionMetrics download page. The dataset must contain all the information related to the mandatory variables. Possibly unrequired fields can be safely appended at any position of the spreadsheet, if needed. Options with several maturities and/or observation dates can be collected into the same file. If this is the case, the user will be asked to choose a maturity when loading data.
The data may be saved either into default .dat format available at CBOE website or be pre-converted into .xls/.xlsx format. The dataset must contain all the information related to the mandatory variables. Possibly unrequired fields can be safely appended at any position of the spreadsheet, if needed. If this is the case the user will be asked to choose a maturity when loading data.
Note: The CBOE format changed on 26/11/2018. The new format is supported only in the latest version of rndfittool.