Learn R Programming

astsa (version 2.4)

djia: Dow Jones Industrial Average

Description

Daily DJIA values from April 2006 - April 2016

Arguments

Format

The format is: xts [1:2518, 1:5] 11279 11343 11347 11337 11283 ...
- attr(*, "class")= chr [1:2] "xts" "zoo"
..$ : chr [1:5] "Open" "High" "Low" "Close" "Volume"

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.

Examples

Run this code

# the file is an 'xts' data file
# if 'xts' is not installed you can still do this

tsplot(djia, ncolm=2, col=2:6)               # no dates
tsplot(timex(djia), djia, ncolm=2, col=2:6)  # dates 

# differencing (on its own) loses an obs 
return = diff(log(djia[,'Close']))
tsplot(timex(djia)[-1], return, col=4, gg=TRUE, main='DJIA')

Run the code above in your browser using DataLab