2011/10/25

The pair trading is a market neutral trading strategy and gives traders a chance to profit regardless of market conditions. The idea of this strategy is quite simple.
1 : Select two stocks(or any assets) moving similarly
2 : Short out-performing stock, buy under-performing one
3 : If "spread"(price difference between two stocks) converge, close your position.

So, Let's start to explain how to use this package.
(This example is in PDF manual of this package)

0: Install & load package
You can install and load "PairTrading" package via CRAN in the same way as other packages.

3: Estimate parameters for back-test
To run back-test, you have to estimate parameters historically by using "EstimateParametersHistorically"function. This function do something like "rolling regression" to estimate parameters. This point is different from "EstimateParameter" function.