LogViewer
🚀 配置极致并行计算环境...
⚡ 配置并行计算环境...
   💻 物理CPU核心: 16
   ⚡ Polars可用核心: 16
   ✅ 最大线程数: 16
   ✅ 流式chunk: 500000
   ✅ Rayon线程: 16
🔄 正在从 OpRegistry 同步算子...
✅ 成功同步 61 个算子从 OpRegistry
🔧 正在应用增强元数据...
✅ 成功应用 61 个算子的增强元数据
done

2025-07-31 19:06:29 | INFO | feature_base:main:206 - {'action': 'start_process', 'description': '开始特征处理流程', 'time_bar': 5, 'pred_periods': 12}
2025-07-31 19:06:31 | INFO | feature_base:__init__:59 - {'action': 'init_HFDataProcessor', 'time_bar': 5}
2025-07-31 19:07:00 | INFO | stage_calcualator:add_mappings_to_df:52 - 添加映射特征: ganzhi_lookup join类型: ['date', 'hour']
2025-07-31 19:07:43 | WARNING | feature_base:check_trade_date_is_current:29 - process_feature last_trade_time 2025-07-11 15:15:00 日期不是今天(2025-07-31),可能不是最新数据
2025-07-31 19:07:44 | INFO | feature_base:__init__:59 - {'action': 'init_HFDataProcessor', 'time_bar': 5}
加载干支特征完成
添加全局映射特征
🎯 智能分层计算: 目标特征 66 个
📝 输入列: ['cate_comd', 'cate_exchange', 'cate_sector', 'close', 'comd', 'contract', 'contract_month', 'contract_multiplier', 'contract_yymm', 'date']...
📊 计算层级: 2 层
  Layer 0: 35 个特征
  Layer 1: 31 个特征
⚡ 执行 Layer 0: 35 个表达式
📝 Layer 0 表达式:
    adjclose: @in_close * @in_factor_multiply
    second: dt_second(@in_trade_time)
    adjhigh: @in_high * @in_factor_multiply
    oi_momentum_5: delta(@in_open_interest, 5)
    month: dt_month(@in_trade_time)
    day_of_month: dt_day(@in_trade_time)
    doy_cos: cos(2 * 3.14159265 * dt_dayofyear(@in_trade_time) / 365)
    adv: ts_mean(@in_volume, 20)
    oi_ratio: @in_open_interest / ts_mean(@in_open_interest, 20)
    volume_ratio: @in_volume / ts_mean(@in_volume, 20)
    doy_sin: sin(2 * 3.14159265 * dt_dayofyear(@in_trade_time) / 365)
    adjopen: @in_open * @in_factor_multiply
    woy_cos: cos(2 * 3.14159265 * dt_week(@in_trade_time) / 52)
    contract_month_sin: sin(2 * 3.14159265 * @in_contract_month / 12)
    date: dt_date(@in_trade_time)
    woy_sin: sin(2 * 3.14159265 * dt_week(@in_trade_time) / 52)
    day_of_week: dt_weekday(@in_trade_time)
    year: dt_year(@in_trade_time)
    cate_trading_session: where(@in_hour < 9, 1, where(@in_hour < 11, 2, where(@in_hour < 13, 3, where(@in_hour < 16, 4, where(@in_hour < 21, 5, 6)))))
    hour_sin: sin(2 * 3.14159265 * @in_hour / 24)
    adjvwap: @in_vwap * @in_factor_multiply
    log_return: log(@in_close * @in_factor_multiply) - log(shift(@in_close * @in_factor_multiply, 1))
    adjpre_settle: @in_pre_settle * @in_factor_multiply
    week_of_year: dt_week(@in_trade_time)
    oi_change: delta(@in_open_interest, 1)
    day_of_year: dt_dayofyear(@in_trade_time)
    adjlow: @in_low * @in_factor_multiply
    contract_month_cos: cos(2 * 3.14159265 * (@in_contract_month) / 12)
    turnover_ratio: @in_turnover / ts_mean(@in_turnover, 20)
    return: (@in_close * @in_factor_multiply) / shift(@in_close * @in_factor_multiply, 1) - 1
    quarter: dt_quarter(@in_trade_time)
    hour_cos: cos(2 * 3.14159265 * @in_hour / 24)
    vwap: (@in_close + @in_high + @in_low + @in_open )/ 4
    minute: dt_minute(@in_trade_time)
    hour: dt_hour(@in_trade_time)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 114 个节点
🚀 缓存命中!秒级返回 114 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 137 → 58 个特征
✅ Layer 0 计算完成,耗时: 13.03s
⚡ 执行 Layer 1: 31 个表达式
📝 Layer 1 表达式:
    price_change_rate_5: (@in_adjclose - shift(@in_adjclose, 5)) / shift(@in_adjclose, 5)
    volatility_5: ts_std(@in_adjclose, 5)
    adjclose_position: (@in_adjclose - @in_adjlow) / (@in_adjhigh - @in_adjlow + 0.0001)
    price_ma_short_ratio: @in_adjclose / ts_mean(@in_adjclose, 5) - 1
    basis_ratio: (@in_adjclose - @in_adjpre_settle) / @in_adjpre_settle
    bb_position: (@in_adjclose - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20))) / ((ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)) - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20)) + 0.0001)
    basis: @in_adjclose - @in_adjpre_settle
    dow_cos: cos(2 * 3.14159265 * @in_day_of_week / 7)
    dom_sin: sin(2 * 3.14159265 * @in_day_of_month / 31)
    price_position: (@in_adjclose - ts_min(@in_adjlow, 20)) / (ts_max(@in_adjhigh, 20) - ts_min(@in_adjlow, 20) + 0.0001)
    dom_cos: cos(2 * 3.14159265 * @in_day_of_month / 31)
    bb_adjlower: ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20)
    adjhigh_adjlow_ratio: (@in_adjhigh - @in_adjlow) / @in_adjclose
    volatility_20: ts_std(@in_adjclose, 20)
    price_change_rate_20: (@in_adjclose - shift(@in_adjclose, 20)) / shift(@in_adjclose, 20)
    bb_upper: ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)
    dow_sin: sin(2 * 3.14159265 * @in_day_of_week / 7)
    momentum_10: delta(@in_adjclose, 10)
    adjlow_ma_ratio: @in_adjlow / ts_mean(@in_adjlow, 20) - 1
    adjhigh_ma_ratio: @in_adjhigh / ts_mean(@in_adjhigh, 20) - 1
    momentum_5: delta(@in_adjclose, 5)
    month_sin: sin(2 * 3.14159265 * @in_month / 12)
    ma_ratio: ts_mean(@in_adjclose, 5) / ts_mean(@in_adjclose, 20) - 1
    price_ma_long_ratio: @in_adjclose / ts_mean(@in_adjclose, 20) - 1
    minute_sin: sin(2 * 3.14159265 * @in_minute / 60)
    month_cos: cos(2 * 3.14159265 * @in_month / 12)
    volatility_10: ts_std(@in_adjclose, 10)
    volume_weighted_return: (@in_adjclose / shift(@in_adjclose, 1) - 1) * @in_volume / ts_mean(@in_volume, 20)
    bb_width: (ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)) - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20))
    momentum_20: delta(@in_adjclose, 20)
    minute_cos: cos(2 * 3.14159265 * @in_minute / 60)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 111 个节点
🚀 缓存命中!秒级返回 111 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 169 → 89 个特征
✅ Layer 1 计算完成,耗时: 9.67s
✅ 智能分层计算完成: 计算了 66 个特征
🧹 最终清理: 89 → 89 列
添加全局映射特征
添加全局映射特征
🎯 智能分层计算: 目标特征 26 个
📝 输入列: ['cate_comd', 'cate_exchange', 'cate_sector', 'close', 'comd', 'contract', 'contract_month', 'contract_multiplier', 'contract_yymm', 'date']...
📊 计算层级: 4 层
  Layer 0: 21 个特征
  Layer 1: 1 个特征
  Layer 2: 1 个特征
  Layer 3: 3 个特征
⚡ 执行 Layer 0: 21 个表达式
📝 Layer 0 表达式:
    adjclose: @in_close * @in_factor_multiply
    day_of_week: dt_weekday(@in_trade_time)
    year: dt_year(@in_trade_time)
    price_diff_TQ: shift(@in_close, 3) - shift(@in_close, 12)
    second: dt_second(@in_trade_time)
    adjhigh: @in_high * @in_factor_multiply
    prev_close: shift(@in_close, 1)
    return: (@in_close * @in_factor_multiply) / shift(@in_close * @in_factor_multiply, 1) - 1
    month: dt_month(@in_trade_time)
    log_return: log(@in_close * @in_factor_multiply) - log(shift(@in_close * @in_factor_multiply, 1))
    adjvwap: @in_vwap * @in_factor_multiply
    day_of_month: dt_day(@in_trade_time)
    adjpre_settle: @in_pre_settle * @in_factor_multiply
    adjopen: @in_open * @in_factor_multiply
    vwap: (@in_close + @in_high + @in_low + @in_open )/ 4
    price_diff_TH: shift(@in_close, 6) - shift(@in_close, 12)
    minute: dt_minute(@in_trade_time)
    price_diff_ALL: @in_close - shift(@in_close, 12)
    date: dt_date(@in_trade_time)
    adjlow: @in_low * @in_factor_multiply
    hour: dt_hour(@in_trade_time)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 57 个节点
🚀 缓存命中!秒级返回 57 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 80 → 44 个特征
✅ Layer 0 计算完成,耗时: 5.17s
⚡ 执行 Layer 1: 1 个表达式
📝 Layer 1 表达式:
    tr: max(@in_high - @in_low, max(abs(@in_high - @in_prev_close), abs(@in_low - @in_prev_close)))
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 8 个节点
🚀 缓存命中!秒级返回 8 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 52 → 45 个特征
✅ Layer 1 计算完成,耗时: 0.19s
⚡ 执行 Layer 2: 1 个表达式
📝 Layer 2 表达式:
    atr_10d: ts_median(@in_tr, 120)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 3 个节点
🚀 缓存命中!秒级返回 3 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 48 → 46 个特征
✅ Layer 2 计算完成,耗时: 0.41s
⚡ 执行 Layer 3: 3 个表达式
2025-07-31 19:07:56 | WARNING | feature_base:check_trade_date_is_current:29 - process_pctchg last_trade_time 2025-07-11 15:15:00 日期不是今天(2025-07-31),可能不是最新数据
2025-07-31 19:07:57 | INFO | feature_base:__init__:59 - {'action': 'init_HFDataProcessor', 'time_bar': 5}
2025-07-31 19:08:46 | WARNING | feature_base:check_trade_date_is_current:29 - process_fee last_trade_time 2025-07-11 15:15:00 日期不是今天(2025-07-31),可能不是最新数据
2025-07-31 19:08:46 | INFO | feature_base:main:219 - {'action': 'success', 'description': 'feature_base_pltrait 完成'}
📝 Layer 3 表达式:
    ALL: clip(@in_price_diff_ALL / (shift(@in_atr_10d, 12) * 12), -1, 1)
    TH: clip(@in_price_diff_TH / (shift(@in_atr_10d, 12) * 6), -1, 1)
    TQ: clip(@in_price_diff_TQ / (shift(@in_atr_10d, 12) * 9), -1, 1)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 19 个节点
🚀 缓存命中!秒级返回 19 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 65 → 49 个特征
✅ Layer 3 计算完成,耗时: 0.82s
✅ 智能分层计算完成: 计算了 26 个特征
🧹 最终清理: 49 → 49 列
添加全局映射特征
🎯 智能分层计算: 目标特征 66 个
📝 输入列: ['bpv', 'cate_comd', 'cate_exchange', 'cate_sector', 'close', 'close_position_fee_per_hand', 'close_position_rate_amount', 'close_today_fee_per_hand', 'close_today_rate_amount', 'comd']...
📊 计算层级: 2 层
  Layer 0: 35 个特征
  Layer 1: 31 个特征
⚡ 执行 Layer 0: 35 个表达式
📝 Layer 0 表达式:
    adjclose: @in_close * @in_factor_multiply
    second: dt_second(@in_trade_time)
    adjhigh: @in_high * @in_factor_multiply
    oi_momentum_5: delta(@in_open_interest, 5)
    month: dt_month(@in_trade_time)
    day_of_month: dt_day(@in_trade_time)
    doy_cos: cos(2 * 3.14159265 * dt_dayofyear(@in_trade_time) / 365)
    adv: ts_mean(@in_volume, 20)
    oi_ratio: @in_open_interest / ts_mean(@in_open_interest, 20)
    volume_ratio: @in_volume / ts_mean(@in_volume, 20)
    doy_sin: sin(2 * 3.14159265 * dt_dayofyear(@in_trade_time) / 365)
    adjopen: @in_open * @in_factor_multiply
    woy_cos: cos(2 * 3.14159265 * dt_week(@in_trade_time) / 52)
    contract_month_sin: sin(2 * 3.14159265 * @in_contract_month / 12)
    date: dt_date(@in_trade_time)
    woy_sin: sin(2 * 3.14159265 * dt_week(@in_trade_time) / 52)
    day_of_week: dt_weekday(@in_trade_time)
    year: dt_year(@in_trade_time)
    cate_trading_session: where(@in_hour < 9, 1, where(@in_hour < 11, 2, where(@in_hour < 13, 3, where(@in_hour < 16, 4, where(@in_hour < 21, 5, 6)))))
    hour_sin: sin(2 * 3.14159265 * @in_hour / 24)
    adjvwap: @in_vwap * @in_factor_multiply
    log_return: log(@in_close * @in_factor_multiply) - log(shift(@in_close * @in_factor_multiply, 1))
    adjpre_settle: @in_pre_settle * @in_factor_multiply
    week_of_year: dt_week(@in_trade_time)
    oi_change: delta(@in_open_interest, 1)
    day_of_year: dt_dayofyear(@in_trade_time)
    adjlow: @in_low * @in_factor_multiply
    contract_month_cos: cos(2 * 3.14159265 * (@in_contract_month) / 12)
    turnover_ratio: @in_turnover / ts_mean(@in_turnover, 20)
    return: (@in_close * @in_factor_multiply) / shift(@in_close * @in_factor_multiply, 1) - 1
    quarter: dt_quarter(@in_trade_time)
    hour_cos: cos(2 * 3.14159265 * @in_hour / 24)
    vwap: (@in_close + @in_high + @in_low + @in_open )/ 4
    minute: dt_minute(@in_trade_time)
    hour: dt_hour(@in_trade_time)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 114 个节点
🚀 缓存命中!秒级返回 114 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 145 → 66 个特征
✅ Layer 0 计算完成,耗时: 10.56s
⚡ 执行 Layer 1: 31 个表达式
📝 Layer 1 表达式:
    price_change_rate_5: (@in_adjclose - shift(@in_adjclose, 5)) / shift(@in_adjclose, 5)
    volatility_5: ts_std(@in_adjclose, 5)
    adjclose_position: (@in_adjclose - @in_adjlow) / (@in_adjhigh - @in_adjlow + 0.0001)
    price_ma_short_ratio: @in_adjclose / ts_mean(@in_adjclose, 5) - 1
    basis_ratio: (@in_adjclose - @in_adjpre_settle) / @in_adjpre_settle
    bb_position: (@in_adjclose - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20))) / ((ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)) - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20)) + 0.0001)
    basis: @in_adjclose - @in_adjpre_settle
    dow_cos: cos(2 * 3.14159265 * @in_day_of_week / 7)
    dom_sin: sin(2 * 3.14159265 * @in_day_of_month / 31)
    price_position: (@in_adjclose - ts_min(@in_adjlow, 20)) / (ts_max(@in_adjhigh, 20) - ts_min(@in_adjlow, 20) + 0.0001)
    dom_cos: cos(2 * 3.14159265 * @in_day_of_month / 31)
    bb_adjlower: ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20)
    adjhigh_adjlow_ratio: (@in_adjhigh - @in_adjlow) / @in_adjclose
    volatility_20: ts_std(@in_adjclose, 20)
    price_change_rate_20: (@in_adjclose - shift(@in_adjclose, 20)) / shift(@in_adjclose, 20)
    bb_upper: ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)
    dow_sin: sin(2 * 3.14159265 * @in_day_of_week / 7)
    momentum_10: delta(@in_adjclose, 10)
    adjlow_ma_ratio: @in_adjlow / ts_mean(@in_adjlow, 20) - 1
    adjhigh_ma_ratio: @in_adjhigh / ts_mean(@in_adjhigh, 20) - 1
    momentum_5: delta(@in_adjclose, 5)
    month_sin: sin(2 * 3.14159265 * @in_month / 12)
    ma_ratio: ts_mean(@in_adjclose, 5) / ts_mean(@in_adjclose, 20) - 1
    price_ma_long_ratio: @in_adjclose / ts_mean(@in_adjclose, 20) - 1
    minute_sin: sin(2 * 3.14159265 * @in_minute / 60)
    month_cos: cos(2 * 3.14159265 * @in_month / 12)
    volatility_10: ts_std(@in_adjclose, 10)
    volume_weighted_return: (@in_adjclose / shift(@in_adjclose, 1) - 1) * @in_volume / ts_mean(@in_volume, 20)
    bb_width: (ts_mean(@in_adjclose, 20) + 2 * ts_std(@in_adjclose, 20)) - (ts_mean(@in_adjclose, 20) - 2 * ts_std(@in_adjclose, 20))
    momentum_20: delta(@in_adjclose, 20)
    minute_cos: cos(2 * 3.14159265 * @in_minute / 60)
🏗️ 构建计算图...
🗂️ Graph缓存目录: cache/graphs
🔍 检查表达式缓存...
⚡ 正在从缓存加载Graph...
✅ 从缓存成功加载: 111 个节点
🚀 缓存命中!秒级返回 111 个节点
✅ 计算图构建完成,开始执行计算...
🧹 智能清理: 177 → 97 个特征
✅ Layer 1 计算完成,耗时: 8.69s
✅ 智能分层计算完成: 计算了 66 个特征
🧹 最终清理: 97 → 97 列