Files
XauBot/.gitignore
T
Vanszs a55148f232 feat: multi-TF SMC scalping pipeline + critical leakage fixes
Add M1+M15 multi-timeframe SMC scalping training pipeline (GPU XGBoost),
then fix data-leakage and non-stationarity issues found in a skeptical audit.

Pipeline:
- src/triple_barrier.py: TP/SL/time labeling (ATR-scaled, asymmetric RR)
- src/multi_tf_dataset.py: M1 base + M15 HTF context, point-in-time join_asof
  (only CLOSED M15 candles visible to each M1 bar - proven no leakage)
- src/economic_calendar.py: point-in-time forecast/actual/surprise provider
- src/smc_polars.py: add premium/discount + displacement SMC features
- scripts/train_multitf_scalper.py: GPU (device=cuda) training + walk-forward
- scripts/download_training_data.py: 1y data downloader

Leakage / robustness fixes (audit):
- CRITICAL: order block signal was written to the ORIGIN bar (future info);
  now assigned at the CONFIRMATION bar -> matches live conditions
- replace non-stationary absolute features (ema_9/21, macd*) with scale-free
  forms (ema*_dist_atr, ema_spread_atr, macd_*_bps) -> valid at any price level
- drop constant-zero calendar features from defaults (recurring provider has
  no real values); re-add when a real calendar CSV is configured
- walk-forward + train/test now embargo the max_holding label horizon and drop
  warmup rows (NaN->0 artifacts)
- news calendar features remain point-in-time (actual only at/after release)

Honest result: after fixes the spurious +2.35% edge collapses to ~random
(AUC 0.49). The prior edge was caused by the order-block look-ahead. Pipeline
is now leakage-free; a real edge still needs more M1 history / better features.

Also: test infra (pytest.ini asyncio, hmmlearn), TRAIN_BARS, cleanup of dead
modules. 14 tests pass.
2026-06-06 17:33:35 +07:00

116 lines
1.4 KiB
Plaintext

# Environment and secrets
.env
.env.local
.env.*.local
*.pem
*.key
credentials.json
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual environments
venv/
ENV/
env/
.venv/
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# Logs (ignore all content)
logs/
*.log
# Data files (large)
data/market_data/
data/trade_logs/trades/*.csv
data/trade_logs/ml_data/*.csv
# Models (large binary files)
models/*.pkl
models/*.joblib
models/*.h5
# Backtest results (generated run artifacts)
backtests/results/*.csv
backtests/*_results/
backtests/**/*.xlsx
backtests/**/*.log
backtests/ml_v3/training_log*.txt
backtests/ml_v3/*.pkl
backtests/*_results/*.pkl
# Node modules (dashboard)
web-dashboard/node_modules/
web-dashboard/.next/
web-dashboard/out/
# OS files
.DS_Store
Thumbs.db
desktop.ini
# Temporary files
*.tmp
*.temp
*.bak
# Jupyter
.ipynb_checkpoints/
# Docker
docker/data/
# Archive
archive/
# Runtime files
bot.pid
bot_output.log
nul
data/bot.lock
data/bot_status.json
data/signal_persistence.json
data/model_metrics.json
# Stray analysis output dumps
*_analysis_output.txt
training_output.log
# Claude Code local settings
.claude/
backtests/.claude/
# Screenshots
*.png
# Kiro CLI local settings
.kiro/
# Generated multi-TF dataset cache
data/multitf_dataset.parquet