Giter Site home page Giter Site logo

qpanfinance / ex-stocks-trading-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gunjandhanuka/stocks-trading-bot

0.0 0.0 0.0 664 KB

A multi-purpose repository with Sentiment Analysis of Stocks news, and Reinforcement learning based bot to trade stocks.

License: MIT License

Python 3.21% Jupyter Notebook 96.79%

ex-stocks-trading-bot's Introduction

stocks-trading-bot

Features:

Sentiment Analysis of Custom Tickers

  1. Change your required ticker in the monitored_tickers list in the scrapesummarise.py file.
  2. Then the program would scrape Google News for news articles related to the ticker (eg: ETH.)
  3. Then we go into each and every article from this page, and scrape the article from there. Yahoo article
  4. The text from each article is summarised using the Pegasus model which was pretrained on Financial data. The model is used through the HuggingFace Transformers library <3. Summaries
  5. Then on this summary, a sentiment score is calculated using HuggingFace Transformers Pipeline.
        [{'label': 'NEGATIVE', 'score': 0.8954309225082397},
        {'label': 'POSITIVE', 'score': 0.9990646243095398},
        {'label': 'POSITIVE', 'score': 0.9955031275749207},
        {'label': 'POSITIVE', 'score': 0.9938773512840271},
        {'label': 'POSITIVE', 'score': 0.9979088306427002},
        {'label': 'NEGATIVE', 'score': 0.9879947304725647},
        {'label': 'POSITIVE', 'score': 0.9979088306427002},
        {'label': 'NEGATIVE', 'score': 0.9996492862701416},
        {'label': 'NEGATIVE', 'score': 0.9811649322509766},
        {'label': 'NEGATIVE', 'score': 0.9981441497802734}]
  6. A CSV File is created with all the ticker data, summaries and the respective sentiment scores.
        Ticker,Summary,Label,Confidence,URL
        GME,Retail investors have been net sellers of single stocks. Hedge funds have become more dominant short sellers,NEGATIVE,0.8954309225082397,https://finance.yahoo.com/news/analysis-shorts-circle-gamestop-amc-050545286.html
        GME,15 best penny stocks to invest in. These stocks provide investors with decent short-term returns,POSITIVE,0.9990646243095398,https://finance.yahoo.com/news/15-best-penny-stocks-invest-142312669.html
    

Reinforcement Learning:

Another aspect of this project is to try various Reinforcement Learning algorithms using OpenAI Gym and the Stable-Baselines library for doing trades automatically.

ex-stocks-trading-bot's People

Contributors

gunjandhanuka 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.