EconPapers    
Economics at your fingertips  
 

A Reinforcement Learning Algorithm for Trading Commodities

Federico Giorgi (), Stefano Herzel () and Paolo Pigato
Additional contact information
Federico Giorgi: Università di Roma ‘Tor Vergata’
Stefano Herzel: Università di Roma ‘Tor Vergata’, http://www.ceistorvergata.it

No 552, CEIS Research Paper from Tor Vergata University, CEIS

Abstract: We propose a Reinforcement Learning (RL) algorithm for generating a trading strategy in a realistic setting, that includes transaction costs and factors driving the asset dynamics. We benchmark our algorithm against the analytical optimal solution, available when factors are linear and transaction costs are quadratic, showing that RL is able to mimic the optimal strategy. Then we consider a more realistic setting, including non-linear dynamics, that better describes the WTI spot prices time series. For these more general dynamics, an optimal strategy is not known and RL becomes a viable alternative. We show that on synthetic data generated from WTI spot prices, the RL agent outperforms a trader that linearizes the model to apply the theoretical optimal strategy.

Keywords: Portfolio Optimization; Reinforcement Learning; SARSA; Commodities; Threshold Models. (search for similar items in EconPapers)
Pages: 22 pages
Date: 2023-02-18, Revised 2023-02-18
New Economics Papers: this item is included in nep-big
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://ceistorvergata.it/RePEc/rpaper/RP552.pdf Main text (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:rtv:ceisrp:552

Ordering information: This working paper can be ordered from
CEIS - Centre for Economic and International Studies - Faculty of Economics - University of Rome "Tor Vergata" - Via Columbia, 2 00133 Roma
https://ceistorvergata.it

Access Statistics for this paper

More papers in CEIS Research Paper from Tor Vergata University, CEIS CEIS - Centre for Economic and International Studies - Faculty of Economics - University of Rome "Tor Vergata" - Via Columbia, 2 00133 Roma. Contact information at EDIRC.
Bibliographic data for series maintained by Barbara Piazzi ().

 
Page updated 2024-07-11
Handle: RePEc:rtv:ceisrp:552