University of Twente Student Theses


Uncovering the Potential of Deep Learning in Algorithmic Trading : Deep reinforcement learning stock market trading, utilizing a CNN with candlestick images

Tuininga, Frits (2023) Uncovering the Potential of Deep Learning in Algorithmic Trading : Deep reinforcement learning stock market trading, utilizing a CNN with candlestick images.

[img] PDF
Abstract:Our study found that a specific form of technical analysis in combination with deep learning cannot be utilized to outperform the market. According to the research paper titled Deep Reinforcement Learning Stock Market Trading, Utilizing a CNN with Candlestick Images (Brim et al. 2022) , incorporating a Convolutional Neural Network (CNN) into a Double Deep Q-learning Network (DDQN) can help predict the best position to take on stock price movements. The study focuses on the 30 largest stocks in the S&P500 index. The approach employed in the study involves training and testing individual models for each stock. The performance of each model is measured in terms of geometric return, and the average performance across all stocks is calculated at the conclusion of the testing period. The study reveals that the proposed strategy of using a CNN in a DDQN framework outperforms the S&P500 in the period January 1st, 2020 to June 30th, 2020, by identifying advantageous positions using candlestick images. The utilization of visual representations, such as candlestick images, for making investment decisions is commonly referred to as technical analysis. According to prevailing financial theory (Hull 2003) , technical analysis is considered incapable of consistently generating above average returns. However, the study conducted by Brim et al. presents potentially contradictory findings. Our study aims to investigate and determine whether deep learning in combination with technical analysis can consistently outperform the market or that prevailing beliefs regarding the efficacy of technical analysis hold true. We aim to contribute to the ongoing discourse surrounding the effectiveness of technical analysis in the field of financial decision-making. In our opinion, several modifications are warranted in the research methodology employed by Brim et al. Most importantly, their study did not examine whether their model consistently converged to the same solution during training regardless of the initial weight parameter settings. This raises an important question: Are the findings reported by Brim et al. the result of systematic factors or mere chance? To address this issue, we conducted a similar study with modifications to the research methodology. Our modifications encompassed training and testing exclusively on S&P500 data, evaluating a DDQN and a Prioritized Replay Dueling DDQN (PRD-DDQN), training the two models with 100 distinct initial weight parameters to assess convergence, incorporating a non-crisis test set to evaluate model performance in non-crisis periods (Brim et al. focused solely on a crisis period), and evaluating five strategies: daily long strategy in S&P500, trained DDQN, trained PRD-DDQN, untrained DDQN, and untrained PRD-DDQN. The inclusion of untrained models allows us to discern any significant differences in behavior compared to their trained counterparts. The PRD-DDQN model, which is an enhanced version of the DDQN, was included in our analysis with the specific aim of investigating its potential for superior performance compared to the DDQN. Our findings indicate that the trained models did not converge towards a similar solution. Moreover, the average geometric return achieved by each model type was found to be close to 0%. Notably, while the Prioritized Replay Dueling Double Deep Q-learning Network (PRD-DDQN) model demonstrated the ability to establish associations between features (input) and targets (desired output) during the training phase, it exhibited poor generalization and performance during testing. As a result, we were unable to obtain evidence that supports the claim of Brim et al. that a DDQN with an incorporated CNN can outperform the market.
Item Type:Essay (Master)
Zanders, Utrecht, Netherlands
Faculty:EEMCS: Electrical Engineering, Mathematics and Computer Science
Subject:31 mathematics
Programme:Applied Mathematics MSc (60348)
Link to this item:
Export this item as:BibTeX
HTML Citation
Reference Manager


Repository Staff Only: item control page