A Reinforcement Learning Algorithm for Trading Commodities

Giorgi FedericoHerzel StefanoPigato Paolo
CEIS Research Paper
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.
 

Download from REPEC

Download from SSRN



Number: 552
Keywords: Portfolio Optimization, Reinforcement Learning, SARSA, Commodities, Threshold Models.
Volume: 21
Issue: 1
Date: Saturday, February 18, 2023
Revision Date: Saturday, February 18, 2023