A modern desktop application for analyzing trading data and generating insights from broker transaction exports.
| Platform | Download |
|---|---|
| macOS | TradingAnalyzer-macOS.dmg |
| Windows | TradingAnalyzer-Windows-x64.zip |
Or visit the Releases page for all versions.
- Real-time KPIs: Total P/L, Win Rate, Profit Factor, Max Drawdown
- Account Balance chart with multi-account support
- Monthly P/L breakdown
- Win rate by instrument
- Recent trades overview
- Account selector (view all accounts combined or individual accounts)
- Browse, search, and filter all trades
- Sort by any column
- Date range filtering
- Export to CSV
- Pagination with customizable page size
- P&L Analysis
- Daily P/L chart with percentage returns
- Cumulative P/L over time
- Monthly P/L breakdown
- Equity Curve (P/L only, excludes deposits/withdrawals)
- Balance History (includes funding)
- Funding Activity (deposits, withdrawals, net with totals)
- Time-based Analysis
- Hourly performance patterns
- Weekday performance breakdown
- Trade duration statistics
- Instrument Analysis
- Win rate by instrument
- Points/pips by instrument
- Performance Metrics
- Win/loss streaks
- Position size analysis
- All charts support account filtering and proper currency conversion
- CSV import with automatic column mapping
- Support for multiple brokers
- Multi-account tracking
- Default currency selection
- Exchange rate management
- Currency conversion for multi-currency accounts
- Modern dark mode UI
- Responsive charts with tooltips
- Expandable chart views
- Persistent filter preferences
- Account selector across all pages
The application properly handles accounts in different currencies:
- Backend converts, frontend displays: All P&L aggregation and conversion happens on the backend
- Account-aware: When viewing a single account, data displays in that account's native currency
- Combined view: When viewing all accounts, values are converted to your default currency before aggregation
- Exchange rates: Configurable in Settings page
- Trade Nation (Serial column format)
- TD365 (Ref. No. column format)
- Download the appropriate installer for your platform from the Releases page
- macOS: Open the DMG and drag to Applications. On first run, right-click and select "Open" to bypass Gatekeeper
- Windows: Extract the ZIP and run
Trading Analyzer.exe
Prerequisites:
- Python 3.9+
- Node.js 18+
Setup:
# Clone repository
git clone https://github.com/lakjdfalken/trading-analyzer.git
cd trading-analyzer
# Setup Python environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# Build frontend
cd frontend
npm install
npm run build
cd ..
# Run the application
python app.pyTerminal 1 - API Server:
source .venv/bin/activate
python run_api.pyTerminal 2 - Frontend Dev Server:
cd frontend
npm run devThe application accepts CSV exports with the following columns:
| Column | Description |
|---|---|
| Transaction Date | Date/time of the trade |
| Serial / Ref. No. | Unique reference number |
| Action | Buy/Sell action |
| Description | Instrument name |
| Amount | Position size |
| Open Period | Entry date/time |
| Opening | Entry price |
| Closing | Exit price |
| P/L | Profit/Loss |
| Status | Trade status |
| Balance | Account balance after trade |
| Currency | Trade currency |
source .venv/bin/activate
cd frontend && npm run build && cd ..
pyinstaller trading_analyzer.spec
# Remove quarantine attribute
xattr -cr "dist/Trading Analyzer.app"
# Run
open "dist/Trading Analyzer.app".venv\Scripts\activate
cd frontend
npm run build
cd ..
pyinstaller trading_analyzer.spec
# Run
dist\Trading Analyzer\Trading Analyzer.exetrading-analyzer/
├── frontend/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # Pages
│ │ │ ├── page.tsx # Dashboard
│ │ │ ├── analytics/ # Analytics page
│ │ │ ├── transactions/# Transactions page
│ │ │ ├── import/ # Data import page
│ │ │ └── settings/ # Settings page
│ │ ├── components/ # React components
│ │ │ └── charts/ # Chart components (18 charts)
│ │ ├── store/ # Zustand state management
│ │ │ ├── dashboard.ts # Dashboard state & filters
│ │ │ ├── settings.ts # User settings
│ │ │ └── currency.ts # Currency formatting
│ │ └── lib/
│ │ └── api.ts # Centralized API client
│ └── package.json
├── src/
│ └── api/ # FastAPI backend
│ ├── routers/ # API endpoints
│ │ ├── dashboard.py # Dashboard data
│ │ ├── analytics.py # Analytics data
│ │ ├── trades.py # Trade operations
│ │ ├── currency.py # Currency & settings
│ │ ├── imports.py # CSV import
│ │ └── instruments.py
│ ├── services/
│ │ ├── database.py # SQLite operations
│ │ └── currency.py # Currency conversion
│ └── models/ # Pydantic schemas
├── app.py # Desktop app entry point
├── run_api.py # API server runner
├── trading_analyzer.spec # PyInstaller configuration
└── requirements.txt
The app version is managed from a single VERSION file in the project root.
To release a new version:
# 1. Update VERSION file
echo "2.1.0" > VERSION
# 2. Sync version to frontend package.json
python scripts/sync_version.py
# 3. Commit and tag
git add -A
git commit -m "Bump version to 2.1.0"
git tag v2.1.0
git push origin main --tagsWhen running in development mode, API documentation is available at:
- Swagger UI: http://localhost:8000/api/docs
- ReDoc: http://localhost:8000/api/redoc
The application stores data in a platform-specific location:
| Platform | Location |
|---|---|
| macOS | ~/Library/Application Support/TradingAnalyzer/trading.db |
| Windows | %LOCALAPPDATA%\TradingAnalyzer\trading.db |
| Linux | ~/.local/share/TradingAnalyzer/trading.db |
- Trade Frequency Chart: New chart in Analytics → Performance showing trades per day, month, and year with totals and averages per account and aggregated
- Monthly P&L Totals: Added positive/negative month totals to the Monthly P&L chart alongside yearly totals
- Spread Cost Analysis: New chart in Analytics → Risk showing spread cost per trade based on Trade Nation market data with time-based spread lookups
- Spread Data Source Note: Settings page now shows when spread data was last updated with reference URL to Trade Nation Market Information Sheet
MIT License - See LICENSE file for details.
Contributions are welcome! Please:
- Open an issue to discuss proposed changes
- Fork the repository
- Create a feature branch
- Submit a pull request
- Open an issue for bug reports
- Discussions for questions and ideas
