金融时间序列计算分析题1

计算分析题1

Consider the daily simple returns of American Express (AXP), CRSP value-weighted index (VW), CRSP equal-weighted index (EW), and the S&P composite index (SP) from September 01, 2001 to September 30, 2011. Returns of indices include dividends. The data are in the file d-axp3dx-0111.txt (date, axp, vw, ew, sp).

(a) Compute the sample mean, standard deviation, skewness, excess kurtosis,minimum, and maximum of each simple return series.

结果:

codemeanstandard deviationminmummaxmumskewexcess kurtosis
axp0.0005340.026368407-0.175950.2064850.4597739.592052847
vw0.0002240.013651835-0.089760.114889-0.098327.982133846
ew0.0006260.012080369-0.078240.107422-0.247418.108427735
sp9.42E-050.013779117-0.090350.11580.0081528.532667329

各个简单收益率都为尖顶峰,axp呈明显正偏态,ew呈明显负偏态,vw和sp没有明显的偏态。

(b) Transform the simple returns to log returns. Compute the sample mean,standard deviation, skewness, excess kurtosis, minimum, and maximum of each log return series.
对 数 收 益 率 : r t = l o g P t P t − 1 = l o g ( 1 + R t ) R t 为 简 单 收 益 率 对数收益率:r_t=log \frac{P_t}{P_{t-1}}=log(1+R_t) \qquad R_t为简单收益率 rt=logPt1Pt=log(1+Rt)Rt

结果:

codemeanstandard deviationminmaxskewexcess kurtosis
axp0.0001880.026294-0.193520.1877110.0209929.020499
vw0.0001310.01367-0.094050.108755-0.300357.880082
ew0.0005530.0121-0.081470.102035-0.427328.017712
sp-7.5E-070.01379-0.09470.109572-0.206368.322826

各个对数收益率都为尖顶峰,vw、ew、sp呈明显负偏态,axp没有明显的偏态。

© Test the null hypothesis that the mean of the log returns of AXP stock is zero. Use 5% significance level to draw your conclusion.

答:通过t检验和z检验,AXP的对数收益率在5%显著性水平的双边检验下不为0。

t检验结果图:

z检验结果图:

image-20211129153515634

代码附录:

#导入d-axp3dx-0111.txt文件
data1 <- read.table(
  "D:/Rwork/金融时间序列分析数据/d-axp3dx-0111.txt",
  header=T,stringsAsFactors = F)
#(a) Compute the sample mean, 
#standard deviation, skewness, excess kurtosis,minimum, 
#and maximum of each simple return series. 
library(psych)
myvars <- c("axp","vw","ew","sp")
resulta <- describe(data1[myvars])
#导出结果
library(xlsx)
write.xlsx(resulta,"resulta.xlsx")

#(b) Transform the simple returns to log returns.
#Compute the sample mean,standard deviation, 
#skewness, excess kurtosis, minimum, and maximum of
#each log return series.
data2 <- transform(data1,axp=log(1+axp),vw=log(1+vw),
                   ew=log(1+ew),sp=log(1+sp))
resultb <- describe(data2[myvars])
write.xlsx(resultb,"resultb.xlsx")
#Test the null hypothesis that the mean of the log returns of AXP  stock is zero. 
#Use 5% significance level to draw your conclusion.
library(BSDA)
t.test(x=data2["axp"],mu=0,sigma.x=0.05,alternative="two.sided")
z.test(x=data2["axp"],mu=0,sigma.x=0.05,alternative="two.sided")
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值