Coder Social home page Coder Social logo

borisbanushev / stockpredictionai Goto Github PK

View Code? Open in Web Editor NEW
4.0K 4.0K 1.6K 1.88 MB

In this noteboook I will create a complete process for predicting stock price movements. Follow along and we will achieve some pretty good results. For that purpose we will use a Generative Adversarial Network (GAN) with LSTM, a type of Recurrent Neural Network, as generator, and a Convolutional Neural Network, CNN, as a discriminator. We use LSTM for the obvious reason that we are trying to predict time series data. Why we use GAN and specifically CNN as a discriminator? That is a good question: there are special sections on that later.

stockpredictionai's People

Contributors

borisbanushev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stockpredictionai's Issues

VAE_data

I'm having issues with the following code in 3.8.1 section

batch_size = 64
n_batches = VAE_data.shape[0]/batch_size
VAE_data = VAE_data.values

Where VAE_data is coming from?

Source Code Request for academic research

Hi Boris
Thank you for sharing your expertise, very appreciated.
I fully understand that you hezitate to disclose the source code.
Anyway I would very appreciate to get the source code for academic purposes.
Citation of your work is guaranteed.

Thanks!

Regards
Ilja

'dataset_total_df' is not defined

Hi Boris,

thanks for sharing your repo. I am trying hard to replicate your work in a separate notebook and I am struggling with the shape of the total dataset. The document states roughly what's in it and I am trying to reverse engineer, but I stumble over assumed data structures all the time so it wouls be super helpful to post the output of:

dataset_total_df.shape()

Thank you and keep the good work!

Fundamental analysis using BERT

Hi Boris,

I really appreciate your amazing work. I am very interested in seeing how you apply BERT into sentiment analysis of news. Could you share how you get the daily news data from 2010? It would be great if you could create a new repo only for BERT.

Thanks!
Duke

Request for Code

Loved the write up. Could you provide the code behind it? Thank you. I sent you a linkedin request as well.

Request for code

Hello Boris,
I got fascinated with your notebook, and would really appreciate if you share your code with me.
All the best

dataset

How can I get this GAN Source code or the dataset "panel_data_close.csv" file .
I am trying to runing this python code , but I missing this data.
Thanks

Code request

Hi

I'm working on a similar project that was focused on cryptocurrency when I came across your notebook.

You blew my project out the water.

Would like to see if we can get this working on cryptocurrency aswell.

Thanks from South Africa!
[email protected]

Request for code

Hi,
first of all thanks for sharing your work, really interesting approach.
Is it possbile to have the code for the part about GANs?

Thanks in advance

This is amazing

This is really amazing work, I was wondering if it's possible to send me the code so I can get a better understanding of using ML. Thanks

Request for the code!

Dear sir:
I have been studying the relevant content recently, and I am inspired to read your artical. I would be very grateful to get the full code .My email address is [email protected]. Thank you very much!
Thanks a lot
Yaky

PHD Research: code request

Dear Boris,

First of all, congratulations for your awesome work. I am amazed about it.

I am writing because I am currently studying a PHD in IIT in Chicago about applications of ML in High Frequency Trading.

I would like to connect with you and request your code since I think it could be very helpful and give me a lot of progress in my research.

Of course, I promise to cite you and your work in future publications.

Many thanks in advance for your kindness,
Angel Satorres

Enquiry...

Hi Boris,

Thanks for sharing the article. It had provided me with some wonderful insight.

I am working on stock prediction as well in my Master Project.

There are some questions I would like to ask you.

  1. What are the steps you applied when statistical checks failed?
  2. How long is the training takes with hyperparameter optimization enabled?
  3. How XGBoost for feature importance influence the overall result? Is there any additional bias/weighting in the network?

Appreciate if I can get the source code from you. This would help me a lot to understand your ideas/research.

Request for Code

Boris,

I read your article on Medium and was very impressed. I would very much like to see your code and understand some of the techniques you used with the GAN. Thanks!

Code Request

Hi Boris,
Excellent write up. Thanks for that. I was wondering if you could share the code for the article.
Thanks,
Sid

Multi-step or single-step prediction?

First of all, great project, a lot of great ideas!

But my Question is:
Does this project predict the stock price of the two test years in single-day-steps or in a multi-step prediction for all 2*365 days in one turn?

this graph looks like you did a full year prediction (so multi-step)

but here you define the LSTM model for predcition with a single output taking always a sliding window of 17 days to predict the next day.

As we can see, the input of the LSTM are the 112 features (dataset_total_df.shape[1]) which then go into 500 neurons in the LSTM layer, and then transformed to a single output - the stock price value.
The logic behind the LSTM is: we take 17 (sequence_length) days of data (again, the data being the stock price for GS stock every day + all the other feature for that day - correlated assets, sentiment, etc.) and try to predict the 18th day.

So did you predict the two years without every feeding any data of it in the model (which would be the multi-step prediciton) or did you always predict one day after another while moving the 17 days window forward in single-steps?

Request for code

Hey Boris,

Thanks for your post! I'm very impressed by the results of your model, I'm also trying to build a GAN model for time series forecast. However, the generator and discriminator do not converge. Can I l have your code of building GAN? That would be really helpful! Really appreciate! My email address is [email protected]

Thanks,
Yujie

Code statistical checks

It would be awesome to get some info about statistical checks. As this is important for every kind of ML I would like to see the code used here. From what I've read checks are applied and are straightforward, but not mentioned anywhere about what types were used.

About the conceptions in 3.6.1. Heteroskedasticity, multicollinearity, serial correlation

Dear Boris,
You have done a great and intresting job.
In part 3.6.1. , ARE the two conceptions written by mistake ? I wish I did not confuse the two ideas. Thanks you .
JW

"
...3.6.1
Multicollinearity is when error terms (also called residuals) depend on each other.
Serial correlation is when one data (feature) is a formula (or completely depemnds) of another feature.
"

I'm very interested in your research.

Hi Boris:
I have spent some time to deal with the data, but I have no idea how to create the GAN model. Is it possible to share the code, please? I find a lot of samples of CV with GAN, but hard to find any in this area.

Request for Code

Boris,

I read your article on Medium and was very impressed. I would very much like to see your code and understand some of the techniques you used with the GAN. Thanks!

Info

Hi Boris, this looks like a very interesting approach. I am on the GitHub page but do not see the data file or any reference to its location. Also, there seems to be no actual notebook, just the png files from your article.

Please advise.
Thanks
Tim Hockswender

Great work but very very poor presentation on your research

The issue with this Research by Boris is that there is no direct link to the notebook and a lot of the code is completely broken because its missing the actual files . So to reproduce what boris has done and confirm that actually the concepts are worth investing time on , will be hard to prove unless he provides the notebook and data files used for followers to prove his concepts

Request For Code

Hello Boris

I am very interested in your topic. I want to have a test and in-depth study. Is it convenient to provide source code and data set?
Thanks!
Looking forward to your reply!
Huiting

Request for Code

Boris,

I read your article on Medium and was very impressed. I would very much like to see your code and understand some of the techniques you used with the GAN. Thanks!

Andrew

Request for code

Hi,Boris!
I have found this project very interesting and currently I am on something similar so I figured this might help me a lot in my project,it is a research about transportation in major city just FYI.
Anyway,this repo is really amazing,but some of the contend can be very obscure such as VAE_DATA.It drives me crazy every time I try to decode these.
I would be very grateful if you can email be the entire code,or maybe just some of the code but with more clear information.
My email address:[email protected]
Thanks for your time and hope you enjoy your day.

Phil

Request for Code

Hi Boris

Very interesting approach, I would love to see the full code if that is possible.
Thanks!
Timon

request for code!

Dear Boris,

    Came across your project and would be very grateful to get the full code for educational purposes and for my own projects, my email:[email protected] you very much! 

                                                                                    Thanks a lot
                                                                                              zoujin

Requesting for code

I am really fascinated by your work and would like to get access to the source code, especially the part where you used GANs and RL for training the model. Thanks in advance.
[email protected]

Request for Code

Hi,

Great article. Very interesting. Would it please be possible to attain source code to explore this topic further?

Email: [email protected]

Thanks in advance,

Aaron

could you please provide data and full code

Hi, boris:
I am interested at your project, i am trying to replicate your work and apply it to other stocks, could you please provide data and full code?
any help will be really appreciated, thank you

Request for code

Hi Boris, thank you for sharing your great work. Would you mind sharing the detailed code to me?

James

Request for code

Hi Boris,
I also find your project very interesting.
Would it be possible to share code?
Thank you very much

Code request

Hi,

I'm interested by the project.
I'd like to take a look at the code.

Request for source code

Hye boris, I'm doing a project on stock market prediction with rnns and your work looks really inspiring. I'd very much appreciate if you shared as much of the the source code as you can.

Thanks in advance!

Request for code

Dear Boris,

First of all, congratulations for your awesome work. I am amazed about it.

I would like to connect with you and request your code since I am trying to build something similar and I think it will be really helpful!

Many thanks in advance for your kindness,

Diego

Momentum is calculated wrongly

You have subtracted 1 from the price to calculate the momentum. If you want to calculate the momentum of 1 day you could do:

dataset['momentum'] = dataset['price'].pct_change()

Request for code

Hi,

This is project looks amazing, I would love to have the code.

Thanks,

Request for code

Hey Boris,
You have contributed something unique and new here...looking forward to understanding and hopefully contributing back to your efforts. Request for code.
Thanks,
Jeff

FFT/Wavelet look-ahead bias

Hi Boris,

Thanks for the nice walk through. One of my concerns is that when you use the full sample (1:T) to construct the "trends" you have implicitly used future info for data point at time t. DFT/wavelet is based on the whole sample and in reality at time t you should not be able to get information from t+1:T to construct your Xs. You will inventively have very high forecast precision.

Thanks.

Regards,

Qi

Request for Code

Hi,

This is an awesome project and is a great source to learn the new techniques and implementations of GNN and RL in price prediction. I would love to have the codes.

Thanks,

request for code

Dear sir:
Came across your project and would be very grateful to get the full code for educational purposes and for my own projects, my email:[email protected] you very much!

                                                                                Thanks a lot
                                                                                          zhouliwang

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.