Git Product home page Git Product logo

financial-datamining's Introduction

Financial-DataMining

This repo contain codes to predict future stock price by machine learning algorithms.

Models

A series of ML models are implemented.

  • Random Forest
  • AdaBoost
  • XGBoost
  • DNNs
  • CNNs
  • RNNs
  • Transformer

Environment

  • Python 3.6
  • Scikit-Learn 0.20
  • XGBoost
  • PyTorch1.0

Dataset

Due to credential reason, raw dataset cannot be publicised for now. Processed data may be uploaded later.

Raw data is first processed via Data_Preprocess.ipynb, which is fundamental step for whole project.

How to RUN

  • For those ensemble models, simply run corresponding jupyter notebooks cell by cell

  • For NN models, go to ./Regression_NN run Training.py

    Training.py has a series of parameter you can adjust. For the details you may need to read the Training.py source code.

    Here is an example for training Transformer model:

    python Training.py --batch_size 1024 --prev_step 30  --suffix pre30_class_raw --num_classes 1 --epochs 30 --feature_size 256 --normalize --layers 1  --model Transformer

Results to show (MSE metric)

Model Random Forest AdaBoost XGBoost CNN DNN GRU LSTM Transformer
Raw Data 0.555 0.601 0.546 0.551 0.554 0.548 0.549 0.545
DWT 0.512 0.587 0.481 0.495 0.488 0.489 0.485 0.482
DWT merge 0.490 0.582 0.464 0.486 0.473 0.486 0.484 0.471
SAE 0.543
Feature Synthesis 0.554 0.593 0.545

Trading Strategies:

Codes are in one of my partners' repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.