GithubHelp home page GithubHelp logo

kaysersoze42 / not_a_financial_advisor_bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 37.86 MB

Bot that fetches recent ticker info. It formats the data and posts it on a thread during market hours (+ pre and post). Also makes bad jokes

License: MIT License

Python 98.50% Dockerfile 1.50%
bot gamestop gme kek memes python reddit reddit-api reddit-bot silly-project stocks-data yfinance-api not-a-financial-advice

not_a_financial_advisor_bot's Introduction

not_a_financial_advisor_bot

Bot that fetches recent ticker info. It formats the data and posts it on a thread during market hours. Also makes bad jokes

-----BEGIN' UPDATE-----

With the current state of the "game", I feel a need to give this monster a proper semi-epitaph.

I lack the experience to feel the confidence and need to share my thoughts on the actions, so I'll do what I do best. Make jokes and roast my reasonings.

It was just a quickly put together memeMachine, made to spread data and joy, and I am more than thankful for all of the parties involved (especially "imports" behind scenes) to make such a silly thing possible.

I was able to (ab)use some math and plot some graphs, all while keeping in trend with the latest memez.

grep bless Python, the best of the worst and the worst of the best.

The community's movement is another thing I'm no comment, since investing is yet another abstract thing for me.

I am happy for the lolz because Monty Python may have introduced me to Python, but it's Darwin and Dawkins who provided amemeunition.

P.S. You can see some examples and its' evolution on my Reddit profile, which shares the name with my GitHub, oh what a reveal.

P.P.S. I would like to use this oportunity to also state that my other handle, OxieMoron, is in no way, shape or form affiliated with a certain furry handle/persona I have discovered on the first page of a Google search.. To think what truths second page actually hides.

I'm not judging, but I keep my rule69.zip hidden in a jpeg, where it belongs.

-----END UPDATE-----

$

To start the bot script use the Virtual Environment and start the testController.py

It requires next Environment Variables to be set in order to work:

REDDIT_USERNAME, REDDIT_PASSWORD, REDDIT_CLIENTID, REDDIT_SECRET, IMGUR_CLIENTID, IMGUR_SECRET, STOCK_NAME, USER_GITHUB, USER_SUBREDDIT, TARGET_SUBREDDIT, BOT_START, BOT_INTERVAL

Currently it's WIP, but the main idea is to keep NAFA modules seperate from the Controllers so it can be re-used for other subreddits, threads and tickers

If you're planning on using the script with Docker, my recommendation is to create an env.list file with all of the Environment Variables, where each row equals to KEY=VALUE (without quotation marks) and then running the container with option --env-file env.list

Example of NAFA modules usage:

First initialize the User Object:
                          
                          UserCredentials(
                              Username for the Reddit Account,
                              Password for the Reddit Account,
                              Reddit APP Client ID,
                              Reddit APP Client Secret,
                              Imgur APP Client ID,
                              Imgur APP Client Secret
                          )
                          
                          UserCredentials.setUserGithub(URL for the home Github page)
                          UserCredentials.setUserSubreddit(URL for the home Subreddit)
                          UserCredentials.setTargetSubreddit(Name of the subreddit with the Daily Thread)
                          
Then initialize the Ticker and Comment Objects:
                          
                          Ticker(
                              Ticker Symbol,
                              UserCredentials Object
                          )
                          
                          Comment(
                              Ticker Symbol,
                              UserCredentials Object
                          )
                          
                          Comment.setSignatureList(List with signatures to be added at the bottom of the post)
                          
To update the data and post:

                          Ticker.updateTicker()                   - Fetches recent data from yfinance
                          
                          Ticker.tickerOpen 
                          Ticker.tickerClose
                          Ticker.tickerHigh
                          Ticker.tickerLow                        - Access the Ticker Object data
                          Ticker.tickerVolume
                          Ticker.tickerLastRefresh
                          Ticker.getChange()
                          
                          Comment.addLine(newLine : string)       - Add new line of text to the comment (inside the Box, to add bellow set signatures)
                          
                          Ticker.plotGraphs()                     - Plot 1d,5d,1m,3m,6m,1y graphs using matplotlib.pyplot
                          
                          Comment.format()                        - Takes all of the lines added and formats them for the body of the box
                          
                          Comment.uploadGraphs()                  - Uploads all of the .png graphs from the /graphs directory and formats the signature(2bf) 
                          
                          Comment.post()                          - Posts the formatted text on the Daily Thread of the TARGET_SUBRREDIT
                          
                          Comment.formattedText                   - To access the comment text

not_a_financial_advisor_bot's People

Contributors

kaysersoze42 avatar

Watchers

 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.