YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
BBOLD BTCUSD β Autonomous Institutional-Grade Cognitive Trading System
An AI that thinks, reasons, plans and trades like a top-tier human trader β with infinite patience and zero emotional error.
BBOLD is a cognitive trading organism for BTCUSD scalping (5β60 pip targets). It combines 21 specialised analytical modules, a 30+ model ML ensemble, neuro-symbolic confluence voting, non-repainting guarantees, and a self-learning loop (including nightly "Dream Mode" counterfactual replay).
π Documentation Set
Read in order:
- PROJECT_CHARTER.md β The why and what: vision, goals, philosophy, risk guardrails, success metrics, feature catalogue.
- ARCHITECTURE_AND_DESIGN.md β System-level how: pipeline, data flow, non-repainting design, anti-overfitting strategy, memory architecture, tech stack.
- MODULE_SPECIFICATIONS.md β Per-file blueprint for every one of the 24 modules: classes, signatures, algorithms, dependencies, tests.
- IMPLEMENTATION_PLAYBOOK.md β Execution roadmap: PR-by-PR build sequence, test plan, CI, quality gates, Definition of Done.
- OPERATIONS_MANUAL.md β Production runbook: install, config, Docker/K8s, monitoring, retraining, backups, disaster recovery.
A non-programmer should be able to understand the system from these five documents. A senior engineer should be able to build it without asking a single clarifying question.
π§ What Makes BBOLD Different
- Non-repainting by design β every indicator uses only closed bars (
shift(1)); enforced bytests/test_no_lookahead.py. - 18-stage confluence β no single module can fire a trade; weighted soft voting required.
- 30+ model ensemble β heterogeneous ML (RF, XGB, LightGBM, CatBoost, kNN, SVM, MLP, 1D-CNN, Tiny-LSTM, GRU, β¦) with walk-forward + adversarial validation.
- Self-learning loop β Bayesian weight updates after every trade; nightly retrain; counterfactual "Dream Mode".
- Four-tier memory β working (RAM), episodic (SQLite), semantic (FAISS), reflective (
memory.md). - Hard risk guardrails β circuit breakers cannot be overridden at runtime.
- Explainability first β every signal carries a reason chain (which modules voted + SHAP feature attribution).
ποΈ Codebase Structure
bbold-btcusd-bot/
βββ data/ # CSV inputs (5m/15m/30m/h1)
βββ modules/ # 21 analytical engines + cognitive_brain
βββ models/ # trained ML artefacts + FAISS index
βββ tests/ # mirrored test suite (β₯ 80 % coverage)
βββ dashboard/ # React frontend + Node.js backend
βββ docs/ # The 5 master documents
βββ main.py # Entry point
βββ memory.md # Persistent external reasoning log
βββ requirements.txt
β‘ Quickstart
# 1. Clone & install
git clone <repo-url> bbold-btcusd-bot && cd bbold-btcusd-bot
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 2. Drop your CSV data into data/ (columns: datetime,open,high,low,close,volume)
# 3. Train the AI ensemble (first time only, ~30 min on 8 cores)
python modules/ai_engine.py --train
# 4. Run a historical replay
python main.py --mode replay --start 2024-01-01 --end 2024-06-30
# 5. Launch the dashboard
docker compose up -d redis
cd dashboard/backend && npm install && npm start &
cd dashboard/frontend && npm install && npm start
# β open http://localhost:3000
Or, all-in-one with Docker:
docker compose up
π― Success Targets (v1.0)
| Metric | Target |
|---|---|
| Directional accuracy (post-learning) | β₯ 97 % |
| Sharpe ratio (annualised, backtest) | β₯ 1.5 |
| Profit factor | β₯ 1.4 |
| Max drawdown | β€ 8 % |
| Cycle latency | < 1 s |
| Repaint events | 0 |
| Test coverage | β₯ 80 % |
π‘οΈ Risk Guardrails (Hard)
- 0.5 % risk per trade
- 2 % max daily loss β SAFE MODE
- 8 % max drawdown β trading halted
- Min confluence 0.75 to trade
- Max 10 trades / day
- 1.5 Γ ATR stop / 2.5 Γ ATR target (R:R β₯ 1.66)
Full list in PROJECT_CHARTER.md Β§7.
π¦ Tech Stack (summary)
Python 3.11 Β· pandas Β· scikit-learn Β· XGBoost Β· LightGBM Β· CatBoost Β· PyTorch (CPU) Β· FAISS Β· SHAP Β· Redis Β· SQLite Β· Node.js 18 Β· React 18 Β· TradingView Lightweight Charts Β· Docker Β· GitHub Actions.
Full justification in ARCHITECTURE_AND_DESIGN.md Β§7.
π οΈ Contributing / Building
Follow the PR sequence in IMPLEMENTATION_PLAYBOOK.md Β§3. Every PR must pass:
- β Ruff (lint)
- β mypy (types)
- β pytest with coverage β₯ 80 %
- β No-lookahead test
π License
TBD by owner.
π₯ Stakeholders
| Role | Document of Interest |
|---|---|
| Owner (non-programmer) | PROJECT_CHARTER.md + dashboard |
| Lead Developer | MODULE_SPECIFICATIONS.md + IMPLEMENTATION_PLAYBOOK.md |
| DevOps / SRE | OPERATIONS_MANUAL.md |
| Quant Researcher | ARCHITECTURE_AND_DESIGN.md |
| AI Engineer | MODULE_SPECIFICATIONS.md Β§ai_engine + OPERATIONS_MANUAL.md Β§7 |
Built to think. Built to learn. Built to last. β BBOLD