Pairs Trading by Eugene

This is from S&C March 2001 issue.
Pairs Trading is a very interesting strategy because it is "market neutral". That means it should perform equally well in bull or bear markets. Two closely correlated stocks are chosen. Whenever there is a strong deviation from their "should-be" ratio, one is bought and the other sold short, hoping that they will soon come back to their "normal" ratio. Additional information and a complete explanation of the strategy can be found in the S&C article by Stephane Reverre.

To use this script, you must create a watchlist which contains the symbols INTC and MSFT (for example).

When you use SetContext to enter a long with a different secondary symbol, after the trade RestoreContext reverts to the original symbol. However, when accessing the position object, for example, with IsLastPositionActive, there is no need to SetContext to the symbol traded in order to find the Position object. Passing the Position object to the exit signal should be sufficient.

Author: Eugene
Category: Intermarket
Creation Date: 8/24/2009
Licence: Freeware
Availability: Globally
Instructions for Script Download
  1. In Wealth-Lab client software, open the Strategy Explorer (Ctrl+O)
  2. Click the "Download..." button
  3. Click "Begin Download"
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).