Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CodeAlpha_Stock_Portfolio_Tracker

📈 Stock Portfolio Tracker

A simple Stock Portfolio Tracker built using Python as part of my Python Programming Internship at CodeAlpha.

📌 About the Project

This project allows users to enter stock names and the number of shares they own. The program uses a predefined dictionary containing stock prices and calculates the investment value for each stock and the total portfolio investment.

The total investment is also saved in a .txt file.

✨ Features

  • Enter the number of stocks
  • Enter stock names and quantities
  • Uses a predefined stock-price dictionary
  • Calculates individual investment values
  • Calculates total investment value
  • Handles unavailable stock names
  • Saves the total investment to a text file

🛠️ Technologies Used

  • Python
  • Dictionary
  • for loop
  • if-else statements
  • User input/output
  • Basic arithmetic
  • File handling

📊 Available Stocks

The program currently contains predefined prices for:

Stock Price
APPLE $180
TESLA $250
GOOGLE $140
MICROSOFT $420
AMAZON $190

▶️ How to Run

  1. Clone this repository.
  2. Open the project folder.
  3. Run the Python program:
python "stock portfolio tracker.py"
  1. Enter the number of stocks.
  2. Enter the stock name and quantity.
  3. The program will calculate the investment value and total investment.

💻 Example

How many stocks do you want to enter? 2

Enter stock name: APPLE
Enter quantity: 5
AAPL Investment: 900

Enter stock name: TESLA
Enter quantity: 2
TSLA Investment: 500

Total Investment: 1400

📄 Output

The total investment is saved in:

portfolio.txt

Example:

Total Investment: 1400

📂 Project Structure

CodeAlpha_Stock_Portfolio_Tracker/
│
├── stock portfolio tracker.py
├── portfolio.txt
├── stockportfoliotracker-screenshot.png
└── README.md

🎯 Learning Outcomes

Through this project, I practiced:

  • Python dictionaries
  • Loops and conditional statements
  • User input and output
  • Arithmetic operations
  • File handling
  • Git and GitHub

👩‍💻 Internship

This project was developed as part of my Python Programming Internship at CodeAlpha.


⭐ If you find this project useful, feel free to explore the repository.

About

A simple Python-based Stock Portfolio Tracker that calculates individual and total investment values using predefined stock prices, with optional text-file output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages