代写_论文代写_ESSAY PhD团队论文、作业代写-不是中介 更加专业

EssayPhD是来自全球各地TOP名校的PhD自发组成的联盟,旨在为学弟学妹提供专业的英语论文写作指导及留学申请指导,为名解答论文及申请文书写作中的常见疑难问题。
论文写作答疑

金融工程作业代写与讲解:Monte Carlo simulation for option pricing

时间:2019-04-25 16:39来源:未知 作者:admin 点击:
金融工程作业代写

金融工程专业是一个交叉学科,也是学习难度非常大的专业。金融工程专业的知识覆盖了统计学,数学,编程,经济学,金融学等方面的知识,而且国内金融工程人才的培养也远远落后于欧美国家。因此很多在海外留学的同学在写金融工程作业的时候,如果求助于各种代写中介,往往得不到理想的结果。有良心的中介会回复你说这个我们真的做不来,或者有的黑心中介直接收了钱就不管你了,最后赔了夫人又折兵。而我们Essay PhD团队里有很多专业研究金融资产定价和金融数学的PhD,各种金融工程作业代写都能轻松解决,拿到高分。
以我们最近代写的“Computing European Option Prices Under Local Volatility Model With Finite Difference and Monte Carlo Simulation”为例。具体涉及到随机微分方程(Stochastic Differential Equation)的求解,Monte Carlo模拟方法的应用,以及非常复杂的有限差分方法:Explicit finite differences, Implicit finite differences, Crank-Nicolson finite differences, Multi-step finite differences.
我们先做出了一般期权的Monte Carlo模拟程序,同时提供了详实的注释,代码风格也简单易懂。
function Price = MCpricing(K,S0,r,yield,alpha,T,times,numPaths,Type)
% Function to calculate the price of a vanilla European option
% Put or Call
% Price = MCpricing(X,S0,r,sig,Svec,tvec,oType)
%
% Inputs: K - strike
%       : S0 - stock price
%       : r - risk free interest rate
%       : yield - dividend
%       : alpha - controls the local volatility function
%       : T: time to expiry
%       : times: number of times to discretize
%       : numPaths: iterations, number of paths
%       : Type - must be 'PUT' or 'CALL'.
%
% Output: Price - the option price and standard deviation
S = S0 * ones(numPaths,1);
dt=T/times;
for i=1:times
eps=randn(numPaths,1);
sigmat=0.25*exp(-i*dt)*(100./S).^alpha;
mudt=(r-yield-0.5.*sigmat.^2)*dt;
S=S.*exp(mudt+sqrt(dt)*sigmat.*eps);
end
switch Type
case'PUT'
payoff=max(K-S,0);
case'CALL'
payoff=max(S-K,0);
end
% Calculate the option price
cal=payoff*exp(-r*T);
Price = [mean(cal);std(cal)/sqrt(numPaths)];

通过利用explicit finite difference对随机微分方程的推导,我们得到了如下的期权定价的Monte Carlo模拟程序。最后这份作业拿到了90+的高分,我们认为代码简单易懂,对数学推导的灵活运用,对期权定价的理解,专业的写作和正确的计算结果是高分的关键。金融工程作业代写是代写中介不可能完成的任务,也是代写质量的试金石,我们Essay PhD团队不是中介,没有中间抽成,写手都是PhD兼职,质量保障!
function Price = FDMExplicit(K,S0,r,yield,alpha,Svec,tvec,Type)
% Function to calculate the price of a vanilla European
% Put or Call option using the explicit finite difference method
%
% Price = FDMExplicit(X,r,sig,Svec,tvec,Type)
%
% Inputs: K - strike
%       : S0 - stock price
%       : r - risk free interest rate
%       : yield - dividend
%       : alpha - controls the local volatility function
%       : T: time to expiry
%       : Svec - Vector of stock prices (i.e. grid points)
%       : tvec - Vector of times (i.e. grid points)
%       : Type - must be 'PUT' or 'CALL'.
%
% Output: Price - the option price

% Get the number of grid points
M = length(Svec)-1;
N = length(tvec)-1;
% Get the grid sizes (assuming equi-spaced points)
dt = tvec(2)-tvec(1);

% Calculate the coefficients
% To do this we need a vector of price paths, j refers to St

j = 1:M-1;
j2 = j.*j;

% Pre-allocate the output
price(1:M+1,1:N+1) = nan;

% Specify the boundary conditions
switch Type
case'CALL'
% Specify the expiry time boundary condition
price(:,end) = max(Svec-K,0);
% Put in the minimum and maximum price boundary conditions
% assuming that the largest value in the Svec is
% chosen so that the following is true for all time
price(1,:) = 0;
price(end,:) = -K*exp(-r*tvec(end:-1:1))+ Svec(1)*exp(-yield*tvec(end:-1:1));
case'PUT'
% Specify the expiry time boundary condition
price(:,end) = max(K-Svec,0);
% Put in the minimum and maximum price boundary conditions
% assuming that the largest value in the Svec is
% chosen so that the following is true for all time
price(1,:) = K*exp(-r*tvec(end:-1:1))- Svec(1)*exp(-yield*tvec(end:-1:1));
price(end,:) = 0;
end

for i = N:-1:1
sig = 0.25*exp(-i*dt).*(100./j).^alpha;
sig2= sig.^2;
aj = 0.5*dt*(sig2.*j2-(r-yield).*j);
bj = 1-dt*(sig2.*j2+r);
cj = 0.5*dt*(sig2.*j2+(r-yield).*j);
% Form the tridiagonal matrix
A = diag(bj);  % Diagonal terms
A(2:M:end) = aj(2:end); % terms below the diagonal
A(M:M:end) = cj(1:end-1); % terms above the diagonal
% Calculate the price at all interior nodes
offsetConstants = [aj(1); cj(end)];
price(2:end-1,i) = A*price(2:end-1,i+1);
% Offset the first and last terms
price([2 end-1],i) = price([2 end-1],i) + offsetConstants.*price([1 end],i+1);
end

% Calculate the option price
Price = interp1(Svec,price(:,1),S0)

------分隔线----------------------------

ESSAY PhD擅长于各类学科写作,为全球留学生提供优质论文代写服务。
全PhD团队为您提供最优质的论文代写服务。我们团队的PhD几乎涵盖各个学科,覆盖全球各个TOP大学。我们将根据作业的要求,为您亲手制定唯一的原创论文。提供TURNITIN和WRITECHECK抄袭检测报告。ESSAY PhD提供一对一指导交流服务,如果您对论文有任何不懂,可以直接和PhD写手联系。我们提供辅导服务,直到您理解掌握为止。我们承诺,用最大的努力满足您对学习的要求。

Terms & Conditions    隐私保护    修改条款    Fair Use Policy

Copyright©2015-2018 ESSAY PhD All Rights Reserved   工作时间:7X24小时全天候在线为你提供服务   工作邮箱:essayphd@yahoo.com   客服QQ:981468205