Commit Graph
3 Commits
Author SHA1 Message Date
anorandClaude Opus 4.6 59eadc9f9c test: cooldown regression — 1h TF не застревает на 24ч + legacy date format
Старые тесты тестировали формулу days*24//tf_hours, повторяя баг.
Новые тесты используют hours-based логику (как prod) и проверяют:
- 4h после стопа на 1h TF = 4 candles >= cooldown 3 (regression)
- legacy date string "2026-03-13" парсится без ошибок

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 04:09:58 +10:00
anorandClaude Opus 4.6 0b2602600e feat: futures long+short 1x 1h — FuturesExecutor, routing, time_exit в барах
- Новый FuturesExecutor (ccxt bybit linear): open_long/short, close_position,
  place_safety_stop с side, ensure_leverage (cached)
- Config: market_type, retrain_enabled, is_futures(), commission_for()
- Executor: routing spot/futures, SHORT разрешён для futures,
  time_exit в барах (не днях), commission по типу рынка
- Notify: USDT balance, skip futures в coin positions, dynamic timeframe
- Config.yaml: UNI+ATOM+SUI futures 1h, mode=paper
- 26 новых тестов (всего 97)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 03:55:17 +10:00
anorandClaude Opus 4.6 db17365bbb feat: тесты (71) + backtest long-only для честных спот-результатов
- tests/test_core.py: 50 тестов (risk, state, reconciliation)
- tests/test_executor.py: 21 тест (SHORT skip, cooldown, CB, reconcile, update_stops, balance sync)
- backtest_prod.py: LONG_ONLY=True по умолчанию (шорты на споте невозможны), NEAR cd=3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:50:05 +10:00