《金融时间序列分析报告报告材料第一次作业.doc》由会员分享,可在线阅读,更多相关《金融时间序列分析报告报告材料第一次作业.doc(11页珍藏版)》请在三一办公上搜索。
1、worda. 用百分数表示简单月收益率略表1.三支股票的简单日收益率百分比的描述性统计American ExpressCaterpillarStarbucksMean0.09718%0.08473%0.145%Standard Deviation2.250181%2.153127%3.049927%SkewnessExcess KurtosisMinimum Value-13.596%-12.162%-28.286%Maximum Value12.770%10.845%14.706%b.简单收益率换成对数收益率略c.把对数收益率用百分比表示出来略表2.三支股票的对数日收益率百分比的描述性统计A
2、merican ExpressCaterpillarStarbucksMean0.07188%0.06157%0.09839%Standard Deviation2.248449%2.150728%3.055389%SkewnessExcess KurtosisMinimum Value-14.61362%-12.96760%-33.24842%Maximum Value12.01802%10.29626%13.72021%d. 对数收益率零均值检验=0.051对于American Expressdata: dailylogre$V2 alternative hypothesis: true
3、mean is not equal to 0 95 percent confidence interval: -0.01596993 0.15972365 sample estimates: mean of x 故承受原假设2对于Caterpillardata: dailylogre$V3 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: -0.02245558 0.14560208 sample estimates: mean of x 故承受原假设3对于Starbucksd
4、ata: dailylogre$V4 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval:-0.02098409 0.21776370 sample estimates: mean of x 故承受原假设a. 用百分数表示简单月收益率略表1.四支股票的简单月收益率百分比的描述性统计IBMVWEWSPMean1.175%1.191%1.591%0.9032%Std. Dev.7.813905%4.561798%5.653741%4.443510%SkewnessExcess Kurt
5、osisMin. Value-26.190%-22.534%-27.231%-21.763%Max. Value35.380%14.150%29.921%13.177%b.简单收益率换成对数收益率略c.把对数收益率用百分比表示出来略表2.四支股票的对数月收益率百分比的描述性统计IBMVWEWSPMean0.8722%1.080%1.421%0.8006%Std. Dev.7.713084%4.594938%5.652219%4.469454%SkewnessExcess KurtosisMin. Value-30.3676%-25.533%-31.788%-24.5428%Max. Value
6、30.2915%13.234%26.176%12.3783%d. 对数收益率零均值检验=0.051对于IBMdata: dailylogre$V2 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 0.05899196 1.68541655 sample estimates:mean of x 故拒绝原假设2对于VWdata: dailylogre$V3 alternative hypothesis: true mean is not equal to 0 95 percent
7、 confidence interval: 0.5955359 1.5644506 sample estimates:mean of x 故拒绝原假设3对于EWdata: dailylogre$V4 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 0.8250521 2.0169110 sample estimates:mean of x 故拒绝原假设4对于SPdata: dailylogre$V5 alternative hypothesis: true mean is n
8、ot equal to 0 95 percent confidence interval: 0.329396 1.271850 sample estimates:mean of x 故拒绝原假设a. 平均年对数收益率=t=19752004Rt2004-1975=t=19752005i=112rti29其中,Rt为第t年对数收益率,rti为第t年第i月的月对数收益率如此SP的平均年对数收益率=9.607479%b. A=Cert=1e0.09607479(2004-1975)=16.21876a.H0:Sraxp=0,=0.05建立检验统计量t=S(r)6TN(0,1)计算结果为t=1.8110
9、6p=0.070132Accept Null Hypothesis故承受原假设b. H0:Kraxp=0,=0.05建立检验统计量t=Kr-324TN(0,1)计算结果为t=-6.23215p=4.60076e-10Reject Null Hypthesis;Accept Alternative Hypothesis故拒绝原假设,承受被择假设a.计算月对数收益率略b. 表3汇率的对数收益率的描述性统计CAUKJPEUMeanStd. Dev.SkewnessExcess KurtosisMin. ValueMax. Valuec. 汇率对数收益率的经验特征Appendixsetwd(F:/Fi
10、nancial Econometrics/Homework Guide/TsayDat)dailyre-read.table(file=d-3stock.txt)dailyre$V2=dailyre$V2*100dailyre$V3=dailyre$V3*100dailyre$V4=dailyre$V4*100summary(dailyre)sd(dailyre)library(fBasics)skewness(dailyre)kurtosis(dailyre)-3dailylogre-dailyredailylogre$V2=log(1+dailyre$V2/100)dailylogre$V
11、3=log(1+dailyre$V3/100)dailylogre$V4=log(1+dailyre$V4/100)dailylogre$V2=dailylogre$V2*100dailylogre$V3=dailylogre$V3*100dailylogre$V4=dailylogre$V4*100summary(dailylogre)sd(dailylogre)skewness(dailylogre)kurtosis(dailylogre)-3t.test(x=dailylogre$V2,alternative=two.sided,mu=0)t.test(x=dailylogre$V3,a
12、lternative=two.sided,mu=0)t.test(x=dailylogre$V4,alternative=two.sided,mu=0)1.2 R语言程序源码setwd(F:/Financial Econometrics/Homework Guide/TsayDat)dailyre-read.table(file=m-ibm3dx7503.txt)dailyre$V2=dailyre$V2*100dailyre$V3=dailyre$V3*100dailyre$V4=dailyre$V4*100dailyre$V5=dailyre$V5*100summary(dailyre)s
13、d(dailyre)library(fBasics)skewness(dailyre)kurtosis(dailyre)-3dailylogre-dailyredailylogre$V2=log(1+dailyre$V2/100)dailylogre$V3=log(1+dailyre$V3/100)dailylogre$V4=log(1+dailyre$V4/100)dailylogre$V5=log(1+dailyre$V5/100)dailylogre$V2=dailylogre$V2*100dailylogre$V3=dailylogre$V3*100dailylogre$V4=dail
14、ylogre$V4*100dailylogre$V5=dailylogre$V5*100summary(dailylogre)sd(dailylogre)skewness(dailylogre)kurtosis(dailylogre)-3t.test(x=dailylogre$V2,alternative=two.sided,mu=0)t.test(x=dailylogre$V3,alternative=two.sided,mu=0)t.test(x=dailylogre$V4,alternative=two.sided,mu=0)t.test(x=dailylogre$V5,alternat
15、ive=two.sided,mu=0)1.3 R语言程序源码r-sum(dailylogre$V5)/(2004-1975)exp(r*(2004-1975)/100)1.4 R语言程序源码z.test-function(skewness,n,alpha,alternative=two.sided)options(digits=6)result-list()t-(skewness/sqrt(6/n)p-pnorm(t,lower.tail=FALSE)result$t-tresult$p-pif(alternative=two.sided)p-2*presult$p-pelse return(
16、Unexpected Error)if(palpha)result$conclusion-(Accept Null Hypothesis)else result$conclusion-(Reject Null Hypthesis;Accept Alternative Hypothesis)return(result)z.test2-function(kurtosis,n,alpha,alternative=two.sided)options(digits=6)result-list()t-(kurtosis-3)/sqrt(24/n)p-pnorm(t,lower.tail=FALSE)res
17、ult$t-tresult$p-pif(alternative=two.sided)p-(min(2*p,2(1-p)result$palpha)result$conclusion-(Accept Null Hypothesis)else result$conclusion-(Reject Null Hypthesis;Accept Alternative Hypothesis)return(result)1.5 R语言程序源码setwd(F:/Financial Econometrics/Homework Guide/TsayDat)fxca-read.table(file=d-fxca00
18、.txt)fxuk-read.table(file=d-fxuk00.txt)fxjp-read.table(file=d-fxjp00.txt)fxeu-read.table(file=d-fxeu00.txt)fxca$V2=log(1+fxca$V2)fxuk$V2=log(1+fxuk$V2)fxjp$V2=log(1+fxjp$V2)fxeu$V2=log(1+fxeu$V2)mean(fxca$V2)mean(fxuk$V2)mean(fxjp$V2)mean(fxeu$V2)min(fxca$V2)min(fxuk$V2)min(fxjp$V2)min(fxeu$V2)max(fxca$V2)max(fxuk$V2)max(fxjp$V2)max(fxeu$V2)sd(fxca$V2)sd(fxuk$V2)sd(fxjp$V2)sd(fxeu$V2)library(fBasics)skewness(fxca$V2)skewness(fxuk$V2)skewness(fxjp$V2)skewness(fxeu$V2)kurtosis(fxca$V2)-3kurtosis(fxuk$V2)-3kurtosis(fxjp$V2)-311 / 11