rndfittool

Risk-neutral Density Fitting Tool (MATLAB)


Current version
v18.12
Author
Andrea Barletta


Latest downloads

MATLAB App installer v18.12 (recommended)
Zip archive containing all codes v18.12

Changelog


Getting Started

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.

Prerequisites

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:

Installing rndfittool

There are two options to install the Risk-neutral Density Fitting Tool on your machine.

Installing rdnfittool through zip archive


Quick usage


Supported data sources

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]  %%%%%%

Required variables:

Optional variables:

External sources

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.

OptionMetrics

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.

Visit OptionMetrics website

CBOE

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.

Visit CBOE website