109 lines
3.4 KiB
YAML
109 lines
3.4 KiB
YAML
# Exp 7 (baseline) — LightGBM on the 60-ETF lake, typical algo-trading hyperparams.
|
|
# Universe: all 60 lake ETFs. Features: OHLCV + 28 ta-lib (auto-discovered).
|
|
# train 2022-01-01..2025-06-30 / valid 2025-07-01..2025-12-31 / test 2026-01-01..2026-08-12
|
|
{%- set LAKE = TAC_LAKE_DIR %}
|
|
|
|
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-lake-lgb-baseline"
|
|
|
|
task:
|
|
model:
|
|
class: LGBModel
|
|
module_path: qlib.contrib.model.gbdt
|
|
kwargs:
|
|
loss: mse
|
|
learning_rate: 0.05
|
|
num_leaves: 64
|
|
n_estimators: 200
|
|
colsample_bytree: 0.8
|
|
subsample: 0.8
|
|
subsample_freq: 1
|
|
reg_alpha: 0.01
|
|
reg_lambda: 0.01
|
|
|
|
dataset:
|
|
class: DatasetH
|
|
module_path: qlib.data.dataset
|
|
kwargs:
|
|
handler:
|
|
class: TACHandler
|
|
module_path: tac_qlib.contrib.data.handler
|
|
kwargs:
|
|
instruments: all
|
|
start_time: 2021-10-01
|
|
end_time: 2026-08-12
|
|
fit_start_time: 2022-01-01
|
|
fit_end_time: 2025-06-30
|
|
freq: day
|
|
lake_root: "{{ LAKE }}"
|
|
market: US
|
|
segments:
|
|
train: [2022-01-01, 2025-06-30]
|
|
valid: [2025-07-01, 2025-12-31]
|
|
test: [2026-01-01, 2026-08-12]
|
|
|
|
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: 2
|
|
n_drop: 1
|
|
only_tradable: true
|
|
risk_degree: 0.95
|
|
backtest:
|
|
start_time: 2026-01-01
|
|
end_time: 2026-08-12
|
|
account: 1000000
|
|
benchmark: SPY
|
|
exchange_kwargs:
|
|
codes: all
|
|
deal_price: $close
|
|
freq: day
|
|
open_cost: 0.0005
|
|
close_cost: 0.0015
|
|
min_cost: 5.0
|
|
risk_analysis_freq: 1d
|