Skip to content

Archiehehe/Trade-History-Analyzer

Repository files navigation

Trade History Analyzer

A local-first, browser-based tool for parsing and analyzing personal brokerage export files (e.g. XLSX exports).
All processing happens client-side — your transaction data never leaves your device unless you explicitly enable the optional AI Insights feature.

Core Purpose

Upload your brokerage exports to:

  • Reconstruct realized P&L with accurate lot matching (FIFO, LIFO, Average Cost)
  • View chronological trade history, income events, and current positions
  • Observe quantitative patterns in hold times, position sizing, and event overlaps
  • Export cleaned data for external use or journaling

This is a personal analysis tool — not investment advice, not a performance tracker with live prices, and not a tax reporting solution.

Key Features

  • Fully local XLSX parsing (SheetJS) — no server
  • Supports multi-sheet brokerage exports (Trades, Income, Transfers, All Transactions, Glossary)
  • Realized P&L calculation with commissions included
  • User-selectable lot matching methods: FIFO (default), LIFO, Average Cost
  • Data quality checks (flags missing/invalid values, unmatched sells, etc.)
  • Neutral, factual summaries and distributions (no judgments or trading signals)
  • Optional opt-in AI explanations (aggregated stats only, user-controlled)
  • Charts via Recharts (hold-time distribution, P&L buckets, etc.)
  • Export normalized data as CSV or JSON
  • Persists parsed data in browser storage (localStorage / IndexedDB)

Privacy & Security

  • Everything runs in your browser.
  • Raw transaction rows are never sent anywhere by default.
  • AI Insights (if toggled on) sends only aggregated metrics, bucketed distributions, and small anonymized samples.
  • Clear disclosure shown next to the toggle.
  • No tracking, no analytics, no external dependencies beyond what you add.

Supported File Formats

Required: Transactions XLSX

Typical sheets:

  • All Transactions (ledger-style)
  • Trades (executions)
  • Income (dividends + taxes)
  • Transfers (deposits/withdrawals)
  • Glossary (transaction codes)

Optional: Holdings XLSX

  • Current portfolio snapshot (ticker, shares, avg cost, unrealized metrics)

Getting Started

  1. Clone or download this repository
  2. Install dependencies
    npm install

About

(WORK IN PROGRESS) Trade History Analyzer: Browser-based tool to parse brokerage exports, compute realized P&L with lot matching, reveal hold patterns & performance metrics from your own trades.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages