allpairs.egcm: Perform cointegration tests for all pairs of securities in a...

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a list of ticker symbols, downloads the adjusted daily closing prices of each of the symbols from Yahoo, and performs a cointegration test for each pair of symbols. Returns a data.frame containing the results of the tests.

Usage

1
2
3
allpairs.egcm(tickers, 
  startdate = as.numeric(format(Sys.Date() - 365, "%Y%m%d")), 
  enddate = as.numeric(format(Sys.Date(), "%Y%m%d")), ...)

Arguments

tickers

A list of ticker symbols whose data is to be downloaded from Yahoo!. Alternatively, this may be a data.frame containing the price series to be checked, one series per column.

startdate

The starting date for which to download the data. Given in the form YYYYMMDD. Defaults to one year ago.

enddate

The ending date for which to download the data. Given in the form YYYYMMDD. Defaults to today.

...

Other parameters to be passed to egcm

Value

A data.frame containing the following columns:

Author(s)

Matthew Clegg [email protected]

See Also

egcm

Examples

1
2
3
4
5
## Not run: 
    # Check if any of the oil majors are cointegrated:
    allpairs.egcm(c("BP","CVX","RDS.A","TOT","XOM"))

## End(Not run)

matthewclegg/egcm documentation built on May 21, 2019, 12:59 p.m.