/LSTM_stock_trading

Trained a LSTM model to predict the the movement of the Chinese stock market indices.

Primary LanguagePythonMIT LicenseMIT

LSTM_stock_trading

This project is built on the top of https://github.com/happynoom/DeepTrade_keras/, thanks to @happynoom for his code and help.

Some of the added features are:

  1. In the feature extraction part, the features are not stored using many loops, but instead storing them into .npy files, which is much faster.
  2. Added the part to automatically test all the stock indices data.
  3. Added the script to do some basic backtesting by using ffn module, e.g., plot the cumulative return lines, calculating performance data and save them to local files.
  4. Fetch in more data from tushare module to backtest the more recent dataset.
  5. Added the code to compare the signals generated by using the market data 3 minutes before close time with the market data just after close time, because you can't actually trade with the close price after the market closed, and you have to count in the time it spent to generate signals.

Notes on files

Not all files are uploaded yet, some features files that I have extracted are just too large to upload( larger than 25M), thus you have to extract the features by yourself.