Drop in your Binance or Bybit CSV export. An AI agent identifies revenge trading, overleverage, FOMO entries, and other psychological errors โ with dollar attribution per error class. Runs locally. No API keys. No account linking.
AI Trading Journal Audit Tool
Analyze Binance and Bybit trading journal CSV files to detect behavioral trading mistakes
Local-first trading journal analyzer for identifying revenge trading, overleverage, FOMO entries, session weakness, and other costly trading patterns from your CSV history.

What This Project Does
AI Trading Journal Audit Tool is a trading journal analyzer for Binance and Bybit CSV exports.
Most trading journals show basic metrics like win rate, profit and loss, or average risk-reward. This tool goes further by identifying behavioral trading mistakes and showing which patterns are damaging performance.
It reads your trade history, reconstructs trade sequences, detects repeated error patterns, and generates an audit report with:
- flagged trades
- behavioral error labels
- severity scores
- session-based performance analysis
- estimated dollar cost by error type
- crypto traders reviewing their own performance
- discretionary traders trying to reduce emotional mistakes
- trading coaches and educators
- developers building trading psychology or journaling products
Below is the text report format. The example shows a larger run; the bundled sample CSVs produce shorter reports.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
AI TRADING JOURNAL AUDIT โ REPORT v0.4.1
Account Snapshot: BYBITUSDTPERP | Period: 2026-02-14 โ 2026-02-28
Trades Analyzed: 47 | Flagged: 19 (40.4%) | Generated: 2026-02-28 14:32 UTC
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PSYCHOLOGICAL ERROR BREAKDOWN โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ REVENGE_TRADING โโโโโโโโโโโโโโ 8 instances | -$412.50 attributed OVERLEVERAGE โโโโโโโโโโโโโโ 6 instances | -$318.00 attributed FOMO_ENTRY โโโโโโโโโโโโโโ 4 instances | -$174.20 attributed LOSSAVERAGINGDOWN โโโโโโโโโโโโโโ 1 instance | -$89.00 attributed โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ TOTAL BEHAVIORAL COST 19 flagged trades | -$993.70 attributed
FLAGGED TRADE DETAIL (Top 5 by severity) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [CRITICAL] Trade #31 | 2026-02-21 03:17 UTC Pair: SOLUSDT | Side: LONG | Size: 18x leverage | PnL: -$214.00 Error: REVENGE_TRADING Reason: Entry placed 4 minutes after Trade #30 closed at -$108.00. Position size increased 3.2x vs prior trade. Classic loss-recovery escalation pattern detected. โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [HIGH] Trade #38 | 2026-02-24 11:44 UTC Pair: ETHUSDT | Side: SHORT | Size: 25x leverage | PnL: -$189.00 Error: OVERLEVERAGE Reason: 25x on a position sized 18% of account equity. Leverage exceeded your 14-day personal median (8x) by 212%. No stop-loss detected in export metadata. โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [HIGH] Trade #12 | 2026-02-17 20:58 UTC Pair: BTCUSDT | Side: LONG | Size: 10x leverage | PnL: -$97.20 Error: FOMO_ENTRY Reason: Entry at local 4H high following a 6.2% candle. Price had already moved; entry places you at maximum extension. No retracement or consolidation confirmation detected. โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PATTERN SUMMARY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Primary driver of losses: Revenge trading loop after drawdown Trigger condition: Back-to-back losses within 2-hour window Risk escalation: You increase position size after losses, not after wins โ inverse of healthy sizing Safest session: UTC 08:00โ12:00 (London open) โ 71% win rate Most destructive session: UTC 00:00โ04:00 โ 23% win rate, highest avg leverage
RECOMMENDATION โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Rule to implement: Hard stop after 2 consecutive losses in any 4-hour window. Mandatory 90-minute cooldown before re-entry. Projected impact: Eliminates 8 of 19 flagged trades ($412.50).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฌ Psychological Error Taxonomy
The agent classifies trades against a structured taxonomy built specifically for crypto derivatives trading. These are not generic labels โ each has a precise, measurable detection signature.
| Error Class | Detection Signature | Common Trigger | |---|---|---| | REVENGE_TRADING | Entry < 10 min after loss + position size increase โฅ 1.5x | Consecutive losses in same session | | OVERLEVERAGE | Leverage > 2x personal 14-day median AND > 15% equity per trade | High-volatility breakout moves | | FOMO_ENTRY | Entry at or above N-period high after โฅ 4% candle with no pullback | Viral price moves, Twitter/CT pumps | | LOSSAVERAGINGDOWN | Same-direction add-on after open position goes negative โฅ 5% | Strong trend against position | | PREMATURE_EXIT | Exit before TP with โฅ 60% of target achieved, trade would have hit TP | Recent losing streak causing fear | | OVERTRADING | > 3x personal daily trade average with no increase in win rate | Slow market / boredom / drawdown | | POSITIONSIZECHAOS | Standard deviation of position sizes > 80% of mean over 7-day window | Emotional state volatility |
โ๏ธ How This Compares to Every Alternative You've Tried
| | AI Trading Journal Audit Tool | TraderSync | Tradervue | Notion Template | Manual Spreadsheet | Generic ChatGPT | |---|---|---|---|---|---|---| | Reads Binance/Bybit CSV directly | โ | โ (paid) | โ (limited) | โ manual | โ manual | โ no structure | | AI behavioral error detection | โ | โ stats only | โ stats only | โ | โ | โ ๏ธ inconsistent | | Detects revenge trading specifically | โ | โ | โ | โ | โ | โ ๏ธ if prompted right | | Session-timing analysis | โ | โ ๏ธ basic | โ ๏ธ basic | โ | โ | โ | | Dollar cost per error type | โ | โ | โ | โ | โ | โ | | No account linking required | โ | โ OAuth | โ OAuth | โ | โ | โ | | Data stays local (no cloud) | โ | โ SaaS | โ SaaS | โ | โ | โ OpenAI | | Structured psychological taxonomy | โ 4 classes (7 in roadmap) | โ | โ | โ | โ | โ | | Monthly cost | $0 | $29.95/mo | $29.95/mo | $0 | $0 | ~$20/mo |
๐๏ธ System Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI TRADING JOURNAL AUDIT TOOL โ
โ โโโโโโโโโโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ INPUT LAYER โ AGENT CORE โ OUTPUT LAYER โ
โ โ โ โ
โ Binance CSV โ โโโบ CSV Parser โ audit_report.txt โ
โ Bybit CSV โ (normalize schema) โ flagged_trades.json โ
โ โ โ โ error_summary.csv โ
โ โ โผ โ โ
โ โ Trade Sequencer โ [Full Build Only] โ
โ โ (chronological + โ Streamlit Dashboard โ
โ โ context windows) โ PDF Audit Report โ
โ โ โ โ GPT-4o Coach Prompts โ
โ โ โผ โ Multi-session Heatmap โ
โ โ Behavioral โ โ
โ โ Classifier Agent โ โ
โ โ (rule-based; LLM โ โ
โ โ in full build) โ โ
โ โ โ โ โ
โ โ โผ โ โ
โ โ Pattern Aggregator โ โ
โ โ (cross-trade โ โ
โ โ error scoring) โ โ
โโโโโโโโโโโโโโโโฉโโโโโโโโโโโโโโโโโโโโโโโโฉโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
No API keys. Runs locally. Your CSV never touches a server.
โ๏ธ Installation & Setup
Step 1 โ Clone the repository
git clone https://github.com/leionion/ai-trading-journal-audit-tool.git cd ai-trading-journal-audit-tool
Step 2 โ Create a virtual environment and install dependencies
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
Step 3 โ (Optional) Configure LLM in .env for future enrichment
cp .env.example .env The beta uses rule-based classification โ no API key required.
.env is for future LLM-backed features (v0.5.1+).
Step 4 โ Export your trade history CSV
- Binance: Account โ Order History โ Export โ Select date range โ Download CSV
- Bybit: My Assets โ Order History โ Export โ Trade Records โ Download
python audit.py --csv your_trades.csv --exchange binance --mode paper Or omit --exchange to auto-detect from CSV headers
Your audit report will be written to ./output/auditreportYYYYMMDDHHMMSSmicroseconds.txt (unique per run).
Try with sample data:
python audit.py --csv sampletradesbybit.csv --exchange bybit --mode paper python audit.py --csv sampletradesbinance.csv --exchange binance --mode paper
๐ง Configuration Reference
# config.yaml โ full configuration reference
โโ LLM Settings โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
llm:
provider: openai # openai | anthropic | ollama | groq
model: gpt-4o-mini # gpt-4o-mini is sufficient; gpt-4o for higher accuracy
temperature: 0.1 # keep low โ you want deterministic classifications
max_tokens: 2000
โโ Behavioral Classifier Settings โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
classifier:
revengetradingwindow_minutes: 10 # time window to check for lossโentry pattern
overleveragemedianmultiplier: 2.0 # triggers if leverage > 2x personal 14d median
fomocandlethreshold_pct: 4.0 # entry after X% candle with no pullback
mintradesfor_pattern: 3 # minimum trades before pattern-level flagging
โโ Exchange Schema โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
exchange:
name: binance # binance | bybit
instrument_type: futures # futures | spot
currency: USDT
โโ Output Settings โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
output:
format: text # text | json | both
includerawflags: true # include per-trade detection reasoning
dollar_attribution: true # calculate PnL attributed to each error class
session_analysis: true # break down performance by UTC session
๐บ๏ธ Roadmap
โ Shipped
v0.1.0โ Binance CSV parser + trade sequencerv0.2.0โ Core behavioral classifier (4 error classes)v0.3.0โ Bybit CSV support + schema normalizationv0.4.0โ Pattern aggregator + dollar attribution per error classv0.4.1โ Session timing analysis (UTC session breakdown)
๐จ Active Development
v0.5.0โ Full 7-class error taxonomy (3 new classes)v0.5.1โ Groq and Ollama LLM backend support (fully local, zero API cost)v0.5.2โ JSON + CSV output formats alongside text report
๐ Planned (Private Build)
v0.6.0โ Streamlit dashboard with interactive trade timelinev0.7.0โ Multi-session heatmap (performance by day/hour grid)v0.8.0โ GPT-4o coaching prompt generator (personalized to your error profile)v0.9.0โ OKX and Hyperliquid CSV supportv1.0.0โ PDF audit report export + shareable summary card
๐ Want the Full Audit Engine?
The public build gives you the core classifier. Serious traders who want the complete system โ dashboard, coaching prompts, heatmaps, and full 7-class taxonomy โ reach out directly.
This is built for:
| Profile | What You Get | |---|---| | Retail trader losing > $500/month to behavioral errors | The full report shows exactly which errors to eliminate first โ highest ROI fix identified by dollar impact | | Trader who's profitable but inconsistent | Pattern analysis reveals which sessions and market conditions destabilize your edge, and which to double down on | | Developer building a prop firm or trading education platform | The classifier engine and taxonomy are available for integration โ structured output, clean API | | Quant / algo trader reviewing discretionary override decisions | Behavioral audit of manual interventions against your systematic signals โ quantify how much your gut costs you |
How to reach me:
โ GitHub: github.com/leionion โ Open a GitHub Discussion or drop a note on any issue
When you reach out, mention:
- Which exchange you trade on and roughly how many trades per month
- Whether you want the full personal audit build or the developer/integration version
- The single biggest pattern you already suspect in your own trading