diff --git a/rotation/simple_rotation.py b/rotation/simple_rotation.py index d495cad..94157be 100644 --- a/rotation/simple_rotation.py +++ b/rotation/simple_rotation.py @@ -1327,7 +1327,7 @@ class SimpleRotationStrategy: rank_map = {c: i + 1 for i, c in enumerate(ranked_all)} col_labels = ["排名", "标的名称", "市场", "指数代码", "ETF代码", "仓位", "得分", - "指数最新价", "ETF收盘价", "溢价率", "状态", "持有天数", "盈亏"] + "指数最新价", "ETF收盘价", "溢价率", "状态", "进场日期", "持有天数", "盈亏"] table_data = [] row_actions = [] # track action for coloring @@ -1339,13 +1339,14 @@ class SimpleRotationStrategy: idx_s = f"{p['idx_close']:.2f}" if p['idx_close'] is not None else "—" etf_s = f"{p['etf_close']:.3f}" if p['etf_close'] is not None else "—" prem_s = f"{p['premium']:+.2%}" if p['premium'] is not None else "—" + entry_date_s = p['entry_date'].strftime('%Y-%m-%d') if p['entry_date'] else "—" days_s = str(p['holding_days']) if p['holding_days'] > 0 else "—" pnl_s = f"{p['pnl']:+.2%}" if p['pnl'] is not None else "—" weight_s = f"{p['weight']:.0%}" if p['weight'] > 0 else "—" market = code_config.get(p['code'], {}).get('market', '—') table_data.append([ rank, p['name'], market, p['code'], p['etf'], weight_s, - score_s, idx_s, etf_s, prem_s, p['action'], days_s, pnl_s + score_s, idx_s, etf_s, prem_s, p['action'], entry_date_s, days_s, pnl_s ]) row_actions.append(p['action'])