楼主: 我叫曹老四
2121 3

美式期权最小二乘蒙特卡罗模型 [推广有奖]

  • 1关注
  • 0粉丝

硕士生

5%

还不是VIP/贵宾

-

威望
0
论坛币
4845 个
通用积分
0.0013
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
275 点
帖子
44
精华
0
在线时间
175 小时
注册时间
2015-3-8
最后登录
2018-12-15

楼主
我叫曹老四 发表于 2016-12-18 16:35:56 来自手机 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请问利用MATLAB模拟股票价格的结果,这个要怎么解释,初始价格为1,敲定价格为1.1,期权有效期为一年 IMG20161218163154.jpg
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:美式期权 最小二乘 蒙特卡罗 罗模型 蒙特卡 蒙特卡罗 股票价格 有效期 模型

回帖推荐

weilinhy 发表于2楼  查看完整内容

function = AmericanOptLSM(S0,K,r,T,sigma,N,M,type) %AmericanOptLSM - Price an american option via Longstaff-Schwartz Method % % Returns the price of an American option computed using finite % difference method applied to the BlackScoles PDE. % % Inputs: % % S0 Initial asset price % K Strike Price % r Interest rate % T Time to maturity of option % ...

本帖被以下文库推荐

沙发
weilinhy 发表于 2016-12-19 10:00:04
function [Price,CF,S,t] = AmericanOptLSM(S0,K,r,T,sigma,N,M,type)

%AmericanOptLSM - Price an american option via Longstaff-Schwartz Method
%
%  Returns the price of an American option computed using finite
%  difference method applied to the BlackScoles PDE.
%
% Inputs:
%
%   S0      Initial asset price
%   K       Strike Price
%   r       Interest rate
%   T       Time to maturity of option
%   sigma   Volatility of underlying asset
%   N       Number of points in time grid to use (minimum is 3, default is 50)
%   M       Number of points in asset price grid to use (minimum is 3, default is 50)
%   type    True (default) for a put, false for a call

if nargin < 6 || isempty(N), N = 50; elseif N < 3, error('N has to be at least 3'); end
if nargin < 7 || isempty(M), M = 50; elseif M < 3, error('M has to be at least 3'); end
if nargin < 8, type = true; end
dt = T/N;

t = 0:dt:T;
t = repmat(t',1,M);

R = exp((r-sigma^2/2)*dt+sigma*sqrt(dt)*randn(N,M));
S = cumprod([S0*ones(1,M); R]);

ExTime = (M+1)*ones(N,1);

% Now for the algorithm
CF = zeros(size(S)); % Cash flow matrix

CF(end,:) = max(K-S(end,:),0); % Option only pays off if it is in the money

for ii = size(S)-1:-1:2
    if type
        Idx = find(S(ii,:) < K); % Find paths that are in the money at time ii
    else
        Idx = find(S(ii,:) > K); % Find paths that are in the money at time ii
    end
    X = S(ii,Idx)'; X1 = X/S0;
    Y = CF(ii+1,Idx)'*exp(-r*dt); % Discounted cashflow
    R = [ ones(size(X1)) (1-X1) 1/2*(2-4*X1-X1.^2)];
    a = R\Y; % Linear regression step
    C = R*a; % Cash flows as predicted by the model
    if type
        Jdx = max(K-X,0) > C; % Immediate exercise better than predicted cashflow
    else
        Jdx = max(X-K,0) > C; % Immediate exercise better than predicted cashflow
    end
    nIdx = setdiff((1:M),Idx(Jdx));
    CF(ii,Idx(Jdx)) = max(K-X(Jdx),0);
    ExTime(Idx(Jdx)) = ii;
    CF(ii,nIdx) = exp(-r*dt)*CF(ii+1,nIdx);
end

Price = mean(CF(2,:))*exp(-r*dt);
end

藤椅
我叫曹老四 发表于 2016-12-19 11:07:10 来自手机
我叫曹老四 发表于 2016-12-18 16:35
请问利用MATLAB模拟股票价格的结果,这个要怎么解释,初始价格为1,敲定价格为1.1,期权有效期为一年
这是美式期权的定价编程吗?

板凳
我叫曹老四 发表于 2016-12-19 11:22:56 来自手机
我叫曹老四 发表于 2016-12-19 11:07
这是美式期权的定价编程吗?
不好意思,因为太不懂了,这是我在网上下载的关于美式期权的MATLAB编程,运行后出现的结果就是我发的图,但我看大家论文解释的期权价格从图中怎么看出来,还是说根据图自己算,还有模拟路径和模拟次数是一个意思吗?求求帮帮忙。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-30 22:39