Skip to content

philiparvidsson/Sequence-to-Sequence-Learning-of-Financial-Time-Series-in-Algorithmic-Trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequence-to-Sequence Learning of Financial Time Series in Algorithmic Trading

License: CC BY 4.0

This is my bachelor's thesis that I wrote over the course of two months during my final year of studies, earning my Bachelor of Science in Computer Science degree. The thesis was co-authored by my good friend Tobias Ă…nhed.

Click here for revised edition on DiVA.

Abstract

Predicting the behavior of financial markets is largely an unsolved problem. The problem has been approached with many different methods ranging from binary logic, statistical calculations and genetic algorithms. In this thesis, the problem is approached with a machine learning method, namely the Long Short-Term Memory (LSTM) variant of Recurrent Neural Networks (RNNs). Recurrent neural networks are Artificial Neural Networks (ANNs)—a machine learning algorithm mimicking the neural processing of the mammalian nervous system—specifically designed for time series sequences. The thesis investigates the capability of the LSTM in modeling financial market behavior as well as compare it to the traditional RNN, evaluating their performances using various measures.

Acknowledgements

We'd like to express our gratitude to our supervisor, Patrick Gabrielsson, without whom this thesis would not have been written. He has guided us throughout our research and shared with us his vast knowledge and experience in the fields of quantitative finance and machine learning.

Compiling the document

If you want to compile the thesis document on your own, run python make.py in the project root directory. If you intend to work continuously on the thesis, run python make.py watch to have pymake2 automatically recompile the document after a change has been detected.

Prerequisites

Post-mortem

Being limited to roughly two months of work with no real prior knowledge, we felt that there was not enough time to detail a thorough plan for performing the thesis research. Had we started the thesis project with the knowledge we have now, we would have approached the problem differently—likely with a q-learning approach (Gabrielsson, 2015); attempting to predict profitable trading operations rather than predicting market behavior.

Despite this, we feel that we were very successful in developing high-quality software (which is now being used in research) with Python/Keras/TensorFlow for pursuing further research within the fields of econometrics, machine learning and algorithmic trading.

Lastly, and perhaps most importantly, we learned a tremendous amount during the time of writing the thesis and performing the research, greatly expanding our knowledge in the fields of machine learning and finance.

Contributors