资源简介
本文章中包括我编写 matlab 最小二乘蒙特卡罗(LMS)美式期权定价 程序,以及相关资料,欢迎下载学习,如有错误指不吝赐教
代码片段和文件信息
function p = AmericanOption(rkTsPath)
% American call Option
[nStepnPath] = size(sPath);
nStep = nStep - 1;
% time step
deltaT = T / nStep;
% initialize cashflow matrix
cashflow = zeros(size(sPath));
% the last row‘s value
cashflow(end:) = max(sPath(end:)-k0);
% etime : Record the optimal execution time
etime = (nStep+1) * ones(1nPath);
% Calculate from the back to the front
for i = nStep:-1:2
% row‘s value
cashflow(i:) = max(sPath(i:)-k0);
% find Find the location of real-value options
ind = find(cashflow(i:) > 0);
% Read the cash flow corresponding to line I + 1
% which corresponds to the real value path of line I
cf = cashflow(i+1ind);
% Discount cash flow
v = cf .* exp(-r * deltaT);
% Find out the stock prices corresponding to these locations
s = sPath(iind);
% Regression to find the parameters of a b c
md = fitlm(sv‘purequadratic‘);
fun = @(x) (md.Coefficients.Estimate(1) + md.Coefficients.Estimate(2) .* x ...
+ md.Coefficients.Estimate(3) .* x .^ 2);
% Continuing Holding Value of Options
hv = fun(s);
%
% % Comparing holding value with execution value using ind1 to mark the optimal execution time
% ind1 = cashflow(iind) > hv;
% % If the holding value is less than the execution value and the position option is executed immediately
% % the cash flow at the position of i+1 is 0.
% cashflow(i+1ind(ind1)) = 0;
% % Find out the non-optimal position
% ind2 = setdiff(1:nPathind(ind1));
% % Discount cash flow of I + 1 position to I position
% cashflow(iind2) = cashflow(i+1ind2) .* exp(-r * deltaT);
% Comparing holding value with execution value using ind1 to mark the optimal execution time
ind1 = cashflow(iind) > hv;
cashflow(iind(~ind1)) = hv(~ind1);
% If the holding value is less than the execution value and the position option is executed immediately
% the cash flow at the position of i+1 is 0.
cashflow(i+1:endind(ind1)) = 0;
% Find out the non-optimal position
ind2 = setdiff(1:nPathind);
cashflow(iind2) = cashflow(i+1ind2) * exp(-r * deltaT);
% Discount cash flow of I + 1 position to I position
% cashflow(iind2) = cashflow(i+1ind2) .* exp(-r * deltaT);
% Recording optimal execution time
etime(ind(ind1)) = i;
end
% Calculating Option Price
p = mean(cashflow(2:)) * exp(-r * deltaT);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 10704644 2019-03-21 22:39 287579.pdf
文件 2346 2019-03-25 20:22 AmericanOption.m
文件 100265 2019-03-21 22:35 Annualised Volatility of IBM.xlsx
文件 1075 2019-03-25 21:24 aoption.m
文件 756774 2019-03-26 00:50 LongstaffSchwartzAmericanOptionsLeastSquareMonteCarlo.pdf
文件 747 2019-03-27 00:28 main_sc
文件 1446 2019-03-25 23:47 mcAoption.m
文件 125694 2019-03-25 23:51 simulate paths.jpg
文件 408 2019-03-23 18:23 simulatePath.m
文件 165 2019-04-04 13:54 ~$Annualised Volatility of IBM.xlsx
文件 903789 2019-03-25 17:57 关于最小二乘蒙特卡洛模拟法在美式期权定价中的应用.xdf
文件 3212567 2019-03-25 18:37 基于最小二乘蒙特卡罗模拟方法的豆粕期货期权定价实证研究.pdf
文件 3610715 2019-03-25 17:32 美式期权定价的最小二乘蒙特卡罗方法及其改进模型.nh
文件 87046 2019-03-22 13:06 要求.png
相关资源
- LMS语音信号去噪matlab代码
- LMS MATLAB DSP算法实现和程序收集
- 自适应滤波器设计及Matlab实现
- 主动噪声控制,fxLMS Active-Noise-Contro
- Levinson-Durbin算法AR、MA算法,附送LMS算
- matlab的LMS自适应滤波算法去噪
- 基于自然梯度算法的盲信号分离程序
- CBF MVDR LMS波束形成的Matlab算法
- LMS AMESim系统建模和仿真参考手册
- LMS自适应滤波器MATLAB实现
- RLS和LMS算法分析比较
- 盲多用户检测LMS和RLS算法matlab实现
- 基于MATLAB的LMS和RLS算法滤波完整程序
- 自适应噪声抵消LMS算法Matlab仿真
- LMS算法自适应滤波器的Matlab仿真分析
- 基于LMS的自适应回声抵消-f1.m
- LMS 自适应滤波的 C 语言源代码
- LMS matlab
- SD算法和LMS算法MATLAB仿真
- 最小二乘蒙特卡洛程序
- 归一化LMS算法自适应滤波器的MATLAB仿
- NLMS程序代码_matlab
- LMS算法 matlab编程
- LMS算法matlab程序
- blocklms块自适应滤波器matlab代码
- 基于NLMS和LMS算法实现回声消除matlab
- 基于NLMS算法的自适应滤波器设计
- 最小均方算法
- LSM&RLS;算法对比
- LMS算法仿真
评论
共有 条评论