楼主: harlon1976
7561 21

求利用SAS进行蒙特卡罗模拟的资料 [推广有奖]

  • 2关注
  • 27粉丝

版主

院士

49%

还不是VIP/贵宾

-

威望
1
论坛币
37273 个
通用积分
100.0959
学术水平
25 点
热心指数
39 点
信用等级
17 点
经验
58976 点
帖子
1898
精华
0
在线时间
4213 小时
注册时间
2005-8-27
最后登录
2024-5-3

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
如果有这方面的资料,我将重金感谢,一定是程序介绍的.
二维码

扫码加我 拉你入群

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

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

关键词:蒙特卡罗模拟 蒙特卡罗 蒙特卡 资料 模拟 蒙特卡罗 SAS

沙发
bingobingo 在职认证  发表于 2006-12-27 01:50:00 |只看作者 |坛友微信交流群

MC方法应用很多,你要哪方面的?

sampling技术,MCMC,EM,还是其它?

使用道具

藤椅
harlon1976 发表于 2006-12-27 05:46:00 |只看作者 |坛友微信交流群
我都感兴趣,但最好要结合SAS编程来实现,不然只有理论而不能应用就不能体现价值了,如果你有理论方面的也可以吧,谢谢,焦急等待回复.

使用道具

板凳
bingobingo 在职认证  发表于 2006-12-27 11:52:00 |只看作者 |坛友微信交流群
用sas编程做算法的很少,一般都用c,fortran或者splus/R进行编程验证。

使用道具

报纸
harlon1976 发表于 2006-12-27 18:46:00 |只看作者 |坛友微信交流群

如果你有这方面的资料,可否发送给我harlon1976@sohu.com,谢谢!

使用道具

地板
yinming65 发表于 2007-2-19 09:57:00 |只看作者 |坛友微信交流群
我也感兴趣。yinming65@yahoo.com

使用道具

7
zzheng722 发表于 2007-2-21 22:55:00 |只看作者 |坛友微信交流群

/* Monte Carlo Simulation */


data exchange ;

input yr rate_jp rate_wg imn_jp imn_wg emp_us emp_jp emp_wg

prod_us / prod_jp prod_wg cpi_us cpi_jp cpi_wg;

im_jp = imn_jp/cpi_us;

im_wg = imn_wg/cpi_us;

ius = 100*(cpi_us-(lag(cpi_us)))/(lag(cpi_us));

ijp = 100*(cpi_jp-(lag(cpi_jp)))/(lag(cpi_jp));

iwg = 100*(cpi_wg-(lag(cpi_wg)))/(lag(cpi_wg));

di_jp = ius - ijp;

di_wg = ius - iwg;

title 'EXCHANGE Data';

cards;

1974 . . . . . . . .

. . .493 .590 .672

1975 295.78 2.4613 11425 5410 93.0 99.8 103.3 93.5

84.0 89.3 .538 .660 .712

1976 296.45 2.5184 15504 5592 96.4 100.8 100.8 97.1

95.6 94.9 .569 .721 .742

1977 268.62 2.3236 18550 7238 100.0 100.0 100.0 100.0

100.0 100.0 .606 .780 .769

1978 210.38 2.0096 24458 9962 104.2 98.9 99.4 100.9

106.8 103.8 .652 .813 .790

1979 219.02 1.8342 26248 10955 107.1 98.1 99.8 101.5

117.4 108.9 .726 .843 .823

1980 226.63 1.8175 30714 11693 103.3 101.3 100.4 101.7

125.4 109.8 .824 .909 .868

1981 220.63 2.2631 37612 11379 102.8 102.2 97.9 104.6

126.3 112.8 .909 .954 .922

1982 249.06 2.4280 37744 11975 95.8 101.4 95.0 107.1

146.8 113.3 .965 .980 .970

1983 237.55 2.5539 41183 12695 94.4 103.4 91.1 111.6

152.8 116.8 .996 .999 1.003

1984 237.45 2.8454 57135 16996 99.0 105.8 90.4 118.5

152.2 124.7 1.039 1.021 1.027

1985 238.47 2.9419 68783 20239 98.1 107.6 91.3 124.2

161.1 128.5 1.076 1.042 1.048

1986 168.35 2.1704 81911 25124 96.8 107.3 92.7 128.8

163.8 130.7 1.096 1.049 1.047

1987 144.60 1.7981 84575 27069 97.1 106.1 92.8 132.0

176.5 129.9 1.136 1.050 1.049

1988 128.17 1.7569 89802 26503 99.6 108.8 92.7 136.2

190.0 135.9 1.183 1.057 1.063

;



/* data for simulation */

data whatif;

input yr rate_jp rate_wg imn_jp imn_wg emp_us emp_jp emp_wg

prod_us / prod_jp prod_wg cpi_us cpi_jp cpi_wg;

label cpi_us = 'US CPI 1982-1984 = 100'

cpi_jp = 'JP CPI 1982-1984 = 100'

cpi_wg = 'WG CPI 1982-1984 = 100';

im_jp = imn_jp/cpi_us;

im_wg = imn_wg/cpi_us;

ius = 100*(cpi_us-(lag(cpi_us)))/(lag(cpi_us));

ijp = 100*(cpi_jp-(lag(cpi_jp)))/(lag(cpi_jp));

iwg = 100*(cpi_wg-(lag(cpi_wg)))/(lag(cpi_wg));

di_jp = ius - ijp;

di_wg = ius - iwg;

cards;

1980 226.63 1.8175 30714 11693 103.3 101.3 100.4 101.7

125.4 109.8 .824 .909 .868

1981 220.63 2.2631 35000 11000 102.8 102.2 97.9 104.6

126.3 112.8 .909 .954 .922

1982 249.06 2.4280 40000 12000 95.8 101.4 95.0 107.1

146.8 113.3 .965 .980 .970

1983 237.55 2.5539 45000 13100 94.4 103.4 91.1 111.6

152.8 116.8 .996 .999 1.003

1984 237.45 2.8454 50000 14300 99.0 105.8 90.4 118.5

152.2 124.7 1.039 1.021 1.027

1985 238.47 2.9419 55000 15600 98.1 107.6 91.3 124.2

161.1 128.5 1.076 1.042 1.048

1986 . . 60000 17000 96.8 107.3 92.7 128.8

163.8 130.7 1.096 1.049 1.047

1987 . . 65000 18500 97.1 106.1 92.8 132.0

176.5 129.9 1.136 1.050 1.049

1988 . . 70000 20000 99.6 108.8 92.7 136.2

190.0 135.9 1.183 1.057 1.063

;



proc model data=exchange outmodel=xch_out;

parms a1 a2 b1 b2 c1 c2;

label rate_jp = 'Exchange Rate of Yen/$'

rate_wg = 'Exchange Rate of Gm/$'

im_jp = 'Imports to US from Japan in 1984 $'

im_wg = 'Imports to US from WG in 1984 $'

di_jp = 'Difference in Inflation Rates US-JP'

di_wg = 'Difference in Inflation Rates US-WG';

rate_jp = a1 + b1*im_jp + c1*di_jp;

rate_wg = a2 + b2*im_wg + c2*di_wg;

endo im_jp im_wg;

exo di_jp di_wg;

fit rate_jp rate_wg / sur outest=xch_est outcov outs=s;

solve rate_jp rate_wg / data=whatif estdata=xch_est sdata=s

random=100 seed=123 out=monte forecast;

id yr;

range yr=1986;

run;



proc sort data=monte;

by yr;

run;



proc univariate data=monte noprint;

by yr;

var rate_jp rate_wg;

output out=bounds mean=mean p5=p5 p95=p95;

run;



title "Monte Carlo Generated Confidence Intervals on a Forecast";

proc gplot data=bounds;

plot mean*yr p5*yr p95*yr /overlay;

symbol1 i=join value=triangle;

symbol2 i=join value=square l=4;

symbol3 i=join value=square l=4;

run;

使用道具

8
zhoulibo1005 发表于 2007-12-27 14:23:00 |只看作者 |坛友微信交流群

我有蒙特卡罗理论与程序方面的书籍

需要者与我联系zlb1216@yahoo.com.cn

使用道具

9
布莱特 发表于 2007-12-27 16:12:00 |只看作者 |坛友微信交流群

我也感兴趣,楼上的有电子版吗,yudaojun@163.com

使用道具

10
zhoulibo1005 发表于 2007-12-27 22:12:00 |只看作者 |坛友微信交流群

需要的请到  这里  下载

http://dyn.www.fs2you.com/zh-cn/manage/

[此贴子已经被作者于2007-12-27 22:58:38编辑过]

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-7 22:25