This Stock Portfolio Manager is a Python program that helps you manage your stock investments and compare portfolios. It allows you to track stock details, calculate the value of your investments, and analyze the percentage change in stock prices.
-
Track Stocks: Add stocks to your portfolio with details such as ticker symbol, number of shares, purchase price, and purchase date.
-
Calculate Value: Calculate the current value of your portfolio based on the latest stock prices using Yahoo Finance data.
-
Analyze Performance: Analyze the percentage change in stock prices since purchase.
-
Compare Portfolios: Compare your portfolio with another portfolio to see how they differ in terms of stock performance.
-
Clone the repository or download the code.
-
Install the required Python packages using pip:
pip install yfinance matplotlib
-
Run the program by executing the
main.py
file. -
Follow the on-screen prompts to manage your portfolio, calculate values,
-
Create a text file (e.g.,
portfolio.txt
) with your stock holdings in the following format:ticker,shares,price,date AAPL,10,100,2020-01-01 MSFT,20,150,2021-03-15
-
Run the program by executing the
main.py
file. -
Follow the on-screen prompts to manage your portfolio, calculate values, and compare portfolios.
Portfolio Comparison
-
Create a text file for a second portfolio (e.g.,
portfolio2.txt
) using the same format as mentioned above. -
Run the program by executing the
main.py
file. -
Select the "compare" option from the program menu.
-
Follow the prompts to compare two portfolios.
Here are some screenshots of the program in action: