Stock Price Change Direction Prediction
This code implements and demonstrates the use of different models
and algorithms to predict the direction of change of stock price.
As we describe in the paper, part 1 compares unstructured to structured models,
where the structure comes into play by grouping the days into weeks.
Part 2 implements structured prediction as well, this time by looking
at the connections between different companies on the same day.
The classifiers include
We implement several aspects and build upon basic skeletons from sklearn, pystruct and pytorch for
the remaining algorithms and training and inference stages.
Our work includes the preprocessing stages - for each day, for each week,
for each company, and for each company pair,
the LSTM Neural Network training phase, structuring and creating the MRF,
adapting the BP for multi-day inference, result analysis and more.
To reproduce the results:
conda create --file env.yaml
conda activate ML36
python main.py
Notes:
utils/Params.py
and can be freely changed.log_file.log
is automatically created and filled.data
folder, following the naming convention <stock_name>.us.txt
STOCK_NAMES
parameter in the Params.py
config file.