File Exchange

image thumbnail

Estimating Option-Implied Probability Distributions for Asset Pricing

version 1.0.0.1 (5.24 KB) by Ken Deeley
Create fan charts for future asset prices based on sparse call/put price market data

7 Downloads

Updated 01 Sep 2016

View License

This submission contains all code and data used in the technical article "Estimating Option-Implied Probability Distributions for Asset Pricing".

Comments and Ratings (7)

Ken Deeley

Hi Tong Li,
I'm not sure why you still receive this error. Please could you contact MathWorks support for further assistance? (https://www.mathworks.com/support/)

Tong Li

Do you think I have a bad installation? I have the fininst toolbox installed (I removed my license number for security reason below), function 'instbond' works. Any other thing I need to do to enable SABR?

>> ver('fininst')
----------------------------------------------------------------------------------------------------
MATLAB Version: 8.5.0.197613 (R2015a)
MATLAB License Number: xxxxxx
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
Financial Instruments Toolbox Version 2.1 (R2015a)
>> blackvolbysabr
Undefined function or variable 'blackvolbysabr'.

Ken Deeley

Hi Tong Li,

The error message indicates that MATLAB is unable to find the function blackvolbysabr. The function blackvolbysabr is part of Financial Instruments Toolbox and was introduced in R2014a. You can check your installation of this toolbox by entering

>> ver( 'fininst' )

at the command line.

Tong Li

Double-checked my Matlab version (R2015a) with all the toolbox installed. I still got the following error. Hope you can help me on this.

Undefined function 'blackvolbysabr' for input arguments of type 'double'.

Error in
@(X)tempSigmaCall-blackvolbysabr(X(1),beta,X(2),X(3),char(settle),exercise,tempForward,tempK)

Error in lsqnonlin (line 194)
initVals.F = feval(funfcn{3},xCurrent,varargin{:});

Error in OptImpRatesArticle (line 125)
XCall = lsqnonlin(objFunCall, [0.5, 0, 0.5], [0, -1, 0], [Inf, 1, Inf]);

Caused by:
Failure in initial user-supplied objective function evaluation. LSQNONLIN cannot
continue.

Caxap Puc

Hi! Thank you for reply. I really impressed with your work, that's why testing feedback is the minimum which I can contribute to motivate you to continue post such a good articles :)
I have found colleague, who uses 2016 version, an everything goes well!

Ken Deeley

Hi Caxap,

Please check the version of MATLAB you are using to run this code. Graphics commands such as

ax.Children.Color

will only work in version R2014b onwards. Also note that the code used in this article is intended to run in MATLAB version R2015a onwards.

Caxap Puc

Error appears:

Attempt to reference field of non-structure array.

Error in OptImpRatesArticle (line 56)
cols = flipud(cat(1, ax.Children.Color));

Updates

1.0.0.1

Updated license

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux