Precise T Trading
by @yang77160
Professional T+0 intraday trading system for Chinese A-shares. Uses Bayesian inference, Kelly criterion, and VaR risk management to optimize day-trading deci...
clawhub install precise-t-trading📖 About This Skill
name: precise-t-trading description: Professional T+0 intraday trading system for Chinese A-shares. Uses Bayesian inference, Kelly criterion, and VaR risk management to optimize day-trading decisions. Supports real-time quotes from Tencent Finance API. Ideal for active traders seeking quantitative edge in volatile markets. Includes risk control, position sizing, and automated monitoring. version: 1.0.0 author: Kemi (yang77160) license: MIT tags: [trading, stocks, quantitative, A-share, T+0, risk-management] required_env_vars: [] optional_env_vars: - T_TRADING_DEFAULT_STOCK - T_TRADING_TOTAL_SHARES network: - qt.gtimg.cn writes: - ./cache/ (optional caching) - ./monitor_logs/ (if using monitor script) install: pip install numpy scipy requests colorama
Precise T+0 Trading System (精算做T系统)
Professional quantitative trading skill for Chinese A-share intraday T+0 trading. Combines probability theory, risk management, and technical analysis to optimize trading decisions.
What This Skill Does
When to Use
Use this skill when:
Quick Start
1. Run T+0 Analysis
python scripts/t_trading_analysis.py sz000981
Output:
======================================================================
Precise T+0 Trading System v2.0
======================================================================【Real-time Quote】
Stock: 山子高科 (000981)
Price: 4.06 CNY
Change: -1.69%
...
【Quantitative Analysis】
Win Rate: 65.0% → 75.5% (Bayesian)
Expected Profit: +0.0481 CNY/share PASS
Kelly Position: 50.0% → Conservative 30.0%
Technical Score: 85/100
VaR(95%): 269.43 CNY
【Final Decision】
GO - Execute T+0 Trade
Action Plan:
Buy Zone: 4.01 - 4.04
Sell Zone: 4.39 - 4.72
Position: 360 shares
Expected Profit: +17.33 CNY
Stop Loss: 3.96
2. Start Price Monitoring
python scripts/stock_monitor.py
Monitors stocks every 60 minutes and logs alerts.
3. Open Web Dashboard
open scripts/dashboard.html
Real-time visualization with auto-refresh every 30 seconds.
Configuration
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| T_TRADING_DEFAULT_STOCK | sz000981 | Default stock code |
| T_TRADING_TOTAL_SHARES | 1200 | Total share position |
Edit scripts/config.py
class Config:
SUPPORT_LEVEL = 4.01 # Support price
RESISTANCE_LEVEL = 4.72 # Resistance price
MAX_POSITION_RATIO = 0.3 # Max 30% per trade
Mathematical Models
1. Expected Value
E(T) = p × profit - (1-p) × loss
2. Bayesian Update
p_new = α × p_recent + (1-α) × p_historical
3. Kelly Criterion
f* = (p × b - q) / b
4. Value at Risk
VaR = z × σ × position_value
File Structure
precise-t-trading/
├── SKILL.md # This file
├── _meta.json # Skill metadata
└── scripts/
├── t_trading_analysis.py # Main analysis script
├── stock_monitor.py # Automated monitoring
├── dashboard.html # Web dashboard
└── config.py # Configuration
Trading Rules
Entry Criteria
1. Expected profit E(T) > 0 2. Win rate > 50% 3. Technical score > 60/100 4. Price near support/resistancePosition Sizing
Risk Control
Exit Strategy
Example Workflows
Analyze Specific Stock
User: "分析山子高科的做T机会"
→ Run: python scripts/t_trading_analysis.py sz000981
→ Show analysis results
→ Provide trading recommendation
Set Up Monitoring
User: "帮我监控山子高科和隆基绿能"
→ Edit scripts/config.py with stock list
→ Run: python scripts/stock_monitor.py
→ Check logs for alerts
Check Dashboard
User: "打开监控面板"
→ Open: scripts/dashboard.html
→ Browser shows real-time prices
Tips for Best Results
1. Update Historical Data: Replace mock data with real T+0 records 2. Adjust Parameters: Tune α (Bayesian weight) based on performance 3. Monitor Multiple Stocks: Add more stocks to monitoring list 4. Backtest Strategy: Use historical data to validate edge 5. Paper Trade First: Test with virtual money before real trading
Troubleshooting
| Problem | Solution |
|---------|----------|
| "Data fetch failed" | Check internet connection |
| "Module not found" | Run pip install -r requirements.txt |
| "GBK encoding error" | Use UTF-8 terminal or PowerShell |
| "Permission denied" | Run as administrator on Windows |
Performance Notes
Disclaimer
⚠️ Trading involves risk. Past performance does not guarantee future results.
Version History
v1.0.0 (2026-04-03)
Author
Kemi (yang77160)
💰 Support This Project
If this skill helps you make money, consider supporting its development!
WeChat Pay / Alipay:
Your support helps me:
🤝 Community & Cross-Skill Boost
License
MIT License - Free to use, modify, and distribute.
_Happy Trading! Remember: Risk management first._ 📊
**⭐ 如果这个技能对你有帮助,请在 ClawHub 上给它点个星!
🎁 推荐奖励计划
邀请好友使用,双方都得奖励!
1. 你推荐朋友安装此 Skill 2. 朋友在 clawhub 上给你点赞/评论 3. 截图发给我(微信/邮件) 4. 你获得: - ✅ Pro 版本优先体验资格 - ✅ 1对1 量化策略咨询(30分钟) - ✅ 加入核心用户群(获取最新策略)
每推荐5人,额外获得:
📊 用户见证
> "用了一周,做T胜率从50%提升到70%,太香了!" - 张先生,上海
> "终于不用凭感觉交易了,数据说话,心里有底" - 李女士,深圳
> "VaR风控帮我躲过一次大跌,少亏2000+" - 王先生,北京
你也用得好?欢迎分享你的故事! 发邮件到 yang77160@example.com 或加微信**
⚡ When to Use
💡 Examples
1. Run T+0 Analysis
python scripts/t_trading_analysis.py sz000981
Output:
======================================================================
Precise T+0 Trading System v2.0
======================================================================【Real-time Quote】
Stock: 山子高科 (000981)
Price: 4.06 CNY
Change: -1.69%
...
【Quantitative Analysis】
Win Rate: 65.0% → 75.5% (Bayesian)
Expected Profit: +0.0481 CNY/share PASS
Kelly Position: 50.0% → Conservative 30.0%
Technical Score: 85/100
VaR(95%): 269.43 CNY
【Final Decision】
GO - Execute T+0 Trade
Action Plan:
Buy Zone: 4.01 - 4.04
Sell Zone: 4.39 - 4.72
Position: 360 shares
Expected Profit: +17.33 CNY
Stop Loss: 3.96
2. Start Price Monitoring
python scripts/stock_monitor.py
Monitors stocks every 60 minutes and logs alerts.
3. Open Web Dashboard
open scripts/dashboard.html
Real-time visualization with auto-refresh every 30 seconds.
⚙️ Configuration
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| T_TRADING_DEFAULT_STOCK | sz000981 | Default stock code |
| T_TRADING_TOTAL_SHARES | 1200 | Total share position |
Edit scripts/config.py
class Config:
SUPPORT_LEVEL = 4.01 # Support price
RESISTANCE_LEVEL = 4.72 # Resistance price
MAX_POSITION_RATIO = 0.3 # Max 30% per trade
📋 Tips & Best Practices
| Problem | Solution |
|---------|----------|
| "Data fetch failed" | Check internet connection |
| "Module not found" | Run pip install -r requirements.txt |
| "GBK encoding error" | Use UTF-8 terminal or PowerShell |
| "Permission denied" | Run as administrator on Windows |