I embarked on the journey of creating a portfolio simulator (buying only) using the Python programming language driven by my passion for both finance and technology. The intersection of finance and technology presents a world of opportunities, from algorithmic trading to risk management, and this portfolio simulator represents my first step in exploring this dynamic space. By developing this simulator, I aimed to deepen my understanding of some Object Oriented Programming (OOP) elements applied to a specific need in the real world.
Such OOP elements are:
- Objects/Instances of a class
- self ‘keyword’
At this stage, with this program, you are only able to buy shares from companies listed in the S&P 500. For the sake of this project, this is the S&P 500 list (List of S&P 500 companies - Wikipedia) that I used for its development. Some of the technologies that I utilized were:
- pandas library
- yfinance library (Yahoo Finance API)
- Python 3.10
- venv (virtual environment)
This terminal program will allow you to select your most beloved company, select how many shares you want to buy and show you your final portfolio position (how many shares you own).
Check it out!