Deep Reinforcement Learning and Genetic Algorithm for a Pairs Trading Task on Commodities

42 Pages Posted: 18 Feb 2021

See all articles by Georgios Sermpinis

Georgios Sermpinis

University of Glasgow

Charalampos Stasinakis

University of Glasgow

Xiangyu Zong

University of Glasgow

Date Written: July 1, 2020

Abstract

This paper uses five pairs trading strategies to conduct in-sample training and backtesting on 35 commodities in the major commodity markets from 1980 to 2018. The Distance Method (DM) and the Co-integration Approach (CA) are used for pairs formation. The Simple Thresholds (ST) strategy, Genetic Algorithm (GA) and Deep Reinforcement Learning (DRL) are used to determine trading actions. Traditional DM-ST, CA-ST and CA-DM-ST are used as benchmark models. The GA is used to optimize the trading thresholds in ST strategy, and this is known as the CA-GA-ST strategy. This paper proposes a novel DRL structure for determining trading actions, which replaces the ST decision method based on the standard deviation of the in-sample spread. This novel DRL structure is then combined with CA and called the CA-DRL trading strategy. The average annualized returns of the traditional DM-ST, CA-ST and CA-DM-ST methods are not high, at 0.12%, 0.37% and 0.43%, respectively. Average out-of-sample performance of CA-GA-ST only improves slightly, with an average annual return of 1.84% but an increased risk. CA-DRL provides a satisfactory trading performance: the average annualized return reaches 12.49%; the Sharpe Ratio reaches 1.853; the portfolio has a low possibility (only 5.41%) of generating negative returns.

Keywords: Deep Reinforcement Learning, Pairs Trading, Commodities

JEL Classification: G11, G17

Suggested Citation

Sermpinis, Georgios and Stasinakis, Charalampos and Zong, Xiangyu, Deep Reinforcement Learning and Genetic Algorithm for a Pairs Trading Task on Commodities (July 1, 2020). Available at SSRN: https://ssrn.com/abstract=3770061 or http://dx.doi.org/10.2139/ssrn.3770061

Georgios Sermpinis

University of Glasgow ( email )

Adam Smith Business School
Glasgow, Scotland G12 8LE
United Kingdom

Charalampos Stasinakis

University of Glasgow ( email )

University Avenue
Adam Smith Business School
Glasgow, Scotland G128QQ
United Kingdom

Xiangyu Zong (Contact Author)

University of Glasgow ( email )

Scotland
United Kingdom

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
148
Abstract Views
447
rank
270,390
PlumX Metrics