Pair Trading – Statistical Arbitrage On Cash Stocks

Pair Trading Strategy – Statistical Arbitrage on Cash Stocks coded in Python by Jonathan Narváez as part of the EPAT™ coursework at QuantInsti®.

Please update this article to reflect recent events or newly available information.

Markets and Instruments

AlgoTrader is the first fully-integrated algorithmic trading software solution for quantitative hedge funds. It allows automation of complex, quantitative trading strategies in Equity, Forex and Derivative markets.

The Dept Variance worksheet is used for identifying the discrepancies between the forecasted and the actual values. The Consolidated Actual and Variance worksheets are use for tracking the differences between the forecasted and the actual values.

The summary worksheets provide a one page overview of the budget's forecasted and actual values. Input Worksheets It is important to note that all worksheets with names ending with "Inputs", for example, "Overhead Expenses Inputs" requires inputs to be entered. The values in other worksheets are automatically generated. It is also important to note that all worksheets with names beginning with "Dept" are departmental level worksheets.

These three fields are used for date calculations in the subsequent worksheets. Expenses Categories This spreadsheet allows you to define up to a maximum of 50 expense categories. The most important expense categories should be defined first as the first 5 expense categories will be shown in details in the consolidated budget.

Other expenses beyond the first 5 will be shown as a total value in the consolidated budget. This will allow for better tracking of the expenses. This number does not affect other worksheets.

The names of the different departments can be defined in this worksheet. The names will be used to identify worksheets belonging to the same department subsequently. Overhead Expenses Inputs Overhead expenses refer to expenses that do not directly relate to the generation of profits in each of the departments but are required for the continual functioning of the business.

This worksheet allows the estimated overhead expenses to be entered in the first section named "Plan". The next section "Actual" allows the actual overhead expenses to be entered and subsequently tracked. The diagram below shows the "Plan" section of the worksheet. Allocate Overhead Expenses The overhead expenses can be allocated to different departments. This worksheet allows you to specify the percentage point that the total overhead expenses to be allocated to the different departments.

Other fields are calculated automatically to assist in the allocation of the expenses. The "Plan" section of the worksheet shows the allocation of the budget expenses while the "Actual" section shows the allocation of the actual expenses.

The diagram above shows the "Plan" section of the worksheet. Departmental Worksheets The departmental worksheets allow the different departments to provide sales forecast and plan for expenses in the next 12 months. The actual sales and expenses can be entered subsequently to be compared to the estimated values. Dept Sales Inputs A business earns profits by selling goods, products or services. This worksheet is used for forecasting sales for the next 12 months.

Simply enter the values for the following fields and it will be incorporated into the budget worksheets. This is the usually cost for manufacturing the product. The worksheet supports a maximum of 20 products per department. This worksheet allows the forecasted Price, Volume and Cost to be entered in the first section "Plan". Want to see how some of our most popular strategies perform together as a portfolio? Will one compliment the other?

Will the returns be even higher together? Create a Combo Strategy by simply combining two or more strategies together and then see exactly how your portfolio of screens would've performed together. In this example, you'll be able to see how two great strategies working together create an even greater portfolio. View the Combo performance separately or with the individual strategies overlayed on top. These two strategies have great synergy.

When one slows down, the other one seemingly steps up and vice versa. As you can see, the returns on each are phenomenal. But the combination of both together green line , smoothes out the performance and reduces its volatility and risk. The Big Money strategy in this example showed a The ROE2 strategy showed a The combo strategy both strategies traded together in one portfolio , performed very similarly in re: A great return with even less risk.

One of the many proven, profitable strategies that come loaded with the program. It couldn't be easier to start screening with the Research Wizard. The program comes loaded with some of our most successful stock picking strategies. Most of these start with the Zacks Rank, and then use additional criteria to narrow the list down to a handful of the most promising stock. The Research Wizard comes with dozens of strategies that have performed in both up markets and down markets! You've read about some of these in our popular 'Screen of the Week' articles.

Now you can get them all, already created for you, in the Research Wizard. To find which pre-built strategy matches your investing style, download the free guide, Top 10 Stock Screening Strategies That Make Money. You can use our built in strategies or create you own. Screen with over different fundamental data items on over 8, stocks.

And create an unlimited number of customized items and calculations in our 'Calculation Expression' feature. Virtually anything you want to look for, you can ask the Research Wizard to find and have your answer within seconds.

And once your screens and reports are created, they can then be saved for 'one-click' access for next time. Research Wizard displays results in an easy to read format which can quickly and easily be sorted according to your preferences. It can even be exported to other applications such as Excel.

You'll then have your own set of customized management tools for picking stocks and monitoring your portfolio s , all readily available and automatically updated daily. View a step-by-step demonstration! And with a click of a button, you can access our Zacks Company Snapshots, Equity Research Reports and do all of your charting without ever having to leave the program.

In fact, every time you run a screen, it automatically creates a ticker list of all of your stocks so you with a simple click of the mouse, you can flip thru all of your stock charts.

Backtesting See how good your strategies are before you trade. With backtesting, you can know definitively how effec t ive your stock picking strategy is The Research Wizard tests your strategy and gives you its historical performance.