All notable changes to this project are documented here.
- Single-instance runtime lock (
/tmp/kraken_bot.lock) to prevent duplicate bot processes. - Asset pair validation + normalization against Kraken
AssetPairs(e.g.XXBTZEUR -> XBTEUR). - Dynamic buy sizing and additional insufficient-funds safeguards before order placement.
- Global and per-pair trade cooldown controls.
- Fee-aware reconstruction of position quantity, average entry, realized PnL, and fees from Kraken history.
- Per-coin metrics logging and adaptive take-profit controls.
- Trade counter reconstruction from Kraken history on startup.
- Trade history pagination support in API wrapper (
fetch_all=True) with offset paging. - Ledger pagination support in API wrapper via
get_ledgers(..., fetch_all=True). - Startup balance baseline is now fixed (
Start) and external cashflows are tracked separately from Kraken ledger (NetCFdeposits/withdrawals). - Mentor-v2 risk hardening: regime filter (auto), hard stop-loss, time-stop, daily loss limit guard, and risk-off position sizing.
- Multi-edge signal engine updated: mean-reversion + trend-following continuation triggers.
- Re-entry tuning made more aggressive:
min_buy_score20 -> 14,regime_min_score-5 -> -12,risk_off_allocation_multiplier0.35 -> 0.60. - Mentor-v3 adaptive controls added to live bot: volatility-targeted sizing (
target_volatility_pct) and loss-streak circuit breaker (max_consecutive_losses+ cooldown pause). - Added detailed research simulator
scripts/backtest_v3_detailed.pyfor 30d tests with fee/slippage, regime switch behavior, and long/short/scalp estimation. - Added live autonomous short execution path (Kraken margin) with capped short notional and configurable leverage.
- Added autonomous MTF regime scoring (trend + momentum + volatility penalty) to improve risk-on/off switching quality.
- Added yearly prod-vs-dev benchmark runner:
scripts/prod_dev_yearly_backtest.py. - Added prod-vs-dev promotion gate checker:
scripts/release_gate_prod_dev.py. - Added NAS data collector for 5y OHLC research on
Volume:scripts/collect_kraken_history.py. - Added research progress overview tool:
scripts/research_progress.py. - Added incremental/resumable NAS collector with trading-first throttling and local lock:
scripts/collect_kraken_history_incremental.py. - Added txid-free trade summary log lines for stream-safe display (pair + size + EUR notional only).
- Branch model simplified to
main(live) anddev(research); deprecatedprodbranch.
- Autonomous iterative improvement loop (
scripts/autosim_main_dev_loop.sh) with 24/7 NAS data validation (30d + 1y backtests). - Parallel AI agents for bot optimization: book strategies (Carter, Williams, Brooks), data pattern mining, risk/metrics improvement.
- Switched subagents to Grok model (
github-copilot/grok-code-fast-1) for code generation and strategy ideation. - Enhanced evaluation metrics: Sharpe/Sortino-Ratio, Kelly Criterion position sizing, drawdown limits.
- Data-driven pattern analysis on NAS historical trades for entry/exit signals.
- Sell behavior hardened around configured profit target logic (current operating rule: only sell when target criteria are met; base target 10%).
- Signal filtering tightened in
analysis.pyto reduce low-quality entries. - Config validation in
utils.pyimproved to fail safer on invalid/missing settings. - Startup log behavior: fresh
logs/bot_activity.logon bot start when configured. - Trade counter now uses all trades since 2026-01-01 (YTD) instead of a single default page.
- Reduced log noise for pair normalization: identical
Pair normalized: A -> Bmessages are now logged once per bot runtime instead of repeating at each config reload. - Runtime status output now includes
Start,NetCF, andAdjPnLso deposits do not distort baseline performance reading.
- Repeated
EQuery:Unknown asset pairissues from invalid pair usage (notablyMATICEUR) through pair validation. - Reduced
EOrder:Insufficient fundsnoise with stronger pre-checks and sizing. - Duplicate-process side effects (conflicting counters/order flow) via lockfile enforcement.
- Counter reset behavior (
Trades: 0after restart) by rebuilding count from Kraken history.
- Integrated and deployed safety/consistency improvements across:
main.pytrading_bot.pyanalysis.pykraken_interface.pyutils.pyconfig.toml
- Pushed commits related to these updates, including recent:
ba293df– Persist displayed trade counter from Kraken history across restartsb422a00– Load full Kraken trade history since Jan 2026 for trade counter
- Multi-pair EUR trading with validated symbols.
- Profit-target-driven exits (10% base target policy currently in use).
- Cooldown + funds-aware execution pipeline.
- Restart-safe state recovery (positions + trade counter) from Kraken history.