Skip to main content

Models

A model refers to a quantitative method, system, or approach that applies statistical, economic, financial, or mathematical theories, techniques, and assumptions to process input data into quantitative estimates. On the Almanak platform, each agent implements a strategy that may use one or more model(s) to inform its decisions during a simulation. A model can vary from complex machine learning algorithms to simple rule-based logic.

0, 1 or more model(s) can be used by the agent strategy to perform any mathematical transformation required.

Example

An agent strategy "VolRebalance" has two different models: A logic-based model & a machine-learning-based model (ML model). The user defines for the agent, that the logic-based model should take decisions only when the volatility of an asset is below the TWA. Otherwise the ML model takes over.

ONNX & WandB

We use Weight & Biases as our model versioning platform. The models need to be ONNX compatible and stored as Weights and Biases Artifact.

Usage

Models are wrapped in a ModelHelperInterface which is made available to the Strategy as a list which you can use to find the model you want to call and using the functions that are made available through the interface.

The input and output will have to follow the format that was defined when wrapping the model in an ONNX model. Refer to their documentation to see how that works.

Example

models:
- alias: "trading_prediction"
source: "wandb://almanak/model-registry/Uniswap_Trader_Trend-Following:latest"
Advanced Feature

Models are part of our advanced features, which are not yet available for general use. If you’d like assistance in building or importing a model for your needs, please feel free to reach out to us.