GithubHelp home page GithubHelp logo

danish-mehmood / stock-prediction-using-news-info-sentiment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zainulmustafa/stock-prediction-using-news-info-sentiment

0.0 1.0 0.0 2.22 MB

Application of LSTM on stock data with integration of news info. It turns out that finance and political news directly relate to the stock prices.

Jupyter Notebook 99.77% Python 0.23%

stock-prediction-using-news-info-sentiment's Introduction

Stock Prediction using News Info Sentiment

Approach for LSTM
Concept is the one right shift approach. Understanding is that: this algorithm what basically learn is if you give x amount of input columns, it learns to basically shift one of the column that we intent to predict from 0 to len(x)-1 while only predicting one value which exist in last index.


News Integration
Wall Street reports that: Political factors that range from relations with other nations to government policies can affect share prices. If you closely look at the headlines.json and headlines_june.json: whenever government took any initiative, shares rise. CPEC for an instance has caused alomost doubling up of stock prices in the last five years.

Zeeshan Afzal, head of research at Insight Securities says: "The phenomenal performance is linked to fast-paced GDP growth, which surged from 3.8 percent in FY2013 to 5.8 percent in FY2017, soft inflation coupled with historic low-interest rates which gave impetus to growth, industrial growth, multi-billion dollars CPEC (China-Pakistan Economic Corridor) projects and improvement in law and order situation."


Algorithm
Majority of it is explained by the concept approach but what makes a difference is how to use this news info with the prediction algorithm. NLP is used to analyse the daily news titles calculating the amount of negativity, neutrality, positivity, and compound (a kind of net result).

Logic says that current news and stock data can't directly affect the next day's price as stocks move in random. But current day's news directly effect the current day's stock for example PSX grew 1140 points after Panama Verdict. Though it can be said that current information will have some effect on the next day. If we use this current information and next day's news information, it now seems logical to predict what stock price would be in the end of the day.

An implementation of this logic is used in modelling.ipynb while scrapper.ipynb and dataprep.ipynb are used to scrape news from DAWN and sentiment analysis respectively.

stock-prediction-using-news-info-sentiment's People

Contributors

zainulmustafa avatar

Watchers

James Cloos 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.