Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Stock Portfolio Tracker

Python License

A Python application that calculates the total value of a stock portfolio using predefined stock prices. The program validates user input, calculates investment values, displays a portfolio summary, and saves the results to a text file.


Features

  • Display available stocks and prices
  • Validate stock names entered by the user
  • Calculate investment value for multiple stocks
  • Display total portfolio value
  • Save portfolio summary to a text file
  • Modular function-based design

Tech Stack

  • Python 3
  • Dictionaries
  • Functions
  • Loops
  • File Handling

Project Structure

stock-portfolio-tracker/
│── stock_tracker.py
│── portfolio.txt
│── README.md
│── LICENSE

How to Run

Clone the repository

git clone https://github.com/aditi-1731/stock-portfolio-tracker.git

Navigate to the project

cd stock-portfolio-tracker

Run

python stock_tracker.py

Sample Output

Available Stocks:

AAPL : $180
TSLA : $250
MSFT : $400
GOOGL : $170
AMZN : $150

Enter the different no. of stock you own: 2

Enter stock name: AAPL
Enter quantity: 3

Investment value: $540

Enter stock name: TSLA
Enter quantity: 2

Investment value: $500

========== Portfolio Summary ==========
Total Invested Value: $1040
=======================================

Skills Demonstrated

  • Python Programming
  • Dictionary Operations
  • Functions
  • Input Validation
  • File Handling
  • Clean Code Organization

Author

Aditi Tripathi

About

A Python-based Stock Portfolio Tracker that calculates total investment using predefined stock prices and saves the portfolio summary to a text file.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages