Check my blog post "Predict Stock Prices Using RNN: Part 1" for the tutorial associated.
- Make sure
tensorflow
has been installed. - First download the full S&P 500 data from Yahoo! Finance ^GSPC or this link. And save the .csv file to
_data/SP500.csv
. - Run
python main.py --help
to check the available command line args. - Run
python main.py
to train the model.
Such as:
python main.py --stock_symbol=SP500 --train --input_size=5 --lstm_size=128 --max_epoch=50