Initial commit: BTC 1h prediction model (53.10% accuracy)

🎯 项目成果:
- 准确率: 53.10% (2026年测试集)
- 任务类型: 二分类 (预测涨/跌)
- 特征: OHLCV + RSI + MACD (9个特征)
- 训练数据: 2020-2025年BTC小时数据 (52,351序列)
- 测试数据: 2026年1-29日 (484序列)

📊 性能指标:
- 精确率: 51.79%
- 召回率: 49.36%
- F1分数: 0.5054
- 预测分布: 非常平衡 (偏差仅-11个)

🔬 实验历史:
- 尝试了5种方案 (回归/分类, 不同数据划分)
- 分类任务优于回归任务 (53.10% vs 49.5%)
- 全量训练避免了过拟合问题

📦 主要模型文件:
- models/checkpoints/dlinear_classification_2026/
  - best_model.pt (最佳模型)
  - preprocessor.pkl (预处理器)
  - test_2026_results.json (测试结果)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
crypto_predictorandClaude Sonnet 4.5 committed 2026-01-29 21:27:15 +08:00
commit 9bbdc8d42b
82 files changed
+8742

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
# Binance API (public data - no keys needed)
BINANCE_API_URL=https://api.binance.com
# 代理配置 (SOCKS5)
SOCKS5_PROXY=socks5://127.0.0.1:7890
USE_PROXY=true
# Data Configuration
DATA_CACHE_DIR=./data/cache
LOOKBACK_1H=168 # 1 week for 1h data
LOOKBACK_15M=672 # 1 week for 15m data
FORECAST_HORIZON=24 # Predict 24 periods ahead
# Training Configuration
BATCH_SIZE=64
LEARNING_RATE=0.001
MAX_EPOCHS=100
EARLY_STOPPING_PATIENCE=10
TRAIN_SPLIT=0.7
VAL_SPLIT=0.15
TEST_SPLIT=0.15
# Model Paths
MODEL_DIR=./models/checkpoints
ONNX_DIR=./models/onnx
# API Configuration
API_PORT=5000
API_HOST=0.0.0.0
# Classification Threshold
PRICE_CHANGE_THRESHOLD=0.015 # 1.5% threshold for binary labels