Code covered by the BSD License
-
LSM_Plot(S0,K,r,T,sigma,N,M)
Function to demonstrate the Longstaff-Schwartz Least Squares algorithm
-
PlotCRRTree(S0,K,r,T,sigma,N,...
PlotCRRTree the values in the CRR tree give by P.
-
ResultsGUI(varargin)
RESULTSGUI M-file for ResultsGUI.fig
-
TestGUI(varargin)
TESTGUI M-file for TestGUI.fig
-
AmericanOptCRR(S0,K,r,T,sigma...
AmericanOptCRR - Price an american option via Cox-Ross-Rubenstein tree
-
AmericanOptFD(S0,K,r,T,sigma,...
AmericanOptFD - Price an american option via finite differences
-
AmericanOptLSM(S0,K,r,T,sigma...
AmericanOptLSM - Price an american option via Longstaff-Schwartz Method
-
BlackScholesFcn(A,E,r,T,s)
-
CreateFDPlot(S0,K,T,s,t,P)
CreateFDPlot - Use MATLAB graphics commands to create a custom plot to
-
SetupFDMatrix(S0,K,r,T,sigma,...
SetupFDMatrix - Create a matrix which can be used to solve the
-
Comparison_Script.m
-
Contents.m
-
FD_method.m
-
View all files
from
Pricing American Options
by Mark Hoyle
Examples of pricing American options using MATLABĀ®
|
| BlackScholesFcn(A,E,r,T,s)
|
function [C,P] = BlackScholesFcn(A,E,r,T,s)
% A - Asset price
% E - strike price
% r - risk free interest rate
% T - maturity
% s - volatility
d1 = (log(A./E)+(r-s.^2/2).*T)./(s.*sqrt(T));
d2 = d1-s.*sqrt(T);
C = A.*normcdf(d1)-E*exp(-r*T)*normcdf(d2);
P = E*exp(-r*T)*normcdf(-d2)-A.*normcdf(-d1);
|
|
Contact us at files@mathworks.com