|
| 1 | +# Trading Bots Workspace - Quantitative Research & Execution Infrastructure |
| 2 | + |
| 3 | +[](https://github.com/GalToast/trading-bots/actions/workflows/focused-tests.yml) |
| 4 | + |
| 5 | +AI-assisted quantitative research system for testing trading ideas under explicit validation gates, runtime supervision, and evidence-preserving review. |
| 6 | + |
| 7 | +This repository is best read as a decision-system case study, not as a profit claim. The engineering focus is hypothesis design, experiment control, telemetry, risk limits, watchdog supervision, and proof surfaces that keep both positive and negative evidence visible. |
| 8 | + |
| 9 | +In this snapshot, "AI-assisted" means LLM-assisted system design, review, and iteration around rule-based/adaptive trading infrastructure. It does not claim a trained predictive model or autonomous black-box trading agent. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## How to Review This Repo |
| 14 | + |
| 15 | +If you have **5 minutes**, check the CI badge, skim the system diagram, and read the Proof Snapshot. If you have **15 minutes**, read the experiment protocol and edge registry, then inspect the focused Kraken maker test. If you want the technical core, compare the focused test with the runner it covers. |
| 16 | + |
| 17 | +## What This Demonstrates |
| 18 | + |
| 19 | +- Building a multi-lane automation system with shared runtime controls and supervised execution paths. |
| 20 | +- Turning messy strategy ideas into testable hypotheses with acceptance gates and failure records. |
| 21 | +- Using AI-native workflows to design, operate, test, and revise a real local research system without hiding the audit trail. |
| 22 | +- Separating public proof artifacts from local runtime state, credentials, broker-connected workflows, and generated logs. |
| 23 | +- Maintaining a green, focused CI path for the highest-signal unit surface in the current public snapshot. |
| 24 | + |
| 25 | +## Proof Snapshot |
| 26 | + |
| 27 | +| Proof surface | What it shows | |
| 28 | +| --- | --- | |
| 29 | +| [Focused CI](https://github.com/GalToast/trading-bots/actions/workflows/focused-tests.yml) | GitHub Actions runs the Kraken maker shadow unit test suite. | |
| 30 | +| [`scripts/test_live_kraken_spot_frontier_maker_machinegun_shadow.py`](./scripts/test_live_kraken_spot_frontier_maker_machinegun_shadow.py) | Focused tests for maker/taker accounting, spread gates, min-notional guards, reentry cooldowns, and exit behavior. | |
| 31 | +| [`docs/evidence/edge_registry.md`](./docs/evidence/edge_registry.md) | Proof-board style registry of validated strategy families and backtest evidence. | |
| 32 | +| [`docs/experiment-protocol.md`](./docs/experiment-protocol.md) | The graduation ladder for moving ideas from hypothesis to validated strategy. | |
| 33 | +| [`docs/performance-review.md`](./docs/performance-review.md) | Performance review notes, including failure modes and limitations. | |
| 34 | +| [`COMMAND_CENTER.md`](./COMMAND_CENTER.md) | Runtime posture, deployment gates, and decision status snapshot. | |
| 35 | + |
| 36 | +## System Model |
| 37 | + |
| 38 | +The project combines research scripts, strategy runners, runtime monitors, and documentation into a controlled experimentation loop: |
| 39 | + |
| 40 | +1. Generate a strategy hypothesis. |
| 41 | +2. Backtest or shadow-test it under explicit constraints. |
| 42 | +3. Record proof, failure, and ambiguity instead of only preserving wins. |
| 43 | +4. Promote only when the evidence meets the documented gate. |
| 44 | +5. Keep runtime state and broker-connected details out of the public tree. |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Runtime Architecture |
| 49 | + |
| 50 | +| Component | Role | |
| 51 | +| --- | --- | |
| 52 | +| `mt5_bot.py` | Canonical supervisor for monitored worker execution. | |
| 53 | +| `mt5_bot_v10.py` | Canonical worker containing trading loop, entries, and exits. | |
| 54 | +| `exit_manager.py` | Dynamic exit-policy companion. | |
| 55 | +| `monitor.py` | Watchdog and health-check surface. | |
| 56 | +| `brain.py` | Learning/adaptation logic; generated state is excluded from the public repo. | |
| 57 | +| `bot/` | Policy subroutines for admission, competition lane priority, exits, posture, symbol risk, and price structure. | |
| 58 | +| `scripts/live_kraken_spot_frontier_maker_machinegun_shadow.py` | Current focused Kraken maker shadow runner under unit coverage. | |
| 59 | + |
| 60 | +## Repository Guide |
| 61 | + |
| 62 | +| Path | Purpose | |
| 63 | +| --- | --- | |
| 64 | +| [`docs/QUICKSTART.md`](./docs/QUICKSTART.md) | Short orientation before touching broker-connected workflows. | |
| 65 | +| [`docs/trading-lane-presentation.html`](./docs/trading-lane-presentation.html) | Browser-readable presentation surface for the system model. | |
| 66 | +| [`docs/evidence/`](./docs/evidence/) | Public proof artifacts suitable for first-pass review. | |
| 67 | +| [`docs/assets/system-architecture.svg`](./docs/assets/system-architecture.svg) | Architecture diagram for the public review path. | |
| 68 | +| [`PUBLIC_REPO_BOUNDARIES.md`](./PUBLIC_REPO_BOUNDARIES.md) | What is public here, what stays private locally, and why. | |
| 69 | +| [`scripts/README.md`](./scripts/README.md) | Curated guide to the large scripts directory. | |
| 70 | +| [`scripts/`](./scripts/) | Research builders, runners, tests, and proof-board generators. | |
| 71 | +| [`tests/`](./tests/) | Discoverable public smoke tests for core policy modules and CI stubs. | |
| 72 | +| [`research/strategies/`](./research/strategies/) | Strategy prototypes and experiment families. | |
| 73 | + |
| 74 | +## Recruiter Reading Path |
| 75 | + |
| 76 | +Start with the CI badge, then read [`docs/experiment-protocol.md`](./docs/experiment-protocol.md) and [`docs/evidence/edge_registry.md`](./docs/evidence/edge_registry.md). After that, inspect the focused Kraken maker test and runner pair: |
| 77 | + |
| 78 | +- [`scripts/test_live_kraken_spot_frontier_maker_machinegun_shadow.py`](./scripts/test_live_kraken_spot_frontier_maker_machinegun_shadow.py) |
| 79 | +- [`scripts/live_kraken_spot_frontier_maker_machinegun_shadow.py`](./scripts/live_kraken_spot_frontier_maker_machinegun_shadow.py) |
| 80 | + |
| 81 | +Those files show the most concrete engineering signal: strategy behavior is specified, tested, and constrained before being treated as deployable. |
| 82 | + |
| 83 | +## Disclaimer |
| 84 | + |
| 85 | +This is research infrastructure. It is not financial advice, not a guarantee of trading performance, and not a recommendation to trade any instrument. |
0 commit comments