Description Usage Arguments Value Examples
View source: R/cointegration.r
Get cointegration information for time series data.
1 |
x |
a data.frame, matrix, or xts object |
a list containting the pairwise cointegration p-values, the p-value of the Kolmogorov-Smirnov test for uniformity in the p-values (null is uniformity), and a measure of the "cointegratedness" of the time series vectors (100 indicates all are cointegrated zero indicates they are all independent).
1 2 3 4 5 6 7 8 9 10 11 | data(aapl_fix)
data(a_fix)
aapl_cons = consolidate_prices(aapl_fix$sys_date, aapl_fix$sys_time,
aapl_fix$td_price, aapl_fix$td_size)
a_cons = consolidate_prices(a_fix$sys_date, a_fix$sys_time,
a_fix$td_price, a_fix$td_size)
# Make the times for AAPL overlap A.
time(aapl_cons) = time(a_cons)[1:nrow(aapl_cons)]
trades = merge(aapl_cons$price, a_cons$price)
names(trades) = c("aapl", "a")
cointegration_info(trades)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.