NEO Trading Engine Overview
Goal¶
Build a profitable, low-capital market making system on XRPL using controlled experiments. Focus: reduce toxicity, maintain participation, achieve inventory balance, maximize realized spread.
Why¶
This is a real, capital-efficient trading system — not a theoretical model. It has real financial impact (live trading eventually), requires precision and discipline (one-variable experiments), and builds a reusable system, not a one-off strategy. Claude's role is to support structured execution and help maintain discipline in experiments — not to redesign the system or introduce unnecessary complexity.
Tangible Outcomes¶
- A stable, production-ready market making engine
- A clear playbook for tuning and operating it
- A set of validated parameters for different conditions
- A repeatable workflow for testing and improving the system
- The engine maintains consistent two-sided participation, controlled toxicity, balanced inventory, and positive realized spread
How to Run¶
Run from: C:\Users\Katja\Documents\NEO GitHub\neo-2026
DB: neo_live_stage1.db — always use this for live sessions.
Pre-session realignment check (run before every session after a DEGRADED halt):
python tools/realign_inventory_to_onchain.py --config config/config_live_stage1.yaml --db neo_live_stage1.db --dry-run
--confirm before starting the session.
10 minutes:
python run_paper_session.py --config config/config_live_stage1.yaml --db neo_live_stage1.db --duration-seconds 600 --live
30 minutes:
python run_paper_session.py --config config/config_live_stage1.yaml --db neo_live_stage1.db --duration-seconds 1800 --live
1 hour:
python run_paper_session.py --config config/config_live_stage1.yaml --db neo_live_stage1.db --duration-seconds 3600 --live
2 hours (default — Atlas-locked FLAG-044):
python run_paper_session.py --config config/config_live_stage1.yaml --db neo_live_stage1.db --duration-seconds 7200 --live
Start the dashboard:
Opens at: http://localhost:8501Post-session — Segment B analysis:
Open Problems¶
Active (current focus)¶
- Bid-side toxicity — Buy fills experiencing adverse selection (negative markout). Need to reduce toxicity while maintaining participation.
- Toxicity vs participation tradeoff — Pulling bids back reduces toxicity but may reduce fills. Need to find the stable operating zone.
- Inventory balance — System drifts long XRP when bids are too aggressive. Need near-neutral inventory without overcorrecting.
- Control limits of spread-only tuning — Adjusting bid distance alone may not fully solve toxicity. Need to determine if a new control (directional logic, anchor adjustment) is required.
- Reliable experimental framework — Isolate one variable per test, ensure fill logic and reference prices are aligned, confirm results reflect real behavior.
Secondary (later phases)¶
- Directional protection logic — Avoid buying during short-term downward moves.
- Structural quoting improvements — Laddering or multi-level quoting only if single-order reaches its limits.
- Monitoring and observability — Improve visibility into system performance and decision-making.