# region declaration
schema_version: '1.0'
metadata:
  name: book_compiled_bars
  mode: development
sfd:
  manifest:
    type: ml
    data_source:
      method: limen.data.HistoricalData.get_any_file
      params:
        file_path_or_url: inputs/spot_15m_20250101_20250531.parquet
    split_dates:
      train_start: '2025-01-01'
      train_end: '2025-01-15'
      val_start: '2025-01-15'
      val_end: '2025-01-18'
      test_start: '2025-01-18'
      test_end: '2025-01-22'
    indicators:
    - func: limen.indicators.roc
      params:
        period: 1
        group: momentum
    target:
      name: quantile_flag
      class: limen.targets.QuantileBinaryTarget
      fit_params:
        source_column: roc_1
        quantile: 0.5
      transform_params:
        shift: -1
    backtest:
      fee_bps: 7.0
      slip_bps: 3.0
      notional_rate: 0.5
    scaler:
      from_params: scaler_type
    reference_architecture: limen.sfd.reference_architecture.logreg_binary
# region bar_formation
    bar_formation:
      func: limen.data.utils.compute_data_bars
      params:
        bar_type: '{bar_type}'
        volume_threshold: '{volume_threshold}'
        trade_threshold: '{trade_threshold}'
        liquidity_threshold: '{liquidity_threshold}'
# endregion bar_formation
  params:
    scaler_type: [logreg]
    C:
    - 1.0
    random_state: [42]
    bar_type:
    - volume
    - trade
    - liquidity
    volume_threshold:
    - 1000.0
    trade_threshold:
    - 100000
    liquidity_threshold:
    - 10000000.0
uel:
  output_path: compiled-bars
  n_permutations: 3
  search_strategy:
    type: grid
  output_format: csv
  checkpoint_interval: 1
  recording:
    predictions: true
    alignment: true
# endregion declaration
