---
title: "Trading Analysis Dashboard"
description: "Documentation for a comprehensive platform to analyze trading performance and manage investment portfolios"
---

## Overview

This documentation covers the Trading Analysis Dashboard - a Flask-based web application for tracking stock trading performance with real-time portfolio management and comprehensive reporting capabilities.

<CardGroup cols={2}>
  <Card
    title="Application Overview"
    icon="info-circle"
    href="/quickstart"
  >
    Learn about the application's purpose and architecture
  </Card>
  <Card
    title="Portfolio Management"
    icon="chart-line"
    href="/features/portfolio-management"
  >
    Track holdings with real-time price updates from Finnhub
  </Card>
  <Card
    title="Trading Analysis"
    icon="magnifying-glass-chart"
    href="/features/trading-analysis"
    >
    Analyze monthly trading performance and track P&L
  </Card>
  <Card
    title="API Reference"
    icon="code"
    href="/api-reference/introduction"
  >
    Explore the RESTful API endpoints
  </Card>
</CardGroup>

## Core Features

<AccordionGroup>
  <Accordion title="Portfolio Tracking" icon="chart-pie">
    Track stock, ETF, and mutual fund holdings with real-time price updates from Finnhub. View allocation charts, performance metrics, and gain/loss analysis with automatic price refresh capabilities.
  </Accordion>
  
  <Accordion title="Trading Analysis" icon="chart-line">
    Analyze monthly trading performance with detailed P&L breakdowns, win/loss ratios, and trade-by-trade analysis. Includes comprehensive reports with dividend tracking and hybrid matching algorithm for broker-level accuracy.
  </Accordion>
  
  <Accordion title="Authentication & Authorization" icon="lock">
    Google OAuth 2.0 integration with user-specific data isolation. Support for multiple users with separate brokerage accounts and authorized user controls.
  </Accordion>
  
  <Accordion title="CSV Data Import" icon="file-csv">
    Import transaction history and holdings via CSV with drag-and-drop support. Real-time processing feedback and upload history tracking for portfolio and trading data.
  </Accordion>
  
  <Accordion title="Timeframe Analysis" icon="calendar">
    Analyze trading performance across custom date ranges. Compare periods, track trends, and generate reports for specific timeframes.
  </Accordion>
  
  <Accordion title="Trading Calendar" icon="calendar-days">
    View trading activity calendar with monthly heat maps showing P&L by day. Quickly identify patterns and peak trading periods.
  </Accordion>
</AccordionGroup>

## Application Architecture

<CardGroup cols={3}>
  <Card title="Flask" icon="python">
    Python web framework for backend API and page rendering
  </Card>
  <Card title="PostgreSQL" icon="database">
    Relational database for user data, trades, and holdings
  </Card>
  <Card title="Bootstrap" icon="palette">
    Frontend UI framework with custom styling
  </Card>
  <Card title="Finnhub API" icon="chart-candlestick">
    Real-time market data integration
  </Card>
  <Card title="OAuth 2.0" icon="shield-check">
    Secure Google authentication
  </Card>
  <Card title="Chart.js" icon="chart-pie">
    Interactive data visualizations
  </Card>
</CardGroup>

## Key Concepts

### Hybrid Matching Algorithm

The trading analysis uses a hybrid matching system that combines broker-provided realized gains/losses with transaction history to achieve broker-level accuracy for closed positions. See [Hybrid Matching](/features/hybrid-matching) for details.

### Multi-User Support

The application supports multiple users with isolated data. Each user can have separate brokerage accounts and portfolios, with data access controlled by OAuth authentication.

### Real-Time Price Updates

Portfolio holdings are updated with real-time prices from Finnhub API, with intelligent rate limiting and caching to stay within API quotas while providing fresh data.

<Card
  title="Explore the Application"
  icon="book-open"
  href="/quickstart"
>
  Read the application overview to understand how everything works together
</Card>
