Tutorials

Step-by-step walk throughs on using the PairsTrader technology and system

Create/login to account

There are two accounts on PairsTrader.com: free and subscribed.

 

Free accounts allow you participate in the online community, forum, etc. You can register for a free account at any time.

 

To use the web application you'll need a subscription. You can purchase a subscription without registering for a free account; if you do, an account will be automatically created and sent to the e-mail you provide. You may also add a subscription to a free account at any time.

 

Once you have purchased a subscription you'll be able to login to the web application for unlimited and uninterrupted usage.

 

Desktop Installation

This guide will show you a few simple steps to install the web application straight to your desktop so that you don't have to open your browser to logon to the PairsTrader System.

 

1) Navigate to app.pairstrader.com in your web browser

2) Click the desktop installation button at the top of the application:

3) Select whether you'd like a shortcut to appear on the start menu or the desktop:

 

4) The application will install and immediately open in a separate window. From now on, you can launch the web application from your desktop without having to open a web browser.

 

 

 

Comparing/Analyzing pairs

This guide will show you how to retrieve, compare, analyze and rank potential pairs trades.

 

First you'll need to download some pairs. A pair is composed of two financial assets, or two legs. PairsTrader refers to these legs as A (the first asset) and B (the second asset). Swapping the legs of a pairs trade would create a statistical mirror-image, but the resulting position would be the same.

Enter ticker symbols in these search boxes. If you're unsure of the ticker showing up, you can start typing the name of the firm and auto-complete will help you instantly find the ticker symbol of the firm you're looking for. Either hit ENTER or click 'Go' and wait for the pair to be retrieved & processed. (If you're logged in with a subscribed account, you'll be able to download pairs simultaneously; if not, you'll have to wait for the current pair to finish processing before retreiving the next one).

 

Below is a list of pairs I have downloaded. You can see which ones you have downloaded by locating the 'My Pairs' panel on the lower left. If you scroll to the right in this spreadsheet you'll see an "X" button - click it to remove the pairs from all your analysis & charting windows. By selecting different pairs from this list you can bring up different charts. Select multiple pairs to plot them all out on a single chart.

 

You can obtain quick summary information by clicking from one pair to the next without having to switch to the Compare & Analyze tab. This information is available immediately above in the Quick Info panel:

 

Switch to the Compare & Analyze tab. Here you'll find all your pairs with detailed statistical information. You can group, sort, find position information and business summaries all from this page.

 

By clicking on any particular pair, you'll see the position summary that the PairsTrader System is telling you to long and short if you decide to make this trade, as well as the business summaries of each firm. Position information is derived from the statistical metrics and is designed to allow your position to track the Pair Index. In this way, you have the highest probability of profiting if or when a reversal happens.

 

Clicking on business summary will show you side-by-side descriptions of the two firms (this is only available for non-ETF, equity positions)

 

You can also group data by various statistical metrics on this page. Simply select a metric at the top next to "Group data by:" and click "Add". Below is a shot of some pairs grouped on the Pair Index. For any statistical metric the PairsTrader System automatically determines what's a high, low or moderate value. In some cases additional groups for "Extremely high" or "Extremely low" will be displayed.

 

You can group on more than one dimension. All your groups are displayed at the top next to "Expand All" and "Collapse All". To get rid of the group click the "X" button next to its name.

 

Note: some features in this tutorial may not be available without a subscribed account, including retrieving unlimited pairs, simultaneous downloads and uninterrupted application usage. Get started with a subscribed account to access all these features and more!

 

 

Backtesting

This guide covers how to backtest a pairs strategy to see if the model's indicators would have made or lost money in the past. This is also known as paper-trading. The web app will create virtual positions and trade against historical data as though the data feed were live. This way, you can "replay" a strategy over time to see whether it would have made or lost money.

 

The Pairs Trader Web App allows you to:

 

Set triggers

A trigger is something that causes a historical simulated position to be put on. This is your primary trading indicator. It is required and can be either the Pair Index or the Z-Scored Pair Index.

(click for larger view)

Pair Index is specified as the deviation from 100, the base value of the index. For  example if you require an entry threshold of 5 and an exit threshold of 2, positions will only be taken when Pair Index rises above 105 or below 95. The position will subsequently be closed out when it falls to within 98 - 102. The signal is naturally mean-reverting.

Z-Scored Pair Index is similiar, except the entry / exit indicator thresholds are interpreted as standard deviations on the normal distribution, not Pair Index deviations from 100. For example if you require an entry threshold of 2 and an exit threshold of 1, positions will be only taken when Pair Index is at least 2 standard deviations above the mean or at least 2 standard deviations below the mean (the mean is calculated as the 60-day moving average on Pair Index). If Pair Index is normally distributed, these outcomes are observed with a 5% probability. The position will be subsequently closed when the z-score falls to within 1 standard deviation of the 60-day moving average. These outcomes occur with 68% probability on the normal distribution.

The normal distribution looks like:

(click for Wikipedia article)

A word of caution: the Z-Scored Pair Index is usually very useful for backtesting. However, interpretting standard deviations as probabilities on the normal distribution will vary from pair to pair because only certain pairs will have a normally-distributed Pair Index. These are the pairs that are mostly likely to have an actual statistical relationship, meaning they are cointegrated.

 

Set trade conditions

A condition is optional. Turn conditions on or off by checking the checkbox next to each condition name. When turned on, these conditions are required to be met before making the trade. If the trigger signal indicates a position should be opened but one or more trade conditions are not met, for example, the position will not be opened. Setting more conditions makes the backtest inherently more conservative.

Conditions are very helpful to control various scenarios. For example, you may find large jumps in Pair Index indicate momentum in either leg of the stock, or a decoupling of business models between the firms. If such decoupling is present, reversal speed and correlation are likely to go down. Setting conditions for reversal speed and correlation and making these values high will make the strategy more conservative and should help avoid trading in situations where the stocks are becoming decoupled.

 

Position capital

This is the capital applied to each position. Dollar and percentage returns are based on this number. You should set this number to an amount you typically trade with per position.

 

See the results

Once you run a backtest you can see aggregate P&L and return, and best, worst and average trade statistics for every pair you have downloaded in the web app.

(click for larger view)

Click any row to bring up a detailed list of positions.

 

Drill down into results

Simply click any position to get a detailed view of various conditions and trigger values at the time the position was entered and exited. This way you can refine your backtest to eliminate poor positions and keep the good ones.

(click for larger view)

 

Plot the results

After you run a backtest the results will automatically be charted. Simply fip back to your Pair Index Chart tab.

Green highlights are periods in which the strategy made money; red highlights are periods in which it lost money. Hover your mouse over a particular period to see the dollar and percentage returns and the description of the trade.

(click for larger view)

To turn off backtest highlighting simply uncheck the "Show Backtested Positions" checkbox.

 

Forecasting

This guide walks you through forecasting a pairs strategy, and understanding the output of the forecast model to make better decisions about which pairs to trade.

This tutorial is split into 3 sections:

 

The forecast model will generate forecasts along different points of the distribution curve. There are primarily two ways to view this data without information overload - by comparing a single forecast path across multiple pairs or looking at the entire forecasted distribution for a single pair.

 

Comparing a single forecast path across multiple pairs

A forecast path is a particular percentile on the forecast distribution. You can turn on or off different paths by checking the percentiles at the top of your 'Forecast' tab. A natural starting point is to compare the median, or 50th percentile, of multiple stocks. Make sure only the 50th percentile is checked and highlight multiple pairs by holding CTRL. The example below illustrates comparing the medians across two pairs: AMD / INTC and MSFT / GOOG. These are both technology pairs, but the former is a hardware-related sub-industry and the latter is a software-related sub-industry.

(click for larger view)

 

Viewing full forecast distribution for a single pair

In this example we're looking at all the percentiles for a particular pair. You don't want to select multiple pairs here because it'll plot too many series & create information overload. To do this, make sure all the percentiles you want to look at are checked on at the top of the page. Then select a particular pair. The screenshot below shows the forecasted return distribution for AAPL / MSFT.

(click for larger view)

Understanding edge

Viewing the forecast distribution naturally begs the question, "How much am I likely to make on this pair?"

Other models in the PairsTrader System is trying to assess whether a particular trade is a good opportunity or not. The forecast model, on the other hand, is about answering questions like, "If I trade this pair, how much can I make, probabilistically?" However good or bad a certain trade is, no model or trading system is omniscent and any individual trade has some probability of making money and some probability of losing model.

Pairs trading is all about consistency - and that means taking positions where you're more likely to win than lose. To do this, you need to take positions where the amount received when you win is more than the amount you give up when you lose. That's house Vegas does it and it's called edge, advantage, or "house odds".

You can measure how much edge you have in a trade by looking at edge statistics in the PairsTrader System.

There are 3 edge statsistics:

 

The 'probability' in these measures of edge refers to how much probability mass is required to warrant the calculated edge. Low probability edge is calculated as the 75th percentile forecasted return less the 25th percentile forecasted return. So the probability mass required to push away on both sides of the median is 25%. These events have a high probability of occuring.

High probability edge is the difference of the 90th percentile less the 10th percentile. You're requiring outcomes to have a higher probability, 40%, of being away from the median. These events are less likely to be observed.

The XPE is the difference between the returns for the 95th and 5th percentiles. 45% probability mass is required for outcomes from being away from the median. These events are even less likely to happen.

 

You should always think of edges as spreads, with LPE as the spread measuring events closest to the forecasted median. if the model is right, these events have the highest probability of being observed and high LPE values indicate a very good pairs trading opportunity.

If you swing for the fences you might want to pay attention to HPE or XPE - these values will typically be higher but have less chance of being realized. When realized though, you'll win in big ways.

 

Making a trade

This guide will walk you through setting up a pairs trade according to the prescriptions laid out by the model.

 

When you have a pair you want to trade, you need to set it up properly to capture the statistical arbitrage. This means going short and long the right legs in the right quantities.

When you decide a pair you want to trade, locate the pair under your 'Compare & Analyze' tab and highlight it. There you will find a complete description on how to trade the pair:

(click for larger view)

 

These quantites are determined by the capital-per-position you have set on your settings page. Click the settings icon

near the top of the web app to bring up your settings page to modify this page:

(click for larger view)

 

Setup an automated alert

This tutorial covers how to set up an automated alert to go to your e-mail account.

 

It's impossible to follow all assets or possible trading strategies in any market, especially pairs. You can setup an automated alert to have our servers do the heavy lifting of regularly scanning the market to find profitable opportunities delivered to you via e-mail.

 

To setup an automated alert first go to the 'Automated Strategy Alerts' tab and enter a list of stocks you want to follow on the right. Only stocks within the same industry will be eligible for a match, so you may want to break up your alerts by industry. This minimum associativity requirement guarantees that even loose conditions won't generate signals that ultimately waste your time.

 

Next choose which metrics you want to act as signals. Remember that any of these metrics may act as signals so adding more signal-types naturally tends to create more signals. You may consider breaking up alerts by closely related signal types. You'll receive details on why you were alerted about a particular pair in your triggered alerts (available from both your e-mail and archived historically from the web application).

Make sure to save your automated alerts when you're finished.

(click for larger view)

 

In addition to receiving daily e-mails, all your triggered alerts will be available from the 'My Triggered Alerts' tab. Here you'll find the reasons on why you were alerted on a particular pair. Additionally you can download or update your existing pairs from this page.

(click for larger view)

Triggered pairs will never be deleted. You can use this system to practice your pairs trading by discovering what works and what doesn't work over time.