FeatureDef(1,"ret_1m_bps","最近1分钟收益","Latest short return.",("replay_1m",),"close_t / close_t-1m - 1","1m","bps","float32","WARMUP",True,"uses <= t close only",ALL_MODELS),
FeatureDef(2,"ret_5m_bps","最近5分钟收益","Short trend.",("replay_1m",),"close_t / close_t-5m - 1","5m","bps","float32","WARMUP",True,"uses <= t close only",("Direction","Entry","Continue","Exit")),
FeatureDef(3,"ret_15m_bps","最近15分钟收益","Near trend.",("replay_1m",),"close_t / close_t-15m - 1","15m","bps","float32","WARMUP",True,"uses <= t close only",("Direction","Entry","Continue","Exit")),
FeatureDef(4,"ret_60m_bps","最近60分钟收益","Baseline trend.",("replay_1m",),"close_t / close_t-60m - 1","60m","bps","float32","WARMUP",True,"uses <= t close only",("Direction","Continue","Exit","Risk")),
FeatureDef(5,"ret_240m_bps","最近240分钟收益","Four-hour trend.",("replay_1m",),"close_t / close_t-240m - 1","240m","bps","float32","WARMUP",True,"uses <= t close only",("Direction","Continue","Risk")),
FeatureDef(6,"realized_vol_15m_bps","15分钟波动","Near realized volatility.",("replay_1m",),"std(log_return_1m, 15) * 10000","15m","bps","float32","WARMUP",True,"uses <= t returns only",("Direction","Entry","Exit","Risk")),
FeatureDef(7,"realized_vol_60m_bps","60分钟波动","Baseline realized volatility.",("replay_1m",),"std(log_return_1m, 60) * 10000","60m","bps","float32","WARMUP",True,"uses <= t returns only",("Direction","Entry","Exit","Risk")),
FeatureDef(8,"vol_ratio_15m_60m","近端波动放大","Near volatility versus baseline.",("feature",),"realized_vol_15m_bps / max(realized_vol_60m_bps, 1)","15m/60m","ratio","float32","WARMUP",True,"derived from <= t features",("Entry","Exit","Risk")),
FeatureDef(20,"compression_score_4h_pct","4小时压缩分位","Higher means recent range is compressed.",("feature",),"1 - percentile_rank(range_15m_bps over 240m)","240m","pct","float32","WARMUP",True,"rolling rank uses <= t",("Direction","Entry")),
FeatureDef(21,"compression_release_15m_bps","压缩释放幅度","Range release versus 4h median.",("feature",),"max(0, range_15m_bps - median(range_15m_bps over 240m))","15m/240m","bps","float32","WARMUP",True,"rolling median uses <= t",("Direction","Entry","Risk")),
FeatureDef(27,"spread_rank_24h_pct","24小时价差分位","Spread congestion rank.",("feature",),"percentile_rank(spread_bps over 24h)","24h","pct","float32","WARMUP",True,"rolling rank uses <= t",("Entry","Exit","Risk")),
FeatureDef(28,"oi_delta_15m_bps","15分钟持仓变化","Open-interest short change.",("open_interest","replay_1m"),"open_interest_t / open_interest_t-15m - 1","15m","bps","float32","WARMUP",True,"uses <= t OI only",("Direction","Continue","Risk")),
FeatureDef(29,"oi_delta_60m_bps","60分钟持仓变化","Open-interest baseline change.",("open_interest","replay_1m"),"open_interest_t / open_interest_t-60m - 1","60m","bps","float32","WARMUP",True,"uses <= t OI only",("Direction","Continue","Risk")),
FeatureDef(36,"liquidation_available","爆仓数据可用","Whether liquidation data exists.",("liquidations","replay_1m"),"day partition exists","day","0/1","float32","never null",True,"partition availability known by event day",("Entry","Exit","Risk")),
FeatureDef(37,"minute_of_day_sin","日内时间正弦","Time of day cyclic feature.",("event_time",),"sin(2*pi*minute_of_day/1440)","event_time","ratio","float32","never null",True,"event timestamp only",("Direction","Entry","Risk")),
FeatureDef(38,"minute_of_day_cos","日内时间余弦","Time of day cyclic feature.",("event_time",),"cos(2*pi*minute_of_day/1440)","event_time","ratio","float32","never null",True,"event timestamp only",("Direction","Entry","Risk")),
FeatureDef(39,"minutes_to_next_funding","距离下次资金费分钟","Minutes to next funding settlement.",("funding","replay_1m"),"clip((next_funding_time - event_time) / 60000, 0, 480)","as-of","minute","float32","as-of > 12h -> fail",True,"backward as-of only",("Entry","Continue","Risk")),
FeatureDef(40,"book_top_imbalance","盘口一档强弱","Top bid/ask size imbalance.",("book",),"(bid_0_size - ask_0_size) / max(bid_0_size + ask_0_size, eps)","last book snapshot in 1m","ratio","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Direction","Entry","Risk")),
FeatureDef(41,"book_microprice_basis_bps","微价格偏离","Microprice distance from mid price.",("book",),"((bid_0_price * ask_0_size + ask_0_price * bid_0_size) / max(bid_0_size + ask_0_size, eps) / mid - 1) * 10000","last book snapshot in 1m","bps","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Direction","Entry","Risk")),
FeatureDef(42,"book_bid_depth_l5_quote","前5档买盘深度","Bid notional in levels 0..4.",("book",),"sum(bid_i_price * bid_i_size, i=0..4)","last book snapshot in 1m","quote","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Entry","Risk")),
FeatureDef(43,"book_ask_depth_l5_quote","前5档卖盘深度","Ask notional in levels 0..4.",("book",),"sum(ask_i_price * ask_i_size, i=0..4)","last book snapshot in 1m","quote","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Entry","Risk")),
FeatureDef(44,"book_depth_imbalance_l5","前5档盘口深度差","Bid/ask notional imbalance in levels 0..4.",("book",),"(bid_depth_l5 - ask_depth_l5) / max(bid_depth_l5 + ask_depth_l5, eps)","last book snapshot in 1m","ratio","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Direction","Entry","Risk")),
FeatureDef(45,"book_depth_imbalance_l20","前20档盘口深度差","Bid/ask notional imbalance in levels 0..19.",("book",),"(bid_depth_l20 - ask_depth_l20) / max(bid_depth_l20 + ask_depth_l20, eps)","last book snapshot in 1m","ratio","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Direction","Entry","Risk")),
FeatureDef(46,"book_depth_concentration_l5_l20","前5档深度集中度","How much total book notional is concentrated in top five levels.",("book",),"(bid_depth_l5 + ask_depth_l5) / max(bid_depth_l20 + ask_depth_l20, eps)","last book snapshot in 1m","ratio","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Entry","Risk")),
FeatureDef(47,"book_pressure_spread_ratio","盘口压力相对价差","Microprice pressure normalized by current spread.",("book","level_1"),"book_microprice_basis_bps / max(abs(spread_bps), 0.01)","1m","ratio","float32","missing dependency -> WARMUP",True,"uses <= t book and spread only",("Direction","Entry","Risk")),
FeatureDef(48,"book_pressure_taker_1m","盘口压力和1分钟主动成交共振","Microprice pressure confirmed by current taker imbalance.",("book","trades"),"book_microprice_basis_bps * taker_imbalance_1m","1m","bps","float32","missing dependency -> WARMUP",True,"uses <= t book and trades only",("Direction","Entry")),
FeatureDef(49,"book_pressure_taker_5m","盘口压力和5分钟主动成交共振","Microprice pressure confirmed by short taker imbalance.",("book","trades"),"book_microprice_basis_bps * taker_imbalance_5m","5m","bps","float32","missing dependency -> WARMUP",True,"uses <= t book and trades only",("Direction","Entry")),
FeatureDef(50,"book_l20_imbalance_taker_15m","20档深度和15分钟主动成交共振","Deep book imbalance confirmed by near taker flow.",("book","trades"),"book_depth_imbalance_l20 * taker_imbalance_15m","15m","ratio","float32","missing dependency -> WARMUP",True,"uses <= t book and trades only",("Direction","Entry")),
FeatureDef(51,"book_l20_imbalance_ret_15m","20档深度和15分钟走势关系","Deep book pressure interacting with near return.",("book","replay_1m"),"book_depth_imbalance_l20 * ret_15m_bps","15m","bps","float32","missing dependency -> WARMUP",True,"uses <= t book and returns only",("Direction","Entry")),
FeatureDef(52,"book_pressure_vol_adjusted","波动调整后的盘口压力","Microprice pressure divided by near realized volatility.",("book","replay_1m"),"book_microprice_basis_bps / max(realized_vol_15m_bps, 1)","15m","ratio","float32","missing dependency -> WARMUP",True,"uses <= t book and volatility only",("Direction","Entry","Risk")),
FeatureDef(53,"book_depth_pressure_gap","近档和深档压力差","Top five depth imbalance minus top twenty depth imbalance.",("book",),"book_depth_imbalance_l5 - book_depth_imbalance_l20","last book snapshot in 1m","ratio","float32","missing book -> WARMUP",True,"uses last book snapshot within current closed minute only",("Entry","Risk")),
FeatureDef(54,"book_pressure_reversal_15m","盘口压力和15分钟反转关系","Positive when book pressure leans against the recent move.",("book","replay_1m"),"-book_microprice_basis_bps * ret_15m_bps","15m","bps^2","float32","missing dependency -> WARMUP",True,"uses <= t book and returns only",("Direction","Entry")),