Skip to main content

Overview

run_ml_job trains a classical machine learning model on feature-engineered data and produces per-ticker next-day log-return predictions for the ML-enhanced portfolio path. Supported libraries:
  • scikit-learn — linear, ridge, lasso, elastic net, quantile, random forest, …
  • XGBoost, LightGBM, CatBoost — gradient-boosting regressors
This stage is optional. The default QuantLab path is data → PO → trading. Use ML when you want predicted returns as μ (mu_mode: custom in run_po_job).
For XGBoost, LightGBM, and CatBoost, QuantLab uses the regressor APIs (e.g. XGBRegressor, LGBMRegressor, CatBoostRegressor) to predict continuous returns — not classifiers or clustering.

Hyperparameters — full library power

Pass any constructor argument the chosen model accepts via model_params. The worker forwards those kwargs into the library’s estimator __init__, so you can use the full API surface of sklearn / XGBoost / LightGBM / CatBoost (learning rate, depth, subsample, reg_alpha, l1_ratio, random_state, and so on). Examples:
In chat you can just say “XGBoost with max_depth 5 and 300 trees” — MCP skills fill in model_params.

Parameters

string
required
URL of feature_engine_*.json from run_feature_worker.
string
required
URL of data_extractor_*.json from run_data_extraction (train/test date alignment).
object
required
ML configuration.

Returns

Pass output_url to run_po_job. Prefer run_dl_job if you want neural nets instead.

Example


Resources