Since data isnt given can you please provide just r code for questions on how to
ID: 3350823 • Letter: S
Question
Since data isnt given can you please provide just r code for questions on how to solve the problems 2. 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 dividend. The data are in the file d-axp3dx-0111.trt on d2l. (a) Compute the sampde mean, standard deviation, skewness, excess kurtosis, mini- mum, and maximum of each simple return series. 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
Explanation / Answer
Data = read.table( file.choose() ,header
a)
# for mean
mean(data)
#for Standard deviation
sd(data)
# For Skewness and Kurtosis
install.packages("e1071")
library(e1071)
skewness(data)
kurtosis(data)
min(data)
max(data)
b) use log function to transform the each variable in to logtransportetion method
log( data)
# for mean
mean(log(data))
#for Standard deviation
sd(log(data))
# For Skewness and Kurtosis
install.packages("e1071")
library(e1071)
skewness(log(data))
kurtosis(log(data))
min(log(data))
max(log(data))
c)
t.test(log(data$AXP))
d) We test normality using shapiro test.
shapiro.test(log(data$AXP))
####
We will give onlu 4-bit solution Beacuse of chegg rule .
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEST OF LUCK :) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<