Use of Machine Learning in Pairs Trading

Subscribe to newsletter

Machine learning has become an essential tool in modern finance, transforming the way financial institutions and investors approach data analysis and decision-making. In areas such as portfolio management, algorithmic trading, credit scoring, and fraud detection, machine learning enables more accurate predictions, faster processing of information, and the automation of tasks that previously required manual effort. Additionally, machine learning models can adapt and improve over time, learning from new data to enhance their performance.

Reference [1] explored the use of machine learning in pairs trading. Specifically, the authors developed an algorithm to trade the classic Pepsi/Cola pair using three predictive methods: (i) fitting a linear model to real datasets of Pepsi and Coca-Cola stocks, (ii) employing a neural network approach to fit non-linear models, and (iii) utilizing an error correction model (ECM). They pointed out,

Using the NN method, a non-linear model between TextY and TextX was fitted and then the prediction corresponding to testX series was computed. For the spread series, both opening and closing positions were identified in Fig. 5.4. Profit for each pair of opening and closing positions was found and the total profit was also computed.

Subscribe to newsletter https://harbourfrontquant.beehiiv.com/subscribe Newsletter Covering Trading Strategies, Risk Management, Financial Derivatives, Career Perspectives, and More

Comparing the $1.05102 total profit of the lm() method with the $1.049395 profit of the NN model, we can conclude that the NN performs the same as the ’lm() method. Here, NN can perform better than some other methods only if the optimal number of neurons is used in the hidden layers.

In short, the neural network performs similarly to the linear model method but can be improved by optimizing the number of neurons.

Let us know what you think in the comments below or in the discussion forum.

References

[1] R. Sivasamy, Dinesh K. Sharma, Sediakgotla, and B. Mokgweetsi, Machine Learning Algorithmic Model for Pairs Trading, in Machine Learning for Real World Applications, Springer 2024.

Further questions

What's your question? Ask it in the discussion forum

Have an answer to the questions below? Post it here or in the forum

LATEST NEWSIRS plans to cut up to 25% of staff, starting with closing its civil rights office, AP sources say
IRS plans to cut up to 25% of staff, starting with closing its civil rights office, AP sources say

WEST PALM BEACH, Fla. (AP) — The IRS plans to cut as many as 20,000 staffers — up to 25% of the workforce — as part of layoffs that began Friday, two people familiar with the situation told The Associated Press. The job cuts will…

Stay up-to-date with the latest news - click here
LATEST NEWSTrump Team Proposes Ending Clean Energy Office, Cutting Billions
Trump Team Proposes Ending Clean Energy Office, Cutting Billions

The US Energy Department is proposing to shut down its Office of Clean Energy Demonstrations and cut some $9 billion in awards for programs regarding carbon capture, direct air capture, solar and hydrogen, according to documents seen by Bloomberg.

Stay up-to-date with the latest news - click here
LATEST NEWSHow Microsoft's AI chief measures consumer inroads for Copilot
How Microsoft's AI chief measures consumer inroads for Copilot
Stay up-to-date with the latest news - click here
LATEST NEWSGeorge Santos should serve more than 7 years in prison for fraud scheme, US prosecutors say
George Santos should serve more than 7 years in prison for fraud scheme, US prosecutors say
Stay up-to-date with the latest news - click here
LATEST NEWSUkraine says Russia kills 19 in Kryvyi Rih, Moscow says it was targeting military
Ukraine says Russia kills 19 in Kryvyi Rih, Moscow says it was targeting military
Stay up-to-date with the latest news - click here

Leave a Reply