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
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 viamodel_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).
Complete config values are shown below. Use one alongside the required feature_url and data_extractor_url from your own preceding jobs; these objects are not standalone tool requests.
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
effective_params is what the run actually used. A remapped alias, a rounded cv_test_size or an
ignored block leaves the run Succeeded and shows up in coercions / warnings — read them before
passing the forecasts on.
If you want neural networks instead of classical models, use run_dl_job — its nn_engine_*.json is interchangeable with this output downstream.
Example
Next Step
- Pass
output_urltorun_po_jobasinput_url. On anml_engine_input the optimizer defaults tomu_mode: "custom", so the forecasts act as expected returns. - Before that, it is worth looking at the forecasts themselves:
run_plot_jobwithblock_name: "ml_visualization"andtool_name: "plot_compare_pred_vs_real_for_ticker"puts predicted and realized returns on one chart.