Project Overview

This section provides a detailed look at the purpose and functionality of the Portfolio and Options Tracker.

Purpose

The Portfolio and Options Tracker was created to provide retail investors with a comprehensive desktop application that simulates a realistic brokerage account experience. This tool bridges the gap between simple portfolio tracking and professional trading platforms by offering sophisticated options management, real-time market data integration, and intelligent automation features.

  • NOTE: This tool can now be downloaded directly as an exe below. It is for Windows only and there is normally a terminal window open while initially building cache. It should launch within 20-30 seconds.
  • Download

Core Functionality

Portfolio Management

  • Real-time stock tracking with live market prices via Yahoo Finance API
  • Complete purchase history with dates and cost basis tracking
  • Comprehensive gain/loss calculations showing both dollar amounts and percentages
  • Intelligent average cost basis calculation for multiple purchases of the same stock

Cash Management System

  • Realistic cash requirements enforcing sufficient funds before stock purchases
  • Automatic cash flow management with proceeds from stock sales
  • Manual cash management capabilities for deposits and withdrawals
  • Complete transaction tracking with automatic deductions and credits

Advanced Options Trading

  • Covered call creation with 100-share requirement validation
  • Automatic premium collection that adds option premiums to cash balance
  • Contract expiration tracking with real-time countdown timers
  • Intelligent automatic exercise handling at 3 PM on expiration dates
  • Manual exercise capability through “Call Away” functionality
  • Smart in-the-money detection with automatic exercise when stock price ≥ strike + $0.01

Intelligent Dividend Management

  • Automatic dividend detection scanning for announced dividends on portfolio stocks
  • Historical dividend recovery crediting missed dividends from the past 6 months
  • Smart eligibility verification ensuring dividends are only credited if stock was owned before ex-dividend date
  • Real-time dividend processing with automatic payments on scheduled dates
  • Manual dividend tracking with option to add custom dividend entries

Trading Restrictions & Safety

  • Share segregation clearly separating available shares from those in option contracts
  • Overselling prevention ensuring shares tied up in covered calls cannot be sold
  • Comprehensive contract tracking showing which shares are committed to options
  • Realistic trading limitations that mimic actual brokerage account restrictions

Technical Features

Modern User Interface

  • Dark and light theme toggle using Sun Valley TTK theme
  • Organized layout with dedicated sections for stocks, options, cash, and dividends
  • Real-time updates with automatic portfolio value refreshing
  • Comprehensive information displays for all positions
  • Robust error handling with clear messages for invalid operations

Data Persistence & Reliability

  • Automatic saving with all data stored in local text files
  • Multiple specialized data files for portfolio, options, cash, and dividends
  • Session persistence ensuring data survives between application restarts
  • Simple file format enabling easy backup and manual editing when needed

Benefits

  • Realistic Trading Experience: Simulates actual brokerage account restrictions and requirements
  • Risk Management: Prevents common trading errors through built-in safety mechanisms
  • Comprehensive Tracking: Monitors all aspects of portfolio performance including dividends and options
  • Automated Processing: Handles complex option expirations and dividend payments automatically
  • Educational Value: Teaches proper covered call strategies and cash management principles
  • Data Security: All data stored locally with full user control and privacy

Technology Stack

  • Frontend: Python Tkinter with Sun Valley TTK theme
  • Data Source: Yahoo Finance API via yfinance library
  • Data Storage: Local text files for persistence
  • Additional Libraries: matplotlib, numpy for calculations and visualizations

This application serves as both a practical portfolio management tool and an educational platform for understanding options trading, making it ideal for retail investors looking to advance their trading sophistication while maintaining proper risk management practices.