Create trading signal by the spread of stock pair. This function provide you the simplest method to create signal in the meaning that it just create signals according to whether spread is over a threshold or not.
- the spread of stock pair. an
- Entry level of spread. single scalar.
This function generates trading singal by spread and it's threshold.
#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 for back test params <- EstimateParametersHistorically(price.pair, period = 180) #create & plot trading signals signal <- Simple(params$spread, 0.05)
Documentation reproduced from package PairTrading, version 1.1. License: BSD