Study how to combine GAN, LSTM, NLP, and ARIMA into one time-series prediction pipeline.
Use the notebook as a template for building your own stock or asset price prediction system.
Learn how Bayesian optimization with reinforcement learning can tune a GAN during training.
Explore how BERT-based sentiment analysis of financial news can be added as an input signal to a trading model.
Requires multiple GPUs and the MXNet framework with Gluon API, published January 2019 so some dependencies may be outdated.
This repository is a Jupyter notebook walkthrough for building a stock price prediction system, published in January 2019. The author works through predicting daily price movements for Goldman Sachs stock using a combination of AI techniques stacked together in one pipeline. The central model is a Generative Adversarial Network, or GAN. In this setup, one neural network (the generator) attempts to produce realistic stock price sequences, while a second network (the discriminator) tries to tell real data from generated data. By competing against each other during training, both networks improve. The generator uses an LSTM, a type of network suited to time-series data, and the discriminator uses a convolutional neural network. What makes the notebook unusual is the number of input signals it feeds into this model. Beyond basic historical price data and standard technical indicators like moving averages and Bollinger bands, it incorporates NLP sentiment analysis using BERT to process financial news, Fourier transforms to capture long-term trend directions, autoregressive time-series modeling via ARIMA, and an autoencoder to extract higher-level patterns that simpler features might miss. Correlated assets such as commodities and currency pairs are also included. Tuning the GAN's settings is handled through Bayesian optimization combined with reinforcement learning techniques (including Rainbow and PPO algorithms), which decide when and how to adjust the model during training. The code uses MXNet with its Gluon API and is designed to run on multiple GPUs. The notebook includes a disclaimer that this is an educational exploration of techniques, not investment advice. The full README is longer than what was shown.
← borisbanushev on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.