Pairs Trading Strategy

A pairs trading strategy implemented in MATLAB.


Updated 29 Apr 2013

View License

This demo uses MATLAB and the Technical Analysis (TA) Developer Toolbox ( to develop and backtest a pairs trading strategy. In particular, it is shown how a statistical arbitrage model can be created and backtested over a period of 10 years of historical data. The performace of the model is evaluated and a parameter sweep is performed. The resulting trading strategy is easily adaptable to any other pair of correlated financial instruments.

Cite As

tadeveloper (2023). Pairs Trading Strategy (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes