Inspiration

Based loosely on the 2000's theme, me and myp artner thought about how a user could improve their financial position by making small but consistent habit changes over time and taking advantage of compounding stock returns.

What it does

Our app lets a user compare how much money they could have potentially made if they converted their daily unnecessary spending habits over the past few years into long term investments in the corresponding stocks, for example, investing in Starbucks stock prices instead of your daily coffee.

How we built it

Tech Stack: Python(Backend), Streamlit (Frontend) Using yfinance we downloaded historical stock data from Yahoo Finance and then created a data pipeline, allowing the user to select a product, start date, frequency and price. Then employing the cumulative sum function in the pandas library, we can perform calculations to determine the cumulative shares that the user would have accumulated and hence determine potential Portfolio Value. These metrics were then visualised using plotly.

Challenges we ran into

Ensuring data formatting was consistent between the backend and front end was quite hard as my partner and I worked on these separately so although we did plan what variables to have it could sometimes get confusing in terms of how the functions would pass them. Additionally, deploying the project involved a lot of readjustment in regards to file paths which required us to research solutions.

Accomplishments that we're proud of

Learning to use the yfinance library to build our first finance related project and completing the project within the 24hr deadline. Also as this was our first hackathon, it is quite a new experience.

What we learned

How to work with stock history data via pandas. How to build rapid front end mvps using streamlit.

What's next for Cost of Habit

We would like to add a way to see how much money could be saved using low-cost alternatives to these products such as brewing coffee at home, and use these values to calculate the return on investment. We would also like to use CPI data to show how the real purchasing power of money declines while stocks help protect it.

Built With

Share this project:

Updates

Submission history