This download contains the files used in the April 14, 2011 webinar titled Cointegration and Pairs Trading with Econometrics Toolbox. It is recomended that you watch the recording of the webinar:

You can also read the published demos:

Copyright 2011, The MathWorks, Inc.
All rights reserved.


TO Run the demos

Add the folders to your MATLAB path, then open Demo1_CIWebinar.m in the editor. You can walk through the example using cell execution (Ctl+Shift+Enter or using the Execute Cell and Advance icon in the editor toolbar.

Contents of this download

Demo scripts and folders

.                      Demo1_CIWebinar.m      README.m               
..                     Demo2_Pairs_Trading.m  html                   
Charts                 Models                 
Data                   README.asv             

Plotting utilities

dir Charts
.             ..            pairsChart.m  

Data source: Spot price of Brent Crude and West Texas Intermediate. You can update through your data provider, or through the free site:

dir Data
.                      MinuteBars.accdb       
..                     getMinuteDataFromDB.m  

Modeling files

dir Models
.                 pairs.m           parameterSweep.m  
..                pairsFun.m        

Published demo files

dir html
.                           Demo2_Pairs_Trading.html    
..                          Demo2_Pairs_Trading.png     
Demo1_CIWebinar.html        Demo2_Pairs_Trading_01.png  
Demo1_CIWebinar.png         Demo2_Pairs_Trading_02.png  
Demo1_CIWebinar_01.png      Demo2_Pairs_Trading_03.png  
Demo1_CIWebinar_02.png      Demo2_Pairs_Trading_04.png