# hwk3 - IEOR E4709 Data Analysis for Financial Engineers...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IEOR E4709 Data Analysis for Financial Engineers Solution 3 1. Problem 1.1 in Tsay. Solution: Download the data from into S-Plus and save it as a variable d.3stock. Parts a, b, c: Use S-plus code as follows: &amp;gt;# Express the simple returns in percentage &amp;gt;simplereturn.percentage = 100*d.3stock[,2:4] &amp;gt;# Compute the sample mean, standard deviation, skewness, excess kurtosis, &amp;gt;# minimum and maximum &amp;gt;apply(simplereturn.percentage, 2, mean) &amp;gt;apply(simplereturn.percentage, 2, stdev) &amp;gt;apply(simplereturn.percentage, 2, skewness) &amp;gt;apply(simplereturn.percentage, 2, kurtosis) &amp;gt;apply(simplereturn.percentage, 2, min) &amp;gt;apply(simplereturn.percentage, 2, max) #compute t-statistics apply(simplereturn.percentage, 2, mean) *sqrt(nrow(d.3stock))/apply(simplereturn.percentage, 2, stdev) # Transform the simple returns to log returns &amp;gt;logreturn = log(1+d.3stock[,2:4]) # Express the log returns in percentages &amp;gt;logreturn.percentage = 100*logreturn &amp;gt;# Compute the sample mean, standard deviation, skewness, excess kurtosis, &amp;gt;# minimum and maximum &amp;gt;apply(logreturn.percentage, 2, mean) &amp;gt;apply(logreturn.percentage, 2, stdev) &amp;gt;apply(logreturn.percentage, 2, skewness) &amp;gt;apply(logreturn.percentage, 2, kurtosis) &amp;gt;apply(logreturn.percentage, 2, min) 1 &amp;gt;apply(logreturn.percentage, 2, max) #compute t-statistics apply(logreturn.percentage, 2, mean) *sqrt(nrow(d.3stock))/apply(logreturn.percentage, 2, stdev) Part d. We can use the -test here. The statistic is given by = mean size stdev Summary statistics of daily returns from January 1999 to December 2008. Percentage simple returns: 2515 data points Stock Mean St. Dev. Skew Ex. Kurt Min. Max. t-ratio AXP 0.015 2.446-0.035 6.070-17.595 17.927 0.299 CAT 0.060 2.170 0.012 4.470-14.518 14.723 1.375 SBUX 0.048 2.6832....
View Full Document

{[ snackBarMessage ]}

### Page1 / 7

hwk3 - IEOR E4709 Data Analysis for Financial Engineers...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online