Giter Site home page Giter Site logo

ds_stock's Introduction

Learning to Make Stock Price Predictions

RNN-based Regression Command (劉祐瑄)

change to src/RNN directory then execute the following command.

python3 train_r_mo2.py [options as below]

RNN-based Classification Command (陳鴻智)

change to src/RNN directory then execute the following command.

python3 train_r_mo.py [options as below]

Data

Put data.csv under data directory.

RNN based Regression & Classification Command Usage

--model name			your model name

--model_type type		choose a model type

--action action			class, train or test

--window size			window size for data

--save_model_path path	        path to save the model

--save_history_path 		path to save the history

--batch_size size		specify the batch size

--nb_epoch epoch		specify the number of epoches

--gpu_fraction num		specify the gpu usage ratio

--loss_function func		specify the loss function

--cell cell			LSTM or GRU

--hidden_size size		hidden size of LSTM(or GRU)

--dropout_rate 			specify the dropout rate for LSTM

--test_y path			path to save the result npy

--result_path path		path to save the result csv

--load_model 			if testing, need to specify the model path

--index i			index of stock

--bin_size size			number of bins for classification	

For more commands, please refer to class.sh & run.sh.

Output

Confusion matrix: saved in fig directory.
    
Prediction curves: saved in fig directory.
    
Numerical results: saved in log directory.
    
Trained models: saved in models directory.
    
You may find the corresponding outputs according to the model name.

Other Machine Learning Approaches (陳昀君)

Data

Put data.csv under data directory.

Command

change to src/ML directory then execute the following command.

python run.py [ML Model] [Bin Size]

Arguments

ML Model

LinR: Linean Regression

LogR: Logistic Regression

SVM: Support Vector Machine

D-Tree: Decision Tree

RF: Random Forest

NN: Neural Network (Multiple Layers Perceptron)

KMeans: K-Means Clustering

Bayes: Bayesian Classifier

Bin Size

A positive integer which equals to the number of bins plus 1.

Example Command

python run.py LinR
    
python run.py LogR 11 (this will perform 10 classes classification)
    
python run.py SVM 11 (this will perform 10 classes classification)

For more commands, please refer to run.sh.

Output

Confusion matrix: saved in fig directory.
    
Prediction curves: saved in fig directory.
    
Numerical results: saved in log directory.
    
Trained models: saved in models directory.
    
You may find the corresponding outputs according to the model name.

ds_stock's People

Contributors

yasheed1995 avatar judyliou avatar yunchunchen avatar

Watchers

James Cloos avatar  avatar

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.