Skip to content

Add AUDIT.md: live trading bias and execution fidelity audit#2

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/audit-codebase-performance-metrics
Open

Add AUDIT.md: live trading bias and execution fidelity audit#2
Copilot wants to merge 1 commit into
mainfrom
copilot/audit-codebase-performance-metrics

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

Documents the gap between paper trading results (57 fills, 96.4% win rate, +$64k) and expected live performance, cataloguing execution, calibration, and statistical concerns that need to be addressed before EXECUTION_MODE=live.

Contents

  • 8 ranked concerns with exact file/line references, offending code blocks, and a concrete "What to fix" for each
  • Severity tiers: slippage model absence and premature resolution heuristics as highest priority; XRP/SOL OOS validity and Sharpe annualization assumption as minor
  • Key findings:
    • Paper fills at quoted ask with zero slippage — the single largest source of overstated edge
    • BRACKET_CALIBRATION=0.55 was fit post-hoc to one loss event; not yet validated on 50+ bracket fills
    • replay_backtest is a calibration consistency check, not a walk-forward test — no train/test split exists
    • Signal age gate (max_signal_age_seconds=2.0) is effectively bypassed in paper mode due to synchronous asyncio execution
    • Position sizing ignores market.liquidity — large fills will walk the book in live
  • Summary table mapping each concern to estimated live degradation magnitude

@nxd914 nxd914 marked this pull request as ready for review April 22, 2026 22:59
Copilot AI review requested due to automatic review settings April 22, 2026 22:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AUDIT.md document that audits the gap between paper-trading results and expected live-trading performance, focusing on execution fidelity, calibration, and evaluation methodology before enabling EXECUTION_MODE=live.

Changes:

  • Introduces AUDIT.md with 8 ranked concerns about paper vs live divergence, each with code references and suggested fixes.
  • Summarizes expected live degradation drivers (slippage, latency gating, resolution heuristics, liquidity sizing).
  • Provides decision criteria / gating recommendations for when to consider live trading.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AUDIT.md
Comment on lines +68 to +70
These price-level heuristics run *before* the authoritative `status == "settled" and result` path and fire on every polling cycle. A crypto-volatile market can briefly spike to `yes_bid=0.99` without having settled. If such a tick triggers a premature YES resolution on a winning position, the trade is booked as a win — and if it eventually settles NO, the position is already gone from the DB.

**What to fix:** Require `status == "settled"` before applying any price-level heuristic. The heuristics should only run as a fallback for confirmed-settled markets where the `result` field is missing, not as a primary path.
Comment thread AUDIT.md
Comment on lines +25 to +26
**File:** `agents/execution_agent.py` lines 69–72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants