Stock-Backtesting

Stock back tester is a mathematical analysis tool that enables users to test sample portfolios’ performance against historical market returns. This tool visualizes investment returns and tracks portfolio metrics against benchmark stocks using real-time data from Yahoo Finance. Allows for analysis using portfolios based on percentage and dollar amounts.

Key Features

  • Portfolio Analysis
    • Portfolio construction with multi-stock comparison
    • Both percentage-based and fixed-dollar allocations
    • Historical performance comparison against benchmark stocks
    • Logarithmic and linear scale visualization options
    • Real-time data fetching via yfinance API
  • Visualization
    • Dynamic graph resizing
    • Dark/Light theme toggle
    • Interactive performance charts
    • Customizable date ranges
  • Data Management
    • Save and load portfolio configurations
    • Export functionality for analysis results
    • Detailed performance metrics including:
      • Total portfolio return
      • Annualized returns
      • Baseline return
      • Baseline annualized return
  • User Interface
    • Clean, modern interface using ttk styling
    • Real-time graph updates
    • Error handling and user feedback
    • Responsive design that adapts to window resizing
    • Intuitive date selection using a calendar

Dependencies

  • tkinter
  • pandas
  • yfinance
  • sv_ttk
  • datetime
  • tkcalendar
  • matplotlib

Sections

Authors

Dev Shroff & Krishnika Anandan