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
1 2 3
A list of ticker symbols whose data is to be downloaded
from Yahoo!. Alternatively, this may be a
The starting date for which to download the data.
Given in the form
The ending date for which to download the data.
Given in the form
Other parameters to be passed to
data.frame containing the following columns:
series1: Name of the first ticker in this cointegration test
series2: Name of the second ticker in this cointegration test
log: Boolean which if TRUE indicates that the cointegration test is performed on the logs of the series
i1test: Name of the test used for checking that the series are integrated.
urtest: Name of the test used for checking for a unit root in the residual series
alpha: Constant term of the linear relation between the series
alpha.se: Standard error of alpha
beta: Linear term of the linear relation between the series
beta.se: Standard error of beta
rho: Coefficient of mean reversion
rho.se: Standard error of rho
s1.i1.stat: Statistic computed for integration test of first series
s1.i1.p: p-value for integration test of first series
s2.i1.stat: Statistic computed for integration test of second series
s2.i1.p: p-value for integration test of second series
r.stat: Statistic computed for cointegration test (e.g. whether the residual series contains a unit root)
r.p: p-value associated with r.stat
eps.ljungbox.stat: Ljung-Box statistic computed on the innovations of the series
eps.ljungbox.p: p-value associated with the Ljung-Box statistic
s1.dsd: Standard deviation of the first differences of the first series
s2.dsd: Standard deviation of the first differences of the second series
residuals.sd: Standard deviation of the residual series
eps.sd: Standard deviation of the innovations
TRUE if the pair is cointegrated at the 5% confidence level
Matthew Clegg [email protected]
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.