Over the last week I have implemented plenty new features and fixed as many occuring bugs as possible. Now I am at a point where I am happy to release a ship for my project for everybody to try. So lets talk about whats new:
Like popular stocktrackers I wanted to implement a way to track the best and worst performing stocks of the day to give the users an overview of which outliers there are in the market.
Using a github S&P500.csv I scrape the symbols of the stocks and batch it to get specific Ticker objects that give me the price information of any given stock. Using this information I can calculate the current daily percentage change and compare it to the other stocks. Using a Panda Dataframe I order all my results and use the head and tail of the Dataframe to show a clickable button for the user to give more details on the performing stock.
Problems occured for the scraping of symbols of S&P500 since there can be symbols that yahooqueery doesn’t recognise. To fix this issue a dictionary and type check is implemented to only add actual data to the Dataframe.
I have also added a detailed view of the amount of symbols skipped and a dataframe that shows which errors occured for them.
Another Problem occured in the implementation of the buttons for the best and worst performing stocks. Cklicking the button didn’t update the shown stock. To fix this I dove into state_sessions in streamlit and used callback functions and keys to hopefully give you a bugfree experience
Lastly I have implemented the most important step for a good Software. I have customised the design of the website. Now the website renders in a fullscreen view. The primary Colors and button colors are matched according to the positive or negative price changes and the font is also adjusted for a cleaner view
And now thank you for reading this long devlog, hopefully you can try my project and have fun with it ;D
What has changed since the last devlog
Im building a stocktracker, that gives you the option to input any stock using the yahoo finance api and show the daily, weekly, monthly and yearly price information. In the future I would also like it to create an overview of the best and worst performing stocks and ones that are under their yearly average.
Currently I have implemented the system using the streamlit and plotly libraries. By now I have implemented the input for the required stock, as well as the visual price graph of the day. This is done using the history of yfinance and adjusting the database to scrape for the closing price every minute.
Furthermore the daily change (in Percent and real value) is calculated in comparision to the closing price of the last day