Skip to content
All library documents

Mantis: Contrastive Time-Series Classification for Trading Regimes

Article MQL5 articles

Summary

The document explains Mantis, a foundation model for classifying time-series patterns and market regimes. It describes splitting sequences into patches, combining local convolutional features with global attention, and using separate streams for normalized values, first differences, and window-level mean and volatility. Contrastive pre-training is intended to make representations robust to changes in the timing or amplitude of patterns, while channel adapters capture relationships across multiple indicators or assets.

The article also describes temperature scaling to make classification probabilities better calibrated, and outlines a training setup using more than seven million series from ten datasets. Trading examples include distinguishing short-lived anomalies from reversals and identifying shifts in co-movement among technology stocks. These examples illustrate possible uses rather than validated trading results. The text reports comparative model performance in broad terms but supplies no detailed metrics in the excerpt, and its flash-crash scenarios are hypothetical. Classification confidence can support risk decisions, but it does not establish that acting on the labels is profitable.

Key ideas

  • Mantis represents a time series as a fixed set of patches to control computational cost across different input lengths.
  • Hybrid local and global processing is designed to capture both short-term changes and broader patterns.
  • Contrastive pre-training brings augmented views of the same series together in the learned representation.
  • Separate input streams encode levels, first differences, local means, and local standard deviations.
  • Temperature scaling aims to make class probabilities correspond more closely to observed accuracy.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.