# Cointegration for forex using ARMA model to forecast the spread

I am working on an automatized quantitative strategy that use cointegration in Forex. I am backtesting this strategy in Python.

See below the data that I used to backtest: https://drive.google.com/file/d/0B1AEYFPAAAE6amx0RWI1MGh3SW8/view?usp=sharing

My Algorithm is:

• Transform the data with the log return
• Treat Outliers
• Realize the linear regression
• Test for cointegration with ADF test
• If the spread is stationary then apply the best ARMA model
• Forecast and using beta calculation to control the risk

The equity curve of this strategy is: