R: financial time series for Tsay (2005, chapter 9[text])
ch09data
R Documentation
financial time series for Tsay (2005, chapter 9[text])
Description
Financial time series used in examples in chapter 9.
Usage
data(m.fac9003)
data(m.cpice16.dp7503)
data(m.barra.9003)
data(m.5cln)
#data(m.bnd) <- documented with ch08, also used in ch09
data(m.apca0103)
Format
m.fac9003
a zoo object of 168 observations giving simple excess returns of
13 stocks and the Standard and Poor's 500 index over the monthly
series of three-month Treasury bill rates of the secondary market
as the risk-free rate from January 1990 to December 2003. (These
numbers are used in Table 9.1.)
AAAlcoa
AGEA. G. Edwards
CATCaterpillar
FFord Motor
FDXFedEx
GMGeneral Motors
HPQHewlett-Packard
KMBKimberly-Clark
MELMellon Financial
NYTNew York Times
PGProctor & Gamble
TRBChicago Tribune
TXNTexas Instruments
SP5Standard & Poor's 500 index
m.cpice16.dp7503
a zoo object of 168 monthly on two macroeconomic variables from
January 1975 through December 2002 (p. 412):
CPI
consumer price index for all urban consumers: all items and
with index 1982-1984 = 100
CE16
Civilian employment numbers 16 years and over: measured in
thousands
m.barra.9003
a zoo object giving monthly excess returns of ten stocks from
January 1990 through December 2003:
AGEA. G. Edwards
CCitigroup
MWDMorgan Stanley
MERMerrill Lynch
DELLDell, Inc.
IBMInternational Business Machines
AAAlcoa
CATCaterpillar
PGProctor & Gamble
m.5cln
a zoo object giving monthly log returns in percentages of 5 stocks
from January 1990 through December 1999:
IBMInternational Business Machines
HPQHewlett-Packard
INTCIntel
MERMerrill Lynch
MWDMorgan Stanley Dean Witter
m.apca0103
data.frame of monthly simple returns of 40 stocks from January
2001 through December 2003, discussed in sect. 9.6.2, pp. 437ff.
Ruey Tsay (2005)
Analysis of Financial Time Series, 2nd ed. (Wiley, ch. 7)
See Also
ch01datach02datach03datach04datach05datach06data
Examples
data(m.apca0103)
dim(m.apca0103)
# 1440 3; 1440 = 40*36
# Are the dates all the same?
sameDates <- rep(NA, 39)
for(i in 1:39)
sameDates[i] <- with(m.apca0103, all.equal(date[1:36],
date[(i*36)+1:36]))
stopifnot(all(sameDates))
M.apca0103 <- with(m.apca0103, array(return, dim=c(36, 40), dimnames=
list(NULL, paste("Co", CompanyID[seq(1, 1440, 36)], sep=""))))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(FinTS)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FinTS/ch09data.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ch09data
> ### Title: financial time series for Tsay (2005, chapter 9[text])
> ### Aliases: ch09data m.fac9003 m.cpice16.dp7503 m.barra.9003 m.5cln
> ### m.apca0103
> ### Keywords: datasets
>
> ### ** Examples
>
> data(m.apca0103)
> dim(m.apca0103)
[1] 1440 3
> # 1440 3; 1440 = 40*36
> # Are the dates all the same?
> sameDates <- rep(NA, 39)
> for(i in 1:39)
+ sameDates[i] <- with(m.apca0103, all.equal(date[1:36],
+ date[(i*36)+1:36]))
> stopifnot(all(sameDates))
> M.apca0103 <- with(m.apca0103, array(return, dim=c(36, 40), dimnames=
+ list(NULL, paste("Co", CompanyID[seq(1, 1440, 36)], sep=""))))
>
>
>
>
>
> dev.off()
null device
1
>