楼主: 葛新龙
16413 31

[有偿编程] matlab做三叉树的美式和欧式期权 [推广有奖]

  • 8关注
  • 40粉丝

已卖:1757份资源

学科带头人

29%

还不是VIP/贵宾

-

威望
1
论坛币
614 个
通用积分
66.8598
学术水平
53 点
热心指数
62 点
信用等级
44 点
经验
228 点
帖子
695
精华
1
在线时间
2647 小时
注册时间
2009-10-15
最后登录
2026-1-2

楼主
葛新龙 学生认证  发表于 2011-6-15 23:25:49 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

美式看跌期权:

function [] =
trinomialAmerican(T,n,K,r,sigma,S0)

T ;% experiation date

n ;%total number of periods

K; %exercise price

r ;%risk free interest rate

sigma ;%vloatility of

S0 ;

deltat=T/n;


u=exp(sigma*sqrt(deltat));

d=exp(-sigma*sqrt(deltat));

p=(sigma^2*deltat+exp(2*r*deltat)-exp(r*deltat)*(1+d)+d)/((u-1)*(u-d)); %risk adjusted probability

q=(exp(r*deltat)-1-p*(u-1))/(d-1);

m=1-p-q;


for i=1:n


for j=1:(2*i+1)


s(j,i)=d^(i-j+1)*S0; % stock price


end


end

for i=1:(2*n+1)


x(i,n)=max(s(i,n)-K,0);


y(i,n)=max(-s(i,n)+K,0);

end

for g=1:(n-1)


i=n-g;


for j=1:(2*i+1)


x(j,i)=max(max((s(j,i)-K),0),(m*x(j+1,i+1)+p*x(j+2,i+1)+q*x(j,i+1))*exp(-r*deltat)); % call


y(j,i)=max(max((-s(j,i)+K),0),(m*y(j+1,i+1)+p*y(j+2,i+1)+q*y(j,i+1))*exp(-r*deltat)); % European put


end

end

c=(m*x(2,1)+p*x(3,1)+q*x(1,1))*exp(-r*deltat)

p=(m*y(2,1)+p*y(3,1)+q*y(1,1))*exp(-r*deltat)

亚式期权:

function [] =
trinomialAsian(T,n,K,r,sigma,S0,N)

T % expiration date;

n % numbers of steps;

K % exercise price;

r % risk free rate;

sigma % volitility of stock;

S0 % present price of stock;

deltat=T/n;

N % times of monte carlo;

二维码

扫码加我 拉你入群

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

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

关键词:MATLAB matla atlab 欧式期权 Lab MATLAB 期权 三叉

Project 1.doc
下载链接: https://bbs.pinggu.org/a-924832.html

58 KB

需要: 4 个论坛币  [购买]

已有 1 人评分经验 论坛币 收起 理由
我的素质低 + 20 + 20 精彩帖子

总评分: 经验 + 20  论坛币 + 20   查看全部评分

沙发
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-15 23:27:02
这是我们小组3人奋战3天修改无数次搞好的

藤椅
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-15 23:27:41
本人金融工程专业08级本科,以前从未学过编程语言

板凳
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-15 23:29:18
其中,Numerical Methods in Finance and Economics_ A MATLAB-Based Introduction (Statistics in Practice).这本书的第7章是三叉树的编程,他用的方法很高级,用晶格方法,而我们没用

报纸
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-15 23:29:46
我们做的有点问题,请高手指教哈

地板
半个馒头(未真实交易用户) 发表于 2011-6-15 23:40:15
没心情下来看,不过想知道你们用的三叉树公式是用哪一种方法推出来的?这东西有Excel做是很方便的.......
生活是一种状态,活着是一种无奈!

7
tulipsliu(真实交易用户) 在职认证  发表于 2011-6-16 11:22:56
既然你希望别人看你的程序,帮你们修改。为什么上传的程序要收费?
你也列举出程序的出处,那别人都可以从书上找到程序,并且重新编写。
这本书我也有。

这样无法促进交流的。我和几个朋友最近在做MRS_GARCH,大家在一起做这个时,程序都是共享的,并且一起讨论和修改。包括论文。
劳动经济学

8
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-16 18:44:32

Project 1

Yahoo finance is one of the most important investment research site on the web. Yahoo finance provides the facilities like with stock prices that update automatically, you can get complete stock quotes from a big number of countries, options, mutual funds, ETFs, indexes, financial calendars, bonds, commodities and other financial assets, all in an easy to read format.
Use Yahoo finance as a data source and complete the following task:
a)
Download the historical prices of a particular stock which has an option available in the market, and compute the average historical return and volatility of the stock.

b)
Use the trinomial tree method to price the option of the stock with a specific strike price, assuming the option is a European type.

c)
Compare your result with the close form solution of B-S formula and talked about the issue of accuracy and efficiency of the trinomial tree method.

d)
Compare the accuracy and efficiency of the trinomial tree method with the binomial thee method.

e)
Compare your results with the market price of the option and try to improve your pricing result.

f)
If the option is an American type, compute its price, and compare the result with what you get in part b.

g)
Do something else that you think is interesting or insightful (i.e., you can assume the option is an Asian option).



Notes:

a)
You should submit your group’s report at the beginning of the lecture on Jun 9 (no more than 3 persons per group).

b)
The details of your calculations, including the MATLAB code should be attached to the appendix of the report.

c)
State any assumptions you made and justify them.

9
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-16 18:45:01
这个是题目

10
葛新龙(未真实交易用户) 学生认证  发表于 2011-6-16 18:46:01
a)
Download the historical prices of a particular stock which has an option available in the market, and compute the average historical return and volatility of the stock.

无风险利率选用十年期美国国债利率:3%
选用的微软股票年收益波动率为:0.30597
b)
Use the trinomial tree method to price the option of the stock with a specific strike price, assuming the option is a European type.

对于执行价21元,现价23.87元,2011年6月17日到期的看涨期权,现实中价格为3.15元,看跌期权现实中价格为0.09元.用三叉树模型计算出的看涨期权价格为3.0194元,看跌期权价格为0.0865元.
c)
Compare your result with the close form solution of B-S formula and talked about the issue of accuracy and efficiency of the trinomial tree method.

用B-S formula计算得出的结果为看涨期权价格为3.0172元,看跌期权价格为0.0852元.比三叉树模型的结果在看涨,看跌期权分别低了0.0022元和低了0.0013元.


d)
Compare the accuracy and efficiency of the trinomial tree method with the binomial thee method.

用二叉树模型计算出的上述期权价格为,看涨期权价格为3.0165元,看跌期权价格为0.0845元,两个期权价格分别比三叉树模型的低了0.0029元和0.0020元.
e)
Compare your results with the market price of the option and try to improve your pricing result.

现实中看涨期权的价格比模型中的高出了0.1306元,看跌期权的价格比模型中的高出了0.0035元,原因??
f)
If the option is an American type, compute its price, and compare the result with what you get in part b.

若为美式期权,则看涨期权价格不变,看跌期权的价格为0.0848元,比欧式看跌期权价格低??
g)
Do something else that you think is interesting or insightful (i.e., you can assume the option is an Asian option).

若为亚式期权,看涨期权价格在2.90元左右波动,看跌期权价格在0.003元左右波动.

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-5 17:50