Skip to content

Stock price predicetion (classification and regression) using LSTM.

License

Notifications You must be signed in to change notification settings

dr413677671/LSTM-stock-price-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues

Logo

LSTM-stock-price-prediction

Stock price predicetion (classification and regression) using LSTM.


Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Hyper-parameter Search
  4. Classification
  5. Regression
  6. Acknowledgments

About The Project

Stock price predicetion (classification and regression) using LSTM. Integrated with another homemade light-weight quant framework. Support Sliding windows, hyper-parameter search, backtesting, Reversing Trade and etc.

LSTM股票价格预测,调用了另一个自制框架。支持滑窗, 超参数搜索, 反向对冲, 回测等。

Features:

  • Model
    • LSTM
    • Seq2seq
    • Resnet50-1D
  • Prediction
    • Signal Classification (Buy, Sell, Hold) 信号分类
    • Regression (avg price in next window) 回归
  • Backtesting Metrics 回调指标
    • Sharpe 夏普
    • Maximum Drawdown 最大回撤
    • Alpha (regression/annualized) (回归法/年化)
    • Beta (regression/annualized) (回归法/年化)
    • Interval rate of return 平均区间收益率
    • Annualized rate of return (baseline/stretegy) 年化收益率 (基准/策略)
    • backtesting rate of return 策略回测收益率
  • others
    • Reversing Trade Support 反向对冲回调策略
    • Sliding Window 滑窗生成器
    • focal_loss
    • class_weighed_sampling 分类权重采样 (抑制类别不均衡)

Built With

  • Tensorflow
  • Keras

Getting Started

Prerequisites

Clone repo.

git clone https://github.com/dr413677671/LSTM-stock-price-prediction.git

Installation

pip install <repo-directory>/requirements.txt

Usage

Prepare raw data in csv format.

Run relervant jupyter notebooks, and use pandas.dataframe to read raw_data.

.
├── README.md
├── docs 
├── Regression                   # Signal Regression 
├── hypertune                    # Hyper-parameter tuning
├── classification               # Window Classification
└── lib 
    └── quantflow                # Homemade quant framework 

Hyper-parameter Search

Classification

Regression

Contact

github    YouTube    zhihu

(back to top)

Acknowledgments

Based on these brilliant repos:

(back to top)