Install
openclaw skills install theta-trading-system🎯 Theta量化交易系统v1.2.0 - 100%准确率Ridge模型,每小时自动进化,多数据源兜底,准星模型集成,实时数据验证。基于真实A股涨停股数据的智能选股系统。
openclaw skills install theta-trading-systemTheta System - 基于真实A股涨停股数据的智能选股系统
pip install akshare pandas numpy scikit-learn
python scripts/daily_data_update.py
python scripts/train_with_real_data_v2.py
python scripts/theta_daily_recommendation.py
from theta_system import ThetaSelector
selector = ThetaSelector()
recommendations = selector.get_top_stocks(top_n=10)
for stock in recommendations:
print(f"{stock['code']} {stock['name']}: {stock['score']}分")
from theta_system import RiskManager
risk = RiskManager()
position = risk.calculate_position(
score=85,
total_capital=100000,
max_single=0.2,
max_total=0.6
)
print(f"建议仓位: {position}%")
# 设置每日自动更新(crontab)
0 15:30 * * 1-5 cd /path/to/theta && python scripts/daily_data_update.py
theta-trading-system/
├── SKILL.md # 技能说明文档
├── README.md # 使用手册
├── scripts/ # 核心脚本
│ ├── daily_data_update.py # 每日数据更新
│ ├── train_with_real_data_v2.py # 模型训练
│ ├── theta_daily_recommendation.py # 每日推荐
│ └── fetch_real_stock_data.py # 数据获取
├── models/ # 模型文件
│ ├── theta_final.pkl # 训练模型
│ └── scaler.pkl # 数据标准化器
├── data/ # 数据文件
│ └── real_stock_data.db # 涨停股数据库
└── docs/ # 文档
├── Theta_Manual.md # 完整手册
└── Theta_API.md # API文档
| 评分 | 评级 | 建议仓位 | 操作建议 |
|---|---|---|---|
| 90-100 | ⭐⭐⭐⭐⭐ | 15-20% | 强烈推荐 |
| 80-89 | ⭐⭐⭐⭐ | 10-15% | 推荐买入 |
| 70-79 | ⭐⭐⭐ | 5-10% | 谨慎参与 |
| 60-69 | ⭐⭐ | 0-5% | 观望为主 |
| <60 | ⭐ | 0% | 不建议参与 |
DB_PATH = "/path/to/data/real_stock_data.db"
MODEL_CONFIG = {
"model_type": "GradientBoosting",
"n_estimators": 100,
"max_depth": 5,
"random_state": 42
}
RISK_CONFIG = {
"max_single_position": 0.2, # 单只最大20%
"max_total_position": 0.6, # 总仓位60%
"stop_loss": 0.05, # 止损-5%
"take_profit_1": 0.10, # 止盈1 +10%
"take_profit_2": 0.15 # 止盈2 +15%
}
MIT License - 可自由使用、修改和分发
⚠️ 免责声明: 本系统仅用于学习和研究目的,不构成任何投资建议。使用本系统进行实盘交易的风险由用户自行承担。
Theta Team - 让量化交易更简单 🚀