These are ML and NN methods ready to launch out of the box. Designed to be easy for those looking to learn new techniques for stock prediction. These examples are meant to be simple to understand and highlight the essential components of each method. Examples also show how to run the models on current data in order to get stock predictions.
pip install -r requirements.txt
Download the starter data:
example_data
directory to this project folder.Run any of the scripts in simple_examples
.
Designed for easy configuration of what hyperparameter values are explored. Multi-threaded processing for quick runtimes.
hyperparameter_tuning
config.py
to suit your needshyper_main.py
Hyperparameter readme here: Hyperparameter Tuning
This code can be run with the example stock data available at D.AT example data.
This dataset encapsulates 5 years of price data of the companies comprising the S&P 500, segmented into intervals of 30 trading days each. The data in each segment has been normalized using a method where values are divided by the most recent data point within the segment. Each row in the dataset represents a specific segment, providing a snapshot of the stock data available on a particular trading day. Rows are labeled to indicate when the stock had a minimum gain of 5% within the subsequent 10 trading days.
train.csv
: Of the 5 years, it contains the first 4 years of data.test.csv
: Of the 5 years, it contains the final year of data.latest.csv
: This file contains data from the most recent trading day for all stocks listed. While it lacks labels (since these pertain to future events), each row maintains the same feature vector structure as those in the train
and test
files. The rows commence with the stock ticker symbol, serving as a key tool to pinpoint stocks with promising prospects for good performance.The example data is static and does not contain current stock price values. Recent data customizable with different trading strategies and feature engineering options can be downloaded for free at D.AT.