There are many ways to invest money including various brokerage accounts with different holding companies. I wanted to agglomerate all types of investments to one simple tool that can keep track of scattered investments and large profile investments. I also wanted a way to virtually create portfolios of investments and keep track of their activities in relation to my own.
What it does
Portfolio allows each user to have numerous profiles, each containing investment bundles. Each position is a set of stocks, bonds, or ETFs of a chosen amount. For example, I can have a profile full of technology positions (shares of Apple, Google, Microsoft, etc.) or I can take low-risk index funds in a different profile. I can also have a profile that shows my actual investments and compare it to virtual ones. In the end, I can analyze how different investment profiles produce higher or lower yield returns. Portfolio can access many points of data on each stock for a single day or it can showcase long-term trends by graphing activity from five years ago to the present.
How I built it
I tried using several languages including C++, Java, and C#, but I ultimately ended up sticking with Python. The AlphaVantage API allowed for https requests to be used to build my database. The Robinhood API is also useful but it lacks longer-term data. A large JSON is requested and converted to useful tables and plotted graphs. Profiles and positions are stored locally in files between operations. The GUI took a long time to get right. I converted my console application to a fully GUI operated application. There were several design iterations but I am happy with how it turned out. Profiles are chosen on the left and Positions for each profile are chosen in the middle. A plot of prices appears when any of the other search or time period buttons are used.
Challenges I ran into
I was unable to have a Python GUI that has variable label images during runtime. Instead, separate windows pop up with the requested graphs. I encountered having to deal with unsorted JSONs because Python parses them into dictionaries. Because the keys are timed dates, it is hard to automatically sort them after they are out of order. Instead, I tried using numerous methods to keep them ordered thoughout parsing such as using ordered dictionaries. Front end stuff is challenging to me as well. I spent a while getting my GUI to match the drawn designs I made. Midway through, I had to make a near complete overhaul of things for the sake of GUI compatibility.
Accomplishments that I'm proud of
I don't get to do a lot of front end programming. I find it difficult and hard to finagle. I am quite impressed I was able to finish the GUI completely. I was initally planning on submitting a console version of Portfolio. Granted it worked but console apps are the most attractive or easy to use.
What I learned
I learned a lot of GUI programming and Python. I has been a long time since I programmed with Python and it went very well. Http requests are quite simple with Python and GUI error messages are quite forgiving. I acquired knowledge on requests and parsing JSONs as well as data anaylsis of large amounts of data.
What's next for Portfolio
I want to connect Portfolio to Robinhood and other brokerage accounts once APIs are completed for them to also conduct http requests. I know having a much much more polished Portfolio would greatly benefit those that spread their assets out very widely.