R - Programs for Financial Time Series

Feb 3rd, 2012
Studypool Tutor
Manchester College
Price: $35 USD

Tutor description

This document outlines how to fit simple ARCH model, test for normality of data, compute descriptive statistics on the data. The student should try these function using a different set of data to enhance learning.

Word Count: 1097
Showing Page: 1/7
library(fGarch)library(fBasics)setwd("C:/Documents and Settings/Administrator/Desktop/4th Year")simple_ret=read.table("d-aapl3idx-0110.txt",header=T);simple_ret#Question1#(a)Transforming to percentage returns and obtaining the descriptive statisticsprice_value.ret1=100*(simple_ret$aapl);price_value.ret1price_value.ret2=100*(simple_ret$vw);price_value.ret2price_value.ret3=100*(simple_ret$ew);price_value.ret3price_value.ret4=100*(simple_ret$sp);price_value.ret4basicstat=cbind(basicStats(price_value.ret1),basicStats(price_value.ret2),basicStats(price_value.ret3),basicStats(price_value.ret4)); basicstat#(b)Transforming Apple stock returns to percentage log returnsprice_value.logret=100*log(1+simple_ret$aapl);price_value.logretbasicStats(price_value.logret)#(c)jarque.bera.test for normalitylibrary(tseries)jarque.bera.test(price_value.logret)#Question 2#(1)Transforming to percentage log returns and obtaining the descriptive statisticssimple_ret1=read.table ("m-xomsp-8010.txt",header=T);simple_ret1price_value.logret1=100*log(1+simple_ret1$xom);price_value.logret1price_value.logret2=100*log(1+simple_ret1$sp);price_value.logret2basicstat1=cbind(basicStats(price_value.logret1),basicStats(price_value.logret2));basicsta1#(2)Normality testnormalTest(price_value.logret1, method = c("sw", "jb"), na.rm = FALSE)normalTest(price_value.logret2, method = c("sw", "jb"), na.rm = FALSE)#(3)Computing Correlation Coefficient, Kendall tau , and Spearman's rho

Review from student

Studypool Student
" Top quality work from this guy! I'll be back! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1819 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors