Skip to content

iii123iii/Stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Portfolio Tracker 📈

A simple Python application to track your stock portfolio performance using real-time data from Yahoo Finance.

Features 🌟

  • Multiple purchase tracking for the same stock
  • Profit/Loss calculation
  • Percentage gain/loss
  • Visual emojis and color indicators
  • Clean, formatted output

Requirements 📋

  • Python 3.x
  • yfinance package

Installation 🔧

pip install -r requirements.txt

Usage 💡

  1. Remove the .txt extension from the config.py.txt file

  2. Add your stocks to the config.py file in this format:

    from models import Stock
    
    stocks: list[Stock] = [
        ["STOCK_SYMBOL", SHARES, PURCHASE_PRICE],
        # Example:
        ["AAPL", 2, 124.56],
    ]
  3. Run the application:

    python3 main.py

Output Example 🖥️

••••••••••••••••••••••••••••••••••••••••
📈 Stock name:             AAPL
🔢 Quantity:               2
💵 Purchase price:         $124.56
💰 Current price:          $245.55
💎 Holdings:               $491.10
📈 Profit:                 $241.98
📈 Profit %:               97.13%
••••••••••••••••••••••••••••••••••••••••

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages