quantlab.model.predefined.realmlp#

RealMLP regression head backed by pytabkit.

RealMLPRegressor is a TabkitRegressor that wraps pytabkit.RealMLP_TD_Regressor, the RealMLP network with the tuned defaults from Holzmüller et al., “Better by Default” (NeurIPS 2024). It trains on the flattened (num_times * num_symbols, num_features) rows of the factor panel and predicts future returns as [num_times, num_symbols, num_labels]. A panel is an xarray.Dataset indexed by timestamp and symbol. Early stopping is pytabkit’s own, driven by the validation segment the pipeline holds out, and the stopping epoch is written to the tracking run after training.

pytabkit is itself a torch library. On macOS, torch and xgboost bundle clashing OpenMP runtimes, so a process that mixes them must set OMP_NUM_THREADS=1 before importing either; the same applies here.

Classes

RealMLPRegressor

Predict future returns with a pytabkit RealMLP (tuned defaults).