Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
875222a85a |
+9
-9
@@ -1,14 +1,15 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# EXP 15 - Strategy A (baseline): parallel reference model + TopkDropout.
|
||||
# EXP 14 - Strategy A (baseline): reference model + TopkDropout.
|
||||
#
|
||||
# Model = RankICEnsembleLGBModel with PARALLEL=5 (thread-pool seed training,
|
||||
# rank_ensemble.py) - the speedup means the 5-seed 3000-round ensemble trains in
|
||||
# ~1/5th the wall time of the serial reference. Strategy = TopkDropout topk=10
|
||||
# n_drop=2 risk_degree=0.95 (the reference's recorded strategy).
|
||||
# Model = RankICEnsembleLGBModel (5-seed RankIC-early-stopped LGB), the class
|
||||
# wired by the tac-rd-rank-ensemble-isolated reference (run 0cea66d9...).
|
||||
# Strategy = TopkDropout topk=10 n_drop=2 risk_degree=0.95 (the reference's own
|
||||
# recorded backtest strategy), so this run reproduces the reference baseline on
|
||||
# the same 50-ETF SP-5d panel.
|
||||
#
|
||||
# Run:
|
||||
# rd_run_workflow config_path=experiments/workflows/exp15-kelly-size/a_topk_baseline.yaml \
|
||||
# experiment_name=tac-rd-kelly-size
|
||||
# rd_run_workflow config_path=experiments/workflows/exp14-optstop-v2/a_topk_baseline.yaml \
|
||||
# experiment_name=tac-rd-optstop-v2
|
||||
# -----------------------------------------------------------------------------
|
||||
{%- set LAKE = TAC_LAKE_DIR %}
|
||||
{%- set UNIVERSE = "SPY,QQQ,DIA,IWM,MDY,VTI,VOO,VEA,VWO,VT,EFA,EEM,TLT,IEF,SHY,AGG,BND,LQD,HYG,JNK,EMB,GLD,SLV,USO,UNG,DBA,DBC,XLK,XLF,XLE,XLV,XLI,XLY,XLP,XLU,XLB,XLRE,ARKK,SMH,SOXX,IBB,XBI,ITA,XAR,ICLN,TAN,FDN,IGV,ESPO,REM" %}
|
||||
@@ -42,7 +43,7 @@ qlib_init:
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs:
|
||||
uri: "sqlite:///{{ LAKE }}/mlruns.db"
|
||||
default_exp_name: "tac-rd-kelly-size"
|
||||
default_exp_name: "tac-rd-optstop-v2"
|
||||
|
||||
task:
|
||||
model:
|
||||
@@ -63,7 +64,6 @@ task:
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
parallel: 5
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
+25
-20
@@ -1,18 +1,21 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# EXP 15 - Strategy B: parallel reference model + KellyWeightStrategy.
|
||||
# EXP 14 - Strategy B (enhanced): reference model + OptimalStopControlV2.
|
||||
#
|
||||
# Model = RankICEnsembleLGBModel PARALLEL=5 (same as A). Strategy =
|
||||
# KellyWeightStrategy (tac_qlib.contrib.strategy.kelly_weight): applies the
|
||||
# Kelly criterion to position SIZING -
|
||||
# f* = kelly_fraction * mu_i / var_i (Gaussian Kelly, mu_i > 0)
|
||||
# with per-name mu/var estimated from the rolling signal history (no
|
||||
# lookahead), floored/capped and normalized to the risk_degree leverage budget.
|
||||
# This is the piece the reference's equal-weight TopkDropout never tunes: it
|
||||
# weights names by edge/risk instead of equal-weight top-k.
|
||||
# Model = RankICEnsembleLGBModel (5-seed RankIC-early-stopped LGB), identical to
|
||||
# Strategy A. Strategy = OptimalStopControlV2 (tac_qlib.contrib.strategy.
|
||||
# optimal_stop_v2) with the controls that address OptimalStopControl's documented
|
||||
# weaknesses:
|
||||
# - turnover / cost control: rebalance_band=0.05 (skip small rebalances),
|
||||
# cooldown_days=3 (no whipsaw re-entries), max_turnover=0.30 (cap daily
|
||||
# traded notional, priority exits > opens > rebalances)
|
||||
# - robust thresholds (no valid-window overfit): entry 0.85 / exit 0.70 /
|
||||
# max_hold 10 / min_hold 2 / sl -0.08
|
||||
# Sizing = equal-weight control (risk_degree fraction of total value split
|
||||
# across targets) - the "proper allocation" that replaces cash-heuristic sizing.
|
||||
#
|
||||
# Run:
|
||||
# rd_run_workflow config_path=experiments/workflows/exp15-kelly-size/b_kelly_weight.yaml \
|
||||
# experiment_name=tac-rd-kelly-size
|
||||
# rd_run_workflow config_path=experiments/workflows/exp14-optstop-v2/b_optstop_v2.yaml \
|
||||
# experiment_name=tac-rd-optstop-v2
|
||||
# -----------------------------------------------------------------------------
|
||||
{%- set LAKE = TAC_LAKE_DIR %}
|
||||
{%- set UNIVERSE = "SPY,QQQ,DIA,IWM,MDY,VTI,VOO,VEA,VWO,VT,EFA,EEM,TLT,IEF,SHY,AGG,BND,LQD,HYG,JNK,EMB,GLD,SLV,USO,UNG,DBA,DBC,XLK,XLF,XLE,XLV,XLI,XLY,XLP,XLU,XLB,XLRE,ARKK,SMH,SOXX,IBB,XBI,ITA,XAR,ICLN,TAN,FDN,IGV,ESPO,REM" %}
|
||||
@@ -46,7 +49,7 @@ qlib_init:
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs:
|
||||
uri: "sqlite:///{{ LAKE }}/mlruns.db"
|
||||
default_exp_name: "tac-rd-kelly-size"
|
||||
default_exp_name: "tac-rd-optstop-v2"
|
||||
|
||||
task:
|
||||
model:
|
||||
@@ -67,7 +70,6 @@ task:
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
parallel: 5
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
@@ -117,17 +119,20 @@ task:
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: KellyWeightStrategy
|
||||
module_path: tac_qlib.contrib.strategy.kelly_weight
|
||||
class: OptimalStopControlV2
|
||||
module_path: tac_qlib.contrib.strategy.optimal_stop_v2
|
||||
kwargs:
|
||||
signal: "<PRED>"
|
||||
topk: 10
|
||||
lookback: 20
|
||||
min_obs: 10
|
||||
kelly_fraction: 0.5
|
||||
max_weight: 0.15
|
||||
min_weight: 0.0
|
||||
entry_pct: 0.85
|
||||
exit_pct: 0.70
|
||||
max_hold_days: 10
|
||||
min_hold_days: 2
|
||||
sl: -0.08
|
||||
risk_degree: 0.95
|
||||
notional: 20000
|
||||
rebalance_band: 0.05
|
||||
cooldown_days: 3
|
||||
max_turnover: 0.30
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
Reference in New Issue
Block a user