Skip to Content

IsStationary {PairTrading}

Check the stationarity of time series (especially spread)
Package: 
PairTrading
Version: 
1.1

Description

Check the stationarity of time series by Phillips-Perron Test for Unit Roots and Augmented Dickey-Fuller Test.

Usage

IsStationary(spread, threshold)

Arguments

spread
checked time series object(xts)
threshold
threshhold value of p-value

Values

the vector which have the result of each test passed or not.

Examples

#load library
library(PairTrading)
 
#load sample stock price data
data(stock.price)
 
#select 2 stocks
price.pair <- stock.price[,1:2]["2008-12-31::"]
 
#Estimate parameters & plot spread
reg <- EstimateParameters(price.pair, method = lm)
 
#check stationarity
IsStationary(reg$spread, 0.1)

Author(s)

Shinichi Takayanagi, Kohta Ishikawa

Documentation reproduced from package PairTrading, version 1.1. License: BSD