用户要求校验"只做多T+1版本"与"多空双向版本"做多交易的买卖点一致性,发现完全不匹配(0%一致率)。根本原因是做空交易穿插改变了交易序列。
created: /root/.openclaw/workspace/cat-fly/t1_converter.py
def get_next_trading_session_open(data_df, current_time):
# 找到第一个不同于current_date的日期
for d in future_dates:
if d != current_date:
next_date = d
break
# 返回下一个交易日的开盘价
| 指标 | T0规则 | T+1规则 | 差异 |
|---|---|---|---|
| 收益率 | +15.51% | +22.53% | +7.02% |
| 总盈亏 | +155,122元 | +225,328元 | +70,206元 |
| 胜率 | 66.7% | 73.3% | +6.6% |
| T0调整笔数 | - | 5笔 | - |
在这组CYB50数据中,T+1规则反而表现更好,因为隔夜反弹挽救了几笔原本要止损的T0交易。
auto_report_long_only_t1.py 使用T+1转换后的数据cyb50_30min_long_only_t1.py