Giter Club home page Giter Club logo

lstm-cnn_stock's Introduction

LSTM-CNN_Stock

Stock market prediction by using CNN-LSTM neural network. Full explanation is available at [1]. This method uses normalization on whole data instead of window size normalization which paper proposes. Using more features makes an improvement to the accuracy as the following pictures show the difference between using 1 and 6 features in apple stock prediction:

Predicted vs real price after 200 epoch using 1 feature

Predicted vs real price after 200 epoch using 6 feature

Reference

[1] Eapen, J., Bein, D., & Verma, A. (2019). Novel deep learning model with cnn and bi-directional lstm for improved stock market index prediction. In 2019 IEEE 9th Annual Computing and Communication Workshop and Conference (CCWC) (pp. 0264{0270). doi:10.1109/CCWC.2019.8666592.

lstm-cnn_stock's People

Contributors

soroush98 avatar

Stargazers

Santosh Kumar avatar Prithvi Gupta avatar pymame avatar  avatar  avatar Pun King Fung avatar Horace Lai avatar Kyle HEO avatar  avatar Damjan D avatar Fahri Firdausillah avatar mehrab avatar  avatar Milad Farzalizadeh avatar Ali Saud avatar

Watchers

James Cloos avatar  avatar Ali Saud avatar

lstm-cnn_stock's Issues

Where is the 'multiple pipeline' in LSTM_CNN_Multi.py ?

Hi,
Thank you for your very helpful implementation codes.

I got some questions about 'LSTM_CNN_Multi.py'.

According to paper, the proposed model consists of 3 multiple pipeline.
However, I can not find the multiple pipeline in the code file...

Is there any something that I miss..?

Models are getting information of the future

Hi, I came across your repo

in the following section of your code you are providing information about the future to the model:

for i in range(0 , len(stock) - window_size -1 , 1): first = stock.iloc[i, 4] temp = [] temp2 = [] for j in range(window_size): temp.append((stock.iloc[i + j, 4] - first) / first) # for j in range(week): temp2.append((stock.iloc[i +window_size, 4] - first) / first) # X.append(np.array(stock.iloc[i:i+window_size,4]).reshape(50,1)) # Y.append(np.array(stock.iloc[i+window_size,4]).reshape(1,1)) # print(stock2.iloc[i:i+window_size,4]) X.append(np.array(temp).reshape(50, 1)) Y.append(np.array(temp2).reshape(1,1)))

for i = 0 temp gets the first 50 close values of the csv
these are beeing saved in the X variable
but you also save the 50th close value in temp2 and therefore in Y
This means that the model already has the value we want to predict in Y

Also the accuracy the model has after training for only 1 epoch is to good to be true

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.