-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Objective
Develop a single-file, production-grade Python 3.11 bot (bot_v28_ultra.py
) that trades EURUSD (OTC) binary options on IQ Option with 1-minute expiry, using 1117+ fully implemented models and 500+ engineered features, real self-learning, OTC Bug Hunter, Smoke Testing, Cold Start Listener, Pattern Evolution, Explainability, Telegram alerts, and a built-in web dashboard.
- No placeholders, stubs, mock brokers, or TODOs. All code must be implemented and runnable.
- Output: one Python file (
bot_v28_ultra.py
). - Supports Python 3.11 standard library and vendorized pure-Python deps embedded.
- Accepts config via env vars and
.env
file if present. No hardcoded secrets. - Cross-platform (Windows/Linux).
Broker Layer
- Real IQ Option API (no mocks): WebSocket for quotes, REST for auth/portfolio, reconnection, throttling, and backoff.
- EURUSD-OTC, binary, 1-min expiry. Time sync (NTP check, block if drift > 150ms).
- BrokerClient: login, session refresh, device fingerprint, symbol discovery, tick/1s bar feeds (ring buffer 24h), order placement w/ risk checks, recon/backoff state machine.
Feature Engine
- FeatureEngine: computes ≥500 numerical features per tick/bar, organized in modules (price/stats, time/session, order-book, pattern/regime, risk, self-learning, monitoring/explain). All features real and numerically tested with asserts (skip if live).
ModelZoo (1117+ real models)
- ModelRegistry: static registration, ≥1117 estimators (ML, neural, Bayesian, RL, dealer/trap, graph/multimodal, safety, ensemble). Each model implements fit(X, y), predict_proba(X), explain(X); no constant/random models; deterministic seeds; unit-style asserts.
Backtesting & Live
- Backtester: CV, walk-forward, Monte-Carlo. Metrics: edge, accuracy, F1, calibration, Sharpe, payout utility. Strategy selector switches among top models via bandit/conformal signals. Threshold optimizer and Kelly cap with drawdown guard.
Safety/Monitoring
- OTC Bug Hunter, Smoke Testing, Cold Start Listener, Self-Healing, pattern evolution, nightly re-train, risk/compliance guardrails.
Dashboard/Explainability
- FastAPI + Tailwind CDN + ECharts. Pages: live, models, features, risk, logs. Serve from single file, with embedded static assets as data-URIs.
- Telegram integration: minimal client (no external lib), commands (/start, /status, /halt, etc.), alerts, daily report.
Logging & Compliance
- JSON heartbeat every 5s, trade explain cards (persisted SQLite), risk compliance (max DD, loss streak, cooldown, payout limit, market checks).
Orchestration
- Boot: load env, logger, cold start safe mode, broker start, feature warmup, smoke test, backtest, pick model, start selector, live loop, self-healing on failure, nightly pattern evolution.
Example Trading Rule
If prob_call - prob_put ≥ 0.06, ECE < 0.08, payout ≥ MIN_PAYOUT_PCT, bug_score < 0.35, drift_PSI < 0.2 → trade direction = argmax; position = min(Kelly_cap, loss_streak_guard, bankroll_limit). Threshold via payout-optimizer; conformal interval must not straddle 0.5.
Acceptance
- Starts with no missing import or placeholder text
- --selftest passes in <60s
- --backtest prints leaderboard
- Dashboard live
- Telegram commands respond
- Demo order on /resume when smoke=green
- Trade explain cards in dashboard
Deliverable
A single, production-ready file: bot_v28_ultra.py
, meeting all Acceptance Criteria above.
Metadata
Metadata
Assignees
Labels
No labels