Simple {PairTrading}
Create trading Signal
Description
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.
Usage
Simple(spread, spread.entry)
Arguments
- spread
- the spread of stock pair. an
xtsobject - spread.entry
- Entry level of spread. single scalar.
Details
This function generates trading singal by spread and it's threshold.
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 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
