Inspiration

As a discretionary trader, I found myself drowning in scattered trade records across broker statements, screenshots, and mental notes. Reviewing performance meant manually stitching together P&L data — a process both tedious and error-prone. I wanted a single place to log, visualize, and reflect on every trade.

What I Built

A full-stack web application that lets traders upload broker statements (Excel), parse and store trade records, and review performance through a dashboard with key metrics:

  • Win rate: $W = \frac{\text{winning trades}}{\text{total trades}} \times 100\%$
  • Profit factor: $PF = \frac{\text{gross profit}}{|\text{gross loss}|}$
  • Average return per trade: $\bar{r} = \frac{1}{n}\sum_{i=1}^{n} r_i$

The frontend is built with React + TypeScript + Vite, styled with a clean dark theme suited for long screen sessions. The backend uses FastAPI with SQLite for storage and pandas for Excel parsing. JWT-based auth keeps each trader's data isolated.

How I Built It

  1. Designed the database schema around a trades table linking to uploaded files
  2. Built the upload pipeline: preview → validate → commit, so users can verify parsed data before it enters the system
  3. Implemented REST endpoints for CRUD, auth, and aggregated statistics
  4. Created the dashboard with summary cards, equity curve, and a filterable trade table
  5. Added Vitest unit tests for critical UI components

Challenges

  • Excel heterogeneity: broker statements vary wildly in column names and formats. I solved this with a configurable column-mapping step during upload.
  • Data integrity: ensuring re-uploads don't duplicate records required careful unique-key design on (trade_id, upload_batch).
  • State management: keeping the dashboard reactive to filter changes without redundant API calls led me to a lightweight custom hook pattern instead of pulling in a heavy state library.

What I Learned

Building this taught me that the hardest part of trading software isn't the math — it's the data pipeline. Garbage in, garbage out. A clean, validated ingestion flow matters more than any fancy chart.

Built With

Share this project:

Updates