deprecated

Renamed model predictions and backtests functions

We have added new model_predictions() and model_backtests() functions to retrieve predictions and backtests from prediction models respectively. These replace the existing model_by_id() and backtests() functions, which have ambiguous naming and have been deprecated.

📘

Predictions vs backtests - what's the difference?

Model predictions are calculated using the current values for all input signals,
whereas model backtests were produced using the values of the input signals as they were at the time the backtests were run.

The model predictions are effectively in-sample predictions for the part of the data that was part of the training, and out-of-sample predictions for new data (that wasn't seen during the training).

The backtests are done using either walk-forward backtesting or 5-fold cross validation, depending on the model configuration. See Prediction Models - Setup for more details on how this works. What is returned by the model_backtests() function are the out-of-sample predictions generated during that backtesting process.

The new functions will continue to accept parameters to specify the prediction model ID and run number. Note that the model ID must now be the numeric ID (e.g. 123) which is used in most cases, whereas the legacy functions accept both the numeric ID or the longer signal:model:123.

Examples

  • model_predictions(123): retrieve model predictions for model 123, for the currently "active" run - a run can be activated from the user interface.
  • model_predictions(123, 1): retrieve model predictions for model 123, run 1.
  • model_backtests(123, 1): retrieve model backtests for model 123, run 1.

Deprecation of model_by_id() and backtests()

Deprecation date: December 2022 (functions will work as before, but with warnings when evaluated)
Removal date: December 2023 (functions will stop working)

Reference

DSL reference for model_predictions() and model_backtests()