{"id":35731700,"url":"https://github.com/lakjdfalken/trading-analyzer","last_synced_at":"2026-03-01T10:03:42.772Z","repository":{"id":274622922,"uuid":"917498423","full_name":"lakjdfalken/trading-analyzer","owner":"lakjdfalken","description":"Analyze trading data from TD365 and TradeNation","archived":false,"fork":false,"pushed_at":"2026-02-20T17:24:21.000Z","size":2014,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-20T21:56:23.689Z","etag":null,"topics":["analysis","statistics","trading"],"latest_commit_sha":null,"homepage":"https://github.com/lakjdfalken/trading-analyzer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lakjdfalken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-16T05:19:07.000Z","updated_at":"2026-02-20T17:24:25.000Z","dependencies_parsed_at":"2025-04-30T17:33:21.544Z","dependency_job_id":"28aeb438-8f26-4ce1-9442-f9b9fcf95616","html_url":"https://github.com/lakjdfalken/trading-analyzer","commit_stats":null,"previous_names":["lakjdfalken/trading-analyzer"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/lakjdfalken/trading-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakjdfalken%2Ftrading-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakjdfalken%2Ftrading-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakjdfalken%2Ftrading-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakjdfalken%2Ftrading-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lakjdfalken","download_url":"https://codeload.github.com/lakjdfalken/trading-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakjdfalken%2Ftrading-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29966684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T09:33:09.965Z","status":"ssl_error","status_checked_at":"2026-03-01T09:25:48.915Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","statistics","trading"],"created_at":"2026-01-06T11:19:38.795Z","updated_at":"2026-03-01T10:03:42.748Z","avatar_url":"https://github.com/lakjdfalken.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trading Analyzer\n\nA modern desktop application for analyzing trading data and generating insights from broker transaction exports.\n\n![Trading Analyzer Dashboard](docs/screenshot.png)\n\n## Download\n\n### Pre-built Releases\n\n| Platform | Download |\n|----------|----------|\n| macOS | [TradingAnalyzer-macOS.dmg](https://github.com/lakjdfalken/trading-analyzer/releases/latest/download/TradingAnalyzer-macOS.dmg) |\n| Windows | [TradingAnalyzer-Windows-x64.zip](https://github.com/lakjdfalken/trading-analyzer/releases/latest/download/TradingAnalyzer-Windows-x64.zip) |\n\nOr visit the [Releases page](https://github.com/lakjdfalken/trading-analyzer/releases) for all versions.\n\n## Features\n\n### Dashboard\n- Real-time KPIs: Total P/L, Win Rate, Profit Factor, Max Drawdown\n- Account Balance chart with multi-account support\n- Monthly P/L breakdown\n- Win rate by instrument\n- Recent trades overview\n- Account selector (view all accounts combined or individual accounts)\n\n### Transactions\n- Browse, search, and filter all trades\n- Sort by any column\n- Date range filtering\n- Export to CSV\n- Pagination with customizable page size\n\n### Analytics\n- **P\u0026L Analysis**\n  - Daily P/L chart with percentage returns\n  - Cumulative P/L over time\n  - Monthly P/L breakdown\n  - Equity Curve (P/L only, excludes deposits/withdrawals)\n  - Balance History (includes funding)\n  - Funding Activity (deposits, withdrawals, net with totals)\n- **Time-based Analysis**\n  - Hourly performance patterns\n  - Weekday performance breakdown\n  - Trade duration statistics\n- **Instrument Analysis**\n  - Win rate by instrument\n  - Points/pips by instrument\n- **Performance Metrics**\n  - Win/loss streaks\n  - Position size analysis\n- All charts support account filtering and proper currency conversion\n\n### Data Import\n- CSV import with automatic column mapping\n- Support for multiple brokers\n- Multi-account tracking\n\n### Settings\n- Default currency selection\n- Exchange rate management\n- Currency conversion for multi-currency accounts\n\n### User Interface\n- Modern dark mode UI\n- Responsive charts with tooltips\n- Expandable chart views\n- Persistent filter preferences\n- Account selector across all pages\n\n## Multi-Currency Support\n\nThe application properly handles accounts in different currencies:\n\n- **Backend converts, frontend displays**: All P\u0026L aggregation and conversion happens on the backend\n- **Account-aware**: When viewing a single account, data displays in that account's native currency\n- **Combined view**: When viewing all accounts, values are converted to your default currency before aggregation\n- **Exchange rates**: Configurable in Settings page\n\n## Supported Brokers\n\n- **Trade Nation** (Serial column format)\n- **TD365** (Ref. No. column format)\n\n## Installation\n\n### Option 1: Download Pre-built App (Recommended)\n\n1. Download the appropriate installer for your platform from the [Releases page](https://github.com/lakjdfalken/trading-analyzer/releases)\n2. **macOS**: Open the DMG and drag to Applications. On first run, right-click and select \"Open\" to bypass Gatekeeper\n3. **Windows**: Extract the ZIP and run `Trading Analyzer.exe`\n\n### Option 2: Run from Source\n\n**Prerequisites:**\n- Python 3.9+\n- Node.js 18+\n\n**Setup:**\n\n```bash\n# Clone repository\ngit clone https://github.com/lakjdfalken/trading-analyzer.git\ncd trading-analyzer\n\n# Setup Python environment\npython -m venv .venv\nsource .venv/bin/activate  # Windows: .venv\\Scripts\\activate\npip install -r requirements.txt\n\n# Build frontend\ncd frontend\nnpm install\nnpm run build\ncd ..\n\n# Run the application\npython app.py\n```\n\n### Option 3: Development Mode\n\n**Terminal 1 - API Server:**\n```bash\nsource .venv/bin/activate\npython run_api.py\n```\n\n**Terminal 2 - Frontend Dev Server:**\n```bash\ncd frontend\nnpm run dev\n```\n\nOpen http://localhost:3000\n\n## CSV Import Format\n\nThe application accepts CSV exports with the following columns:\n\n| Column | Description |\n|--------|-------------|\n| Transaction Date | Date/time of the trade |\n| Serial / Ref. No. | Unique reference number |\n| Action | Buy/Sell action |\n| Description | Instrument name |\n| Amount | Position size |\n| Open Period | Entry date/time |\n| Opening | Entry price |\n| Closing | Exit price |\n| P/L | Profit/Loss |\n| Status | Trade status |\n| Balance | Account balance after trade |\n| Currency | Trade currency |\n\n## Building from Source\n\n### macOS\n\n```bash\nsource .venv/bin/activate\ncd frontend \u0026\u0026 npm run build \u0026\u0026 cd ..\npyinstaller trading_analyzer.spec\n\n# Remove quarantine attribute\nxattr -cr \"dist/Trading Analyzer.app\"\n\n# Run\nopen \"dist/Trading Analyzer.app\"\n```\n\n### Windows\n\n```powershell\n.venv\\Scripts\\activate\ncd frontend\nnpm run build\ncd ..\npyinstaller trading_analyzer.spec\n\n# Run\ndist\\Trading Analyzer\\Trading Analyzer.exe\n```\n\n## Architecture\n\n```\ntrading-analyzer/\n├── frontend/                 # Next.js frontend\n│   ├── src/\n│   │   ├── app/             # Pages\n│   │   │   ├── page.tsx     # Dashboard\n│   │   │   ├── analytics/   # Analytics page\n│   │   │   ├── transactions/# Transactions page\n│   │   │   ├── import/      # Data import page\n│   │   │   └── settings/    # Settings page\n│   │   ├── components/      # React components\n│   │   │   └── charts/      # Chart components (18 charts)\n│   │   ├── store/           # Zustand state management\n│   │   │   ├── dashboard.ts # Dashboard state \u0026 filters\n│   │   │   ├── settings.ts  # User settings\n│   │   │   └── currency.ts  # Currency formatting\n│   │   └── lib/\n│   │       └── api.ts       # Centralized API client\n│   └── package.json\n├── src/\n│   └── api/                 # FastAPI backend\n│       ├── routers/         # API endpoints\n│       │   ├── dashboard.py # Dashboard data\n│       │   ├── analytics.py # Analytics data\n│       │   ├── trades.py    # Trade operations\n│       │   ├── currency.py  # Currency \u0026 settings\n│       │   ├── imports.py   # CSV import\n│       │   └── instruments.py\n│       ├── services/\n│       │   ├── database.py  # SQLite operations\n│       │   └── currency.py  # Currency conversion\n│       └── models/          # Pydantic schemas\n├── app.py                   # Desktop app entry point\n├── run_api.py               # API server runner\n├── trading_analyzer.spec    # PyInstaller configuration\n└── requirements.txt\n```\n\n## Versioning\n\nThe app version is managed from a single `VERSION` file in the project root.\n\n**To release a new version:**\n\n```bash\n# 1. Update VERSION file\necho \"2.1.0\" \u003e VERSION\n\n# 2. Sync version to frontend package.json\npython scripts/sync_version.py\n\n# 3. Commit and tag\ngit add -A\ngit commit -m \"Bump version to 2.1.0\"\ngit tag v2.1.0\ngit push origin main --tags\n```\n\n## API Documentation\n\nWhen running in development mode, API documentation is available at:\n- Swagger UI: http://localhost:8000/api/docs\n- ReDoc: http://localhost:8000/api/redoc\n\n## Data Storage\n\nThe application stores data in a platform-specific location:\n\n| Platform | Location |\n|----------|----------|\n| macOS | `~/Library/Application Support/TradingAnalyzer/trading.db` |\n| Windows | `%LOCALAPPDATA%\\TradingAnalyzer\\trading.db` |\n| Linux | `~/.local/share/TradingAnalyzer/trading.db` |\n\n## Changelog\n\n### v2.0.18 (January 6, 2026)\n\n- **Trade Frequency Chart**: New chart in Analytics → Performance showing trades per day, month, and year with totals and averages per account and aggregated\n- **Monthly P\u0026L Totals**: Added positive/negative month totals to the Monthly P\u0026L chart alongside yearly totals\n- **Spread Cost Analysis**: New chart in Analytics → Risk showing spread cost per trade based on Trade Nation market data with time-based spread lookups\n- **Spread Data Source Note**: Settings page now shows when spread data was last updated with reference URL to Trade Nation Market Information Sheet\n\n## License\n\nMIT License - See [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Open an issue to discuss proposed changes\n2. Fork the repository\n3. Create a feature branch\n4. Submit a pull request\n\n## Support\n\n- [Open an issue](https://github.com/lakjdfalken/trading-analyzer/issues) for bug reports\n- [Discussions](https://github.com/lakjdfalken/trading-analyzer/discussions) for questions and ideas","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakjdfalken%2Ftrading-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flakjdfalken%2Ftrading-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakjdfalken%2Ftrading-analyzer/lists"}