Python 调用文件(自上而下,无算法逻辑)
import rust_pyfunc as rp
import design_whatever as dw
names = rp.py_peaks_names() # 997 个因子名(Rust 单源)
rp.run_factor_pipeline_cross_section( # ① 读→算→写备份(全 Rust)
pipeline="peaks", tasks=tasks, n_jobs=400,
expected_result_length=997, update_mode=..., store_dir=store,
store_factor_names=names, trading_days=list(rp.td.trading_days))
params = rp.peaks_regime_fit(store) # ③ 滚动重估(全 Rust)
rp.peaks_compose(store, out_store, arm="B", params=params) # ④ 组合→写备份(全 Rust)
dw.tail_pipeline_engine(out_store, names=names[:983], ...) # 回测(排除状态标量列)