308 lines
9.0 KiB
YAML
308 lines
9.0 KiB
YAML
run:
|
|
name: baseline_feature_target_model_registry
|
|
seed: 42
|
|
output_dir: artifacts/runs
|
|
|
|
# ------------------------------------------------------------
|
|
# DATA
|
|
# ------------------------------------------------------------
|
|
data:
|
|
path: bars_bybit_1min_2026-03-01_2026-05-11.parquet
|
|
time_col: time
|
|
symbol_col: symbol
|
|
symbol_candle: INDEX
|
|
candle_rule: 1min
|
|
min_coverage: 0.98
|
|
max_symbols: 120
|
|
required_cols:
|
|
- open
|
|
- high
|
|
- low
|
|
- close
|
|
- buy_volume
|
|
- sell_volume
|
|
|
|
# ------------------------------------------------------------
|
|
# SPLIT
|
|
# ------------------------------------------------------------
|
|
split:
|
|
train_size: 0.70
|
|
test_size: 0.15
|
|
valid_size: 0.15
|
|
|
|
# ------------------------------------------------------------
|
|
# BACKTEST
|
|
# ------------------------------------------------------------
|
|
backtest:
|
|
fee_rate: 0.0005
|
|
initial_state: 1
|
|
|
|
# ------------------------------------------------------------
|
|
# FEATURE SETS
|
|
# ------------------------------------------------------------
|
|
feature_sets:
|
|
A_market_basic:
|
|
description: "returns, range, ATR, volatility, volume imbalance"
|
|
builders:
|
|
- name: market_basic
|
|
params:
|
|
return_lags: [1, 3, 5, 15, 30, 60, 120]
|
|
range_windows: [14, 30, 60, 120]
|
|
atr_windows: [14, 60, 120]
|
|
vol_windows: [30, 60, 120, 360]
|
|
volume_windows: [30, 60, 120]
|
|
|
|
B_primitive_pressure:
|
|
description: "primitive continuous pressure parameters from OHLCV"
|
|
builders:
|
|
- name: primitive_pressure
|
|
params:
|
|
price_lags: [13, 34, 55, 144, 233]
|
|
force_lag: 34
|
|
volume_norm_win: 1440
|
|
|
|
C_mode_values:
|
|
description: "continuous mode values: level, speed, accel, cycle, persistence"
|
|
builders:
|
|
- name: mode_values
|
|
params:
|
|
speed_ema: 45
|
|
speed_lag: 5
|
|
cycle_win: 360
|
|
persist_win: 120
|
|
|
|
D_state_features:
|
|
description: "discrete state features derived from mode values"
|
|
builders:
|
|
- name: state_features
|
|
params:
|
|
deadband: 0.05
|
|
cycle_deadband: 0.15
|
|
persist_deadband: 0.20
|
|
|
|
E_agreement_features:
|
|
description: "agreement features derived from state features"
|
|
builders:
|
|
- name: agreement_features
|
|
params:
|
|
state:
|
|
deadband: 0.05
|
|
cycle_deadband: 0.15
|
|
persist_deadband: 0.20
|
|
|
|
F_long_context_features:
|
|
description: "long-context features derived from primitive pressures"
|
|
builders:
|
|
- name: long_context
|
|
params:
|
|
ema_spans: [120, 240, 360, 720, 1440]
|
|
trend_lags: [120, 240, 360, 720]
|
|
cycle_wins: [360, 720, 1440]
|
|
persist_wins: [240, 480, 720, 1440]
|
|
fast_span: 45
|
|
|
|
|
|
|
|
# ----------------------------------------------------------
|
|
# BIG NOTEBOOK-LIKE FEATURE SETS
|
|
# ----------------------------------------------------------
|
|
# These builders use full market matrices px/buy/sell, not only INDEX OHLC.
|
|
# They are implemented in:
|
|
# src/ml_crypto_lab/features/fusion_factory.py
|
|
# src/ml_crypto_lab/features/fusion_builders.py
|
|
|
|
B_big_primitive_pressure:
|
|
description: "large primitive pressure table: fusion_score, fusion_force, volume_pressure, index_pressure and additional pressures"
|
|
builders:
|
|
- name: advanced_fusion_params
|
|
params:
|
|
prefix: "b_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
include_index_in_cross_section: false
|
|
vol_use_mean: true
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_p_list: [1]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
force_winsor_q_list: [0.15]
|
|
force_base_weight_list: [2.0]
|
|
q_weight_scale_list: [0.70]
|
|
force_w_price_list: [0.75]
|
|
use_base_imbalance_list: [true]
|
|
z_roll_wins: [400, 900, 1400, 1900]
|
|
breadth_wins: [100, 170, 240, 310, 380]
|
|
pct_up_norms: [50]
|
|
pct_down_norms: [50]
|
|
score_w_list: [60]
|
|
score_p_list: [2]
|
|
score_roll_sets: [[1400]]
|
|
|
|
C_big_mode_values:
|
|
description: "large continuous mode values derived from B_big primitive pressures"
|
|
builders:
|
|
- name: advanced_fusion_mode_values
|
|
params:
|
|
prefix: "c_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
|
|
D_big_state_features:
|
|
description: "large discrete *_state features derived from B_big/C_big"
|
|
builders:
|
|
- name: advanced_fusion_states
|
|
params:
|
|
prefix: "d_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
|
|
E_big_agreement_features:
|
|
description: "large agreement features by mode and by parameter"
|
|
builders:
|
|
- name: advanced_fusion_agreements
|
|
params:
|
|
prefix: "e_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
|
|
F_big_long_context_features:
|
|
description: "large long-context feature set derived from primitive pressures"
|
|
builders:
|
|
- name: advanced_fusion_long_context
|
|
params:
|
|
prefix: "f_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
lctx_ema_spans: [120, 240, 360, 720, 1440]
|
|
lctx_trend_lags: [120, 240, 360, 720]
|
|
lctx_cycle_wins: [360, 720, 1440]
|
|
lctx_persist_wins: [240, 480, 720, 1440]
|
|
lctx_breakout_wins: [360, 720, 1440]
|
|
lctx_impulse_lags: [120, 240, 360, 720]
|
|
lctx_max_output_cols: 10000
|
|
|
|
ALL_big_designed_features:
|
|
description: "full big designed table: params + modes + states + agreements + long_context"
|
|
builders:
|
|
- name: advanced_fusion_full
|
|
params:
|
|
prefix: "sig_big__"
|
|
factory:
|
|
symbol_candle: INDEX
|
|
max_symbols: 120
|
|
price_z_wins: [1600]
|
|
price_breadth_wins: [500, 900]
|
|
vol_w_list: [120, 180]
|
|
vol_roll_sets: [[1600], [2000], [2400]]
|
|
lctx_max_output_cols: 10000
|
|
|
|
# ------------------------------------------------------------
|
|
# TARGET SETS
|
|
# ------------------------------------------------------------
|
|
target_sets:
|
|
zz_long:
|
|
builders:
|
|
- name: zigzag
|
|
params:
|
|
pct_list: [0.018, 0.022, 0.026, 0.030, 0.035, 0.040]
|
|
atr_mult_list: [1.5, 2.0, 2.5]
|
|
min_bars_list: [180, 240, 360, 480, 720]
|
|
atr_window: 60
|
|
initial_state: 1
|
|
|
|
future_mean:
|
|
builders:
|
|
- name: future_mean
|
|
params:
|
|
horizon_list: [360, 720, 1080, 1440]
|
|
min_move_pct_list: [0.004, 0.0065, 0.010]
|
|
atr_mult_list: [0.75, 1.25, 1.75]
|
|
fee_rate: 0.0005
|
|
fee_safety_rate: 0.00075
|
|
atr_window: 60
|
|
initial_state: 1
|
|
|
|
future_return:
|
|
builders:
|
|
- name: future_return
|
|
params:
|
|
horizon_list: [240, 360, 720, 1080, 1440]
|
|
min_move_pct_list: [0.005, 0.008, 0.012]
|
|
atr_mult_list: [1.0, 1.5, 2.0]
|
|
fee_rate: 0.0005
|
|
fee_safety_rate: 0.00075
|
|
atr_window: 60
|
|
initial_state: 1
|
|
|
|
# ------------------------------------------------------------
|
|
# MODELS
|
|
# ------------------------------------------------------------
|
|
models:
|
|
logreg:
|
|
name: sklearn_logreg
|
|
params:
|
|
C: 0.5
|
|
max_iter: 2000
|
|
class_weight: balanced
|
|
|
|
extra_trees:
|
|
name: sklearn_extra_trees
|
|
params:
|
|
n_estimators: 400
|
|
max_depth: 12
|
|
min_samples_leaf: 60
|
|
max_features: sqrt
|
|
n_jobs: -1
|
|
random_state: 42
|
|
|
|
hist_gb:
|
|
name: sklearn_hist_gradient_boosting
|
|
params:
|
|
max_iter: 250
|
|
learning_rate: 0.05
|
|
max_leaf_nodes: 31
|
|
l2_regularization: 0.01
|
|
random_state: 42
|
|
|
|
# ------------------------------------------------------------
|
|
# EXPERIMENT MATRIX
|
|
# ------------------------------------------------------------
|
|
experiment_matrix:
|
|
# Old compact sets are still available. For big notebook-like experiments use the *_big sets.
|
|
feature_sets: [B_big_primitive_pressure, C_big_mode_values, D_big_state_features, E_big_agreement_features, F_big_long_context_features, ALL_big_designed_features]
|
|
target_sets: [future_mean]
|
|
models: [logreg]
|
|
|
|
training:
|
|
max_targets_per_set: 3
|
|
save_predictions: true
|
|
save_models: true
|
|
|
|
ensemble:
|
|
enabled: true
|
|
methods:
|
|
- majority_vote
|
|
- score_average
|