Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08b450390d | ||
|
|
b6e21c0865 | ||
|
|
51bbc9c65b | ||
|
|
66cf0a149f | ||
|
|
6a1b05db2e | ||
|
|
c7fc73180c | ||
|
|
483a86e47f | ||
|
|
e660b4f2dd | ||
|
|
4e1debccba | ||
|
|
cb18467a6d | ||
|
|
894ac260a6 | ||
|
|
c455000a1e | ||
|
|
5c7b2265f4 | ||
|
|
c724682f3a | ||
|
|
59e733d88d | ||
|
|
1fcadbfe86 | ||
|
|
a718424340 | ||
|
|
adf0bfa812 | ||
|
|
b5054ccc25 | ||
|
|
3d845306fe | ||
|
|
1075525d6e | ||
|
|
63c1ea763e | ||
|
|
2c2684b103 |
+1
-1
@@ -1,5 +1,5 @@
|
||||
# TradeAC custom-qlib-code snapshot (auto-generated)
|
||||
# parent repo HEAD : 507846cee16eeee11daf33c4176e8aec79b985b2
|
||||
# parent repo HEAD : b6e21c086500c8a9271d6fc9171fd9cc48b94af2
|
||||
# tac-qlib/tac_qlib/contrib
|
||||
# tac-qlib/tac_qlib/data
|
||||
# per-file hashes (git hash-object):
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Q08 — Risk-limit A/B re-validation (trace 40)
|
||||
|
||||
**Status:** DONE (verdict: REFUTED as an IR edge; safety-net value retained)
|
||||
|
||||
## Input
|
||||
- Reference signal: exp-26 pred, run `21afc6afdb674a399b59dd76c97628ce` (mlflow exp 25)
|
||||
- Window: 2026-01-04 → 2026-08-10, Topk10 n_drop1, SPY benchmark, $1M, 5/15bp/$5
|
||||
- Tool: `rd_risk_calibrate` (A/B + sensitivity grid). Full JSON: `risk_calibration.json`
|
||||
|
||||
## Candidate spec (round-3 live spec)
|
||||
`{"liquidity_floor_adv": 5000000, "size_cap_pct": 0.12, "concentration_cap_pct": 0.95, "drawdown_pause_pct": 0.10}`
|
||||
|
||||
## Results (net, with cost)
|
||||
| Config | IR | Ann. return | Max DD |
|
||||
|---|---|---|---|
|
||||
| baseline (no limits) | 1.5804 | +27.50% | −6.91% |
|
||||
| **candidate (5M floor + caps)** | **1.5121** | +2.20% | **−0.65%** |
|
||||
| liquidity $10M | 1.5457 | +2.25% | −0.64% |
|
||||
|
||||
## Findings
|
||||
- **Floor binds, not a no-op**: $5M liquidity floor dropped 8 symbols —
|
||||
`DBA, DBC, ESPO, FDN, REM, TAN, UNG, XAR`.
|
||||
- **No IR edge from the gate**: candidate IR (1.512) is BELOW baseline (1.580).
|
||||
The exp-18 direction (floor IR 0.81→0.98) does NOT reproduce on the clean-lake
|
||||
reference signal.
|
||||
- **Drawdown cut is pure defunding**: size_cap 0.12 × concentration 0.95 fold
|
||||
the effective risk_degree to ~0.0095 → ~$9.5k deployed of $1M (~100x less).
|
||||
Sensitivity grid shows both caps are no-ops (conc 20–50% identical,
|
||||
size_cap 5–20% identical); only the liquidity floor moves returns, marginally.
|
||||
- **Conclusion**: keep the live spec as a safety net; there is no risk-limit
|
||||
gate IR edge to harvest when the signal is the bottleneck (exp-20 pattern).
|
||||
|
||||
## Artifacts on this branch
|
||||
- `evidence/q08-risklimit/risk_calibration.json` — full calibration dump
|
||||
- `queue/designs/q08_risk_limit_ab.md` — the pre-registered design doc
|
||||
@@ -1,401 +0,0 @@
|
||||
{
|
||||
"rows": [
|
||||
{
|
||||
"label": "baseline (no limits)",
|
||||
"mean": 0.001155,
|
||||
"std": 0.011279,
|
||||
"annualized_return": 0.274989,
|
||||
"information_ratio": 1.580427,
|
||||
"max_drawdown": -0.069145
|
||||
},
|
||||
{
|
||||
"label": "liquidity $10,000,000",
|
||||
"mean": 9.4e-05,
|
||||
"std": 0.000942,
|
||||
"annualized_return": 0.022464,
|
||||
"information_ratio": 1.545736,
|
||||
"max_drawdown": -0.006389
|
||||
},
|
||||
{
|
||||
"label": "conc 20%",
|
||||
"mean": 0.000115,
|
||||
"std": 0.001168,
|
||||
"annualized_return": 0.027285,
|
||||
"information_ratio": 1.513718,
|
||||
"max_drawdown": -0.008104
|
||||
},
|
||||
{
|
||||
"label": "conc 30%",
|
||||
"mean": 0.000115,
|
||||
"std": 0.001168,
|
||||
"annualized_return": 0.027285,
|
||||
"information_ratio": 1.513718,
|
||||
"max_drawdown": -0.008104
|
||||
},
|
||||
{
|
||||
"label": "conc 40%",
|
||||
"mean": 0.000115,
|
||||
"std": 0.001168,
|
||||
"annualized_return": 0.027285,
|
||||
"information_ratio": 1.513718,
|
||||
"max_drawdown": -0.008104
|
||||
},
|
||||
{
|
||||
"label": "conc 50%",
|
||||
"mean": 0.000115,
|
||||
"std": 0.001168,
|
||||
"annualized_return": 0.027285,
|
||||
"information_ratio": 1.513718,
|
||||
"max_drawdown": -0.008104
|
||||
},
|
||||
{
|
||||
"label": "candidate {\"liquidity_floor_adv\": 5000000.0, \"size_cap_pct\": 0.12, \"concentration_cap_pct\": 0.95, \"drawdown_pause_pct\": 0.1}",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "size_cap 5%",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "size_cap 10%",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "size_cap 15%",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "size_cap 20%",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "liquidity $5,000,000",
|
||||
"mean": 9.2e-05,
|
||||
"std": 0.000943,
|
||||
"annualized_return": 0.021991,
|
||||
"information_ratio": 1.512051,
|
||||
"max_drawdown": -0.00653
|
||||
},
|
||||
{
|
||||
"label": "liquidity $1,000,000",
|
||||
"mean": 9.1e-05,
|
||||
"std": 0.000929,
|
||||
"annualized_return": 0.021625,
|
||||
"information_ratio": 1.508748,
|
||||
"max_drawdown": -0.006376
|
||||
},
|
||||
{
|
||||
"label": "liquidity $2,500,000",
|
||||
"mean": 7.1e-05,
|
||||
"std": 0.000918,
|
||||
"annualized_return": 0.017,
|
||||
"information_ratio": 1.199721,
|
||||
"max_drawdown": -0.007158
|
||||
}
|
||||
],
|
||||
"runs": {
|
||||
"baseline": {
|
||||
"risk": {
|
||||
"mean": 0.0011554172081987572,
|
||||
"std": 0.01127853762493476,
|
||||
"annualized_return": 0.27498929555130425,
|
||||
"information_ratio": 1.5804272791471323,
|
||||
"max_drawdown": -0.06914515336341577
|
||||
},
|
||||
"applied": {}
|
||||
},
|
||||
"candidate": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"size_cap 5%": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"size_cap 10%": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"size_cap 15%": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"size_cap 20%": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"conc 20%": {
|
||||
"risk": {
|
||||
"mean": 0.00011464156491316718,
|
||||
"std": 0.0011683839517000441,
|
||||
"annualized_return": 0.027284692449333788,
|
||||
"information_ratio": 1.5137180903503433,
|
||||
"max_drawdown": -0.008103887185240407
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"conc 30%": {
|
||||
"risk": {
|
||||
"mean": 0.00011464156491316718,
|
||||
"std": 0.0011683839517000441,
|
||||
"annualized_return": 0.027284692449333788,
|
||||
"information_ratio": 1.5137180903503433,
|
||||
"max_drawdown": -0.008103887185240407
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"conc 40%": {
|
||||
"risk": {
|
||||
"mean": 0.00011464156491316718,
|
||||
"std": 0.0011683839517000441,
|
||||
"annualized_return": 0.027284692449333788,
|
||||
"information_ratio": 1.5137180903503433,
|
||||
"max_drawdown": -0.008103887185240407
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"conc 50%": {
|
||||
"risk": {
|
||||
"mean": 0.00011464156491316718,
|
||||
"std": 0.0011683839517000441,
|
||||
"annualized_return": 0.027284692449333788,
|
||||
"information_ratio": 1.5137180903503433,
|
||||
"max_drawdown": -0.008103887185240407
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"liquidity $1,000,000": {
|
||||
"risk": {
|
||||
"mean": 9.086210454881382e-05,
|
||||
"std": 0.0009290831160004576,
|
||||
"annualized_return": 0.021625180882617688,
|
||||
"information_ratio": 1.508747982736451,
|
||||
"max_drawdown": -0.006376134679664126
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"ESPO"
|
||||
]
|
||||
}
|
||||
},
|
||||
"liquidity $2,500,000": {
|
||||
"risk": {
|
||||
"mean": 7.142665167642606e-05,
|
||||
"std": 0.0009184775632266332,
|
||||
"annualized_return": 0.016999543098989402,
|
||||
"information_ratio": 1.1997208834083914,
|
||||
"max_drawdown": -0.0071582979845040825
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"REM",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"liquidity $5,000,000": {
|
||||
"risk": {
|
||||
"mean": 9.239707947451976e-05,
|
||||
"std": 0.0009427144352738658,
|
||||
"annualized_return": 0.0219905049149357,
|
||||
"information_ratio": 1.5120514373488407,
|
||||
"max_drawdown": -0.006530482262119444
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"REM",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
},
|
||||
"liquidity $10,000,000": {
|
||||
"risk": {
|
||||
"mean": 9.438545151345752e-05,
|
||||
"std": 0.0009420158170657147,
|
||||
"annualized_return": 0.02246373746020289,
|
||||
"information_ratio": 1.5457360696934006,
|
||||
"max_drawdown": -0.006388809561209335
|
||||
},
|
||||
"applied": {
|
||||
"dropped_liquidity": [
|
||||
"DBA",
|
||||
"DBC",
|
||||
"ESPO",
|
||||
"FDN",
|
||||
"ICLN",
|
||||
"ITA",
|
||||
"MDY",
|
||||
"REM",
|
||||
"SHY",
|
||||
"TAN",
|
||||
"UNG",
|
||||
"XAR"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"candidate": {
|
||||
"liquidity_floor_adv": 5000000.0,
|
||||
"size_cap_pct": 0.12,
|
||||
"concentration_cap_pct": 0.95,
|
||||
"drawdown_pause_pct": 0.1
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
# QUEUE-08 — Risk-limit A/B re-validation: $5M liquidity floor on the exp-26 reference
|
||||
|
||||
**Status:** QUEUED · **Priority:** P1 · **Effort:** tool-only (no new code)
|
||||
|
||||
## Hypothesis (prove)
|
||||
The $5M liquidity floor improves net IR and cuts drawdown on the **post-reset**
|
||||
reference signal (pre-reset exp 18, EVIDENCE#008: net IR 0.81→0.98, cumDD
|
||||
7.93%→5.44%), while size/concentration caps hurt by cutting deployed capital.
|
||||
Needs re-validation on the exp-26 lineage because exp 18 is pre-clean-lake and
|
||||
not comparable (EVIDENCE#009/010). Source: `book/CLAIMS.md` open question +
|
||||
`book/README.md` `TODO(evidence-needed: reconciliation of exp 18 risk-limit spec
|
||||
on the post-reset reference signal)`.
|
||||
|
||||
## Change vs exp-26 reference (ONE variable)
|
||||
- Reference: the saved exp-26 prediction (run `21afc6af…`, mlflow exp 25).
|
||||
- A/B via `rd_risk_calibrate` (runs limit-vs-no-limit A/B + sensitivity grid
|
||||
over size_cap_pct, concentration_cap_pct, liquidity_floor_adv) and/or
|
||||
`rd_backtest` with `risk_limits` on the SAME saved `pred.pkl`:
|
||||
- baseline: no limits (this must reproduce the exp-26 net +2.13% / IR 0.21);
|
||||
- candidate: `{"liquidity_floor_adv": 5000000, "size_cap_pct": 0.12,
|
||||
"concentration_cap_pct": 0.95, "drawdown_pause_pct": 0.10}` (round-3 spec).
|
||||
- Pick the spec (B2 calibration) that keeps live ≈ backtest.
|
||||
|
||||
## Acceptance
|
||||
- Candidate spec: `net_IR > 0.21` AND `net_max_drawdown < 7.69%` vs no-limit on
|
||||
the same pred. Size/concentration caps expected to REDUCE deployed capital
|
||||
(record the direction as confirmation of exp 18).
|
||||
- If the floor is a no-op (gates don't bind at this signal) → report that gates
|
||||
are no-ops when the signal is the bottleneck (exp 20 pattern) as a PROVEN
|
||||
clean-lake result.
|
||||
|
||||
## Execution prerequisites
|
||||
- None (uses saved pred + `rd_risk_calibrate`/`rd_backtest`). Trace the A/B as
|
||||
an experiment; record the spec chosen for the next live round.
|
||||
+16
-17
@@ -1,23 +1,22 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# EXP 18 - Risk-limit control: reference model + TopkDropout baseline (A).
|
||||
# QUEUE-01 — M2 reproduction: risk-adjusted 22d Sharpe drift (sp_sharpe_22).
|
||||
#
|
||||
# Signal/model identical to the reference (tac-rd-rank-ensemble-isolated,
|
||||
# run 0cea66d9...): RankICEnsembleLGBModel (parallel, 5 seeds) on the 50-ETF
|
||||
# SP-5d panel, test 2026-01-04..2026-08-10. This workflow reproduces the
|
||||
# unconstrained TopkDropout baseline net-of-cost so the risk-limited variant
|
||||
# (same pred, liquidity/size/concentration caps) can be compared 1:1.
|
||||
# Hypothesis (book ch.01/ch.07, EVIDENCE#018 -> exp 30): adding the
|
||||
# risk-adjusted 22d Sharpe drift feature (sp_sharpe_22) to the compact
|
||||
# stochastic reference IMPROVES net portfolio performance (exp 30: net +6.53%
|
||||
# IR 0.62 vs reference +2.13% IR 0.21) while rank metrics dip (RankIC 0.0576 vs
|
||||
# 0.0663). exp 30 is a SINGLE clean-lake run, unreproduced -> HYPOTHESIS.
|
||||
#
|
||||
# The risk_limits spec itself is applied via rd_backtest / rd_strategy_targets
|
||||
# (tool-level param, not a YAML key); this run records the unconstrained
|
||||
# baseline that the limit A/B is measured against.
|
||||
# Change vs exp-26 reference (EVIDENCE#015, run 21afc6af...): ONE feature added,
|
||||
# feature_fields = compact set + sp_sharpe_22. Everything else byte-identical.
|
||||
#
|
||||
# Run:
|
||||
# rd_run_workflow config_path=experiments/workflows/exp18-risk-limit/a_baseline.yaml \
|
||||
# experiment_name=tac-rd-risk-limit
|
||||
# Acceptance: net_ann_return > +2.13% AND net_IR > 0.21 (else HYPOTHESIS -> REFUTED).
|
||||
# Run: rd_run_workflow config_path=<repo>/experiments/queue/workflows/q01_m2_sharpe22_repro.yaml \
|
||||
# experiment_name=tac-rd-q01-m2-sharpe22-repro
|
||||
# -----------------------------------------------------------------------------
|
||||
{%- 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" %}
|
||||
{%- set SP_FIELDS = "sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead,sp_sharpe_22" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
@@ -47,7 +46,7 @@ qlib_init:
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs:
|
||||
uri: "sqlite:///{{ LAKE }}/mlruns.db"
|
||||
default_exp_name: "tac-rd-risk-limit"
|
||||
default_exp_name: "tac-rd-q01-m2-sharpe22-repro"
|
||||
|
||||
task:
|
||||
model:
|
||||
@@ -80,14 +79,14 @@ task:
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-14
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "$open,$high,$low,$close,$vwap,$volume,{{ SP_FIELDS }}"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- class: DropAllNaN
|
||||
kwargs: {}
|
||||
@@ -123,7 +122,7 @@ task:
|
||||
kwargs:
|
||||
signal: "<PRED>"
|
||||
topk: 10
|
||||
n_drop: 2
|
||||
n_drop: 1
|
||||
only_tradable: true
|
||||
risk_degree: 0.95
|
||||
backtest:
|
||||
@@ -0,0 +1,143 @@
|
||||
# QUEUE-11 standalone 5d-reversal signal net of costs (unisolated study).
|
||||
# Single-feature model: feature_fields = raw OHLCV + sp_trend_slope_5 only.
|
||||
# Acceptance: standalone reversal net_ann_return > 0 (clears 20bp round-trip).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_trend_slope_5" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs:
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs:
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
markets: {}
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs:
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs:
|
||||
uri: "sqlite:///{{ LAKE }}/mlruns.db"
|
||||
default_exp_name: "tac-rd-q11-reversal"
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
parallel: 5
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- class: DropAllNaN
|
||||
kwargs: {}
|
||||
- class: ProcessInf
|
||||
kwargs: {}
|
||||
- class: CSRankNorm
|
||||
kwargs: {}
|
||||
- class: ZScoreNorm
|
||||
kwargs: {}
|
||||
- class: Fillna
|
||||
kwargs: {}
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- class: SignalRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs: {}
|
||||
- class: SigAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
ana_long_short: true
|
||||
ann_scaler: 252
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs:
|
||||
signal: "<PRED>"
|
||||
topk: 10
|
||||
n_drop: 1
|
||||
only_tradable: true
|
||||
risk_degree: 0.95
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,97 @@
|
||||
# Re-run of experiment 16 with validated family=ta and family=sp lake features.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sma_5,sma_20,ema_12,ema_26,rsi_14,macd,macd_signal,macd_hist,bb_upper,bb_middle,bb_lower,atr_14,adx_14,sp_ret,sp_ou_half_life,sp_ou_revert,sp_ou_zscore,sp_hmm_p_regime1,sp_hmm_state,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_down,sp_max_move,sp_max_up,sp_rv1,sp_rv5,sp_rv22,sp_rv_ac1,sp_rv_cv_22,sp_vol_ratio_1_22,sp_vol_ratio_5_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_rskew_5,sp_rskew_22,sp_rkurt_5,sp_rkurt_22,sp_dsv_1,sp_dsv_5,sp_dsv_22,sp_dsv_ratio_1,sp_dsv_ratio_5,sp_dsv_ratio_22,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead,sp_sig_level2_lead_lag_5,sp_sig_level2_lag_lead_5" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp16-db-ta-sp" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 2, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,97 @@
|
||||
# General stochastic-process feature ablation: no TA, HMM, or OU fields.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_down,sp_max_move,sp_max_up,sp_rv1,sp_rv5,sp_rv22,sp_rv_ac1,sp_rv_cv_22,sp_vol_ratio_1_22,sp_vol_ratio_5_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_rskew_5,sp_rskew_22,sp_rkurt_5,sp_rkurt_22,sp_dsv_1,sp_dsv_5,sp_dsv_22,sp_dsv_ratio_1,sp_dsv_ratio_5,sp_dsv_ratio_22,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead,sp_sig_level2_lead_lag_5,sp_sig_level2_lag_lead_5" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp22-stochastic-general" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 2, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,97 @@
|
||||
# Exact compact stochastic feature set requested for a new run in MLflow exp 25.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp22-stochastic-general" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 2, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,98 @@
|
||||
# Compact stochastic feature set with reduced turnover: n_drop=1 instead of 2.
|
||||
# Same setup as exp24 (compact baseline) but replacing the TopkDropout n_drop 2 with 1.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp22-stochastic-general" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 1, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,99 @@
|
||||
# M2 isolation run: base compact set + risk-adjusted drift sp_sharpe_22.
|
||||
# Exact copy of exp26 (reference: expId=25 run=21afc6afdb674a399b59dd76c97628ce)
|
||||
# except feature_fields. 5-seed ensemble.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead,sp_sharpe_22" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp30-m2-sharpe" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 1, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
@@ -0,0 +1,99 @@
|
||||
# M3 isolation run: base compact set + GARCH(1,1) vol-regime trio.
|
||||
# Exact copy of exp26 (reference: expId=25 run=21afc6afdb674a399b59dd76c97628ce)
|
||||
# except feature_fields. 5-seed ensemble.
|
||||
{%- 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" %}
|
||||
{%- set FEATURES = "$open,$high,$low,$close,$vwap,$volume,sp_ret,sp_jump_ratio,sp_jump_flag,sp_jump_tail,sp_max_move,sp_rv1,sp_rv5,sp_rv22,sp_vol_ratio_5_22,sp_vol_ratio_1_22,sp_trend_slope_5,sp_trend_slope_20,sp_trend_slope_60,sp_logp,sp_hurst_exponent,sp_sig_level1_lead,sp_sig_level1_lag,sp_sig_level2_lead_lag,sp_sig_level2_lag_lead,sp_garch_cond_var,sp_garch_persistence,sp_garch_std_resid" %}
|
||||
|
||||
qlib_init:
|
||||
provider_uri: "{{ LAKE }}"
|
||||
region: us
|
||||
expression_cache: null
|
||||
dataset_cache: null
|
||||
calendar_provider:
|
||||
class: tac_qlib.data.providers.LakeCalendarProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
instrument_provider:
|
||||
class: tac_qlib.data.providers.LakeInstrumentProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US, markets: {} }
|
||||
feature_provider:
|
||||
class: tac_qlib.data.providers.LakeFeatureProvider
|
||||
kwargs: { lake_root: "{{ LAKE }}", market: US }
|
||||
exp_manager:
|
||||
class: MLflowExpManager
|
||||
module_path: qlib.workflow.expm
|
||||
kwargs: { uri: "sqlite:///mlruns.db", default_exp_name: "tac-rd-exp31-m3-garch" }
|
||||
|
||||
task:
|
||||
model:
|
||||
class: RankICEnsembleLGBModel
|
||||
module_path: tac_qlib.contrib.model.rank_ensemble
|
||||
kwargs:
|
||||
loss: mse
|
||||
learning_rate: 0.02
|
||||
num_leaves: 31
|
||||
n_estimators: 3000
|
||||
num_boost_round: 3000
|
||||
early_stopping_rounds: 200
|
||||
min_data_in_leaf: 20
|
||||
lambda_l2: 0.5
|
||||
colsample_bytree: 0.8
|
||||
subsample: 0.8
|
||||
subsample_freq: 1
|
||||
reg_alpha: 0.1
|
||||
reg_lambda: 1.0
|
||||
seeds: "42,7,2026,99,123"
|
||||
|
||||
dataset:
|
||||
class: DatasetH
|
||||
module_path: qlib.data.dataset
|
||||
kwargs:
|
||||
handler:
|
||||
class: TACHandler
|
||||
module_path: tac_qlib.contrib.data.handler
|
||||
kwargs:
|
||||
instruments: "{{ UNIVERSE }}"
|
||||
start_time: 2015-01-03
|
||||
end_time: 2026-08-10
|
||||
fit_start_time: 2016-01-04
|
||||
fit_end_time: 2025-09-01
|
||||
freq: day
|
||||
lake_root: "{{ LAKE }}"
|
||||
market: US
|
||||
label: "Ref($close,-6)/Ref($close,-1)-1"
|
||||
feature_fields: "{{ FEATURES }}"
|
||||
infer_processors:
|
||||
- { class: DropAllNaN, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: ProcessInf, kwargs: {} }
|
||||
- { class: CSRankNorm, kwargs: {} }
|
||||
- { class: ZScoreNorm, kwargs: { fit_start_time: "2016-01-04", fit_end_time: "2025-09-01" } }
|
||||
- { class: Fillna, kwargs: {} }
|
||||
segments:
|
||||
train: [2016-01-04, 2025-09-01]
|
||||
valid: [2025-09-03, 2026-01-03]
|
||||
test: [2026-01-04, 2026-08-10]
|
||||
|
||||
record:
|
||||
- { class: SignalRecord, module_path: qlib.workflow.record_temp, kwargs: {} }
|
||||
- { class: SigAnaRecord, module_path: qlib.workflow.record_temp, kwargs: { ana_long_short: true, ann_scaler: 252 } }
|
||||
- class: PortAnaRecord
|
||||
module_path: qlib.workflow.record_temp
|
||||
kwargs:
|
||||
config:
|
||||
strategy:
|
||||
class: TopkDropoutStrategy
|
||||
module_path: qlib.contrib.strategy
|
||||
kwargs: { signal: "<PRED>", topk: 10, n_drop: 1, only_tradable: true, risk_degree: 0.95 }
|
||||
backtest:
|
||||
start_time: 2026-01-04
|
||||
end_time: 2026-08-10
|
||||
account: 1000000
|
||||
benchmark: SPY
|
||||
exchange_kwargs:
|
||||
codes: "{{ UNIVERSE }}"
|
||||
deal_price: $close
|
||||
freq: day
|
||||
open_cost: 0.0005
|
||||
close_cost: 0.0015
|
||||
min_cost: 5.0
|
||||
risk_analysis_freq: 1d
|
||||
Reference in New Issue
Block a user