r/Pyfinance•
arbel03

I made a Python bot that follows stock trends on /r/wallstreetbets, and you can use it too.

I made a bot that analyzes comments on Reddit in search of upcoming stock trends.

This is still just half automation, but I find it really useful.

The stack I used is a python server, hosted on Oracle free VPS + an Oracle free Autonomous DB. The code is based on this project:

[RyanElliott10/wsbtickerbot: Reddit Bot for to scrape for the most mentioned tickers on the r/wallstreetbets subreddit. (github.com)](https://github.com/RyanElliott10/wsbtickerbot)

Every 10 minutes the bot reads the latest 100 comments, analyzes them for sentiment rating, and inserts them into the database. There are plenty of cool things that I can do with the data and implement in the future:

  1. Scan more subreddits (r/stocks, r/spacs etc..)
  2. Analyze news websites and other sources (the text parsing is pretty generic, split a string by regex, that's all...)

Other interesting projects:

dwallach1/Stocker: Financial Web Scraper & Sentiment Classifier (github.com)

alvarobartt/twitter-stock-recommendation: Simple Stock Investment Recommendation System based on Machine-Learning algorithms for prediction and Twitter Sentiment Analysis. (github.com)

  1. Backtesting using this bot

  2. Take upvotes/likes/retweets into consideration, higher upvotes -> higher exposure.

There are still a few false positives but it works quite well.

List of python packages:

asyncpraw,
vaderSentiment,
discord,
terminaltables,
pandas,
sqlalchemy,
discord-py-slash-command,
cx_Oracle

For now, I am displaying the results on Discord only, you are free to join the server and use it, have fun guys :)

* Try to run the `$analyze` command every few hours to see the numbers change, it's really cool!

​

https://preview.redd.it/97yyxjs3ooi71.png?width=455&format=png&auto=webp&s=f086e020ab734119a264afc6e2ecaaa86d0a52c8

https://discord.gg/wDcGJzfe2t

Posted Aug 21, 2021, 9:52 AM UTC

132
HaBlaKes•

Very cool, I keep wanting to do some kind of python crypto analysis project but never get around to it.

1
[deleted]•

[removed]

1