Skip to content

Runtime Model

Purpose

This section describes how the infrastructure operates during Runtime.

While the Architecture and Stacks sections define the structural organization of the infrastructure, the Runtime section explains how these components behave when the infrastructure is actively running.

The Runtime model describes:

  • event-driven processing
  • operational infrastructure behavior
  • monitoring and failure handling

Together these documents explain how the infrastructure behaves in both Backtesting and Live Runtimes.


Runtimes

The infrastructure operates in two primary Runtimes:

Research Runtime

This Runtime executes the infrastructure in a simulated Runtime.

Strategies are evaluated using historical datasets while interacting with a simulated Venue.

The Research Runtime enables:

  • deterministic replay of historical market Events
  • Strategy experimentation
  • evaluation of trading performance

This Runtime is primarily operated by the Backtesting Stack.


Live Runtime

The live Runtime operates the infrastructure against real Venues.

The infrastructure consumes real-time market data and executes trading actions through Venue adapters.

The live Runtime is responsible for:

  • real-time Strategy execution
  • risk enforcement
  • Order execution
  • continuous infrastructure monitoring

This Runtime is operated by the Execution Stack.


Trading Runtime Model

Both Runtimes execute the same event-driven trading core.

The infrastructure processes Events sequentially and updates internal States based on those Events.

The Runtime model follows a deterministic Event processing pipeline:

Market Event ↓ State Update ↓ Strategy Decision ↓ Risk Validation ↓ Outbound Queue ↓ Execution

Execution responses generated by Venues produce new Events that feed back into the infrastructure.


Event Processing Loop

At Runtime the infrastructure operates as a continuous event-processing loop.

Market Event ↓ State Update ↓ Strategy Evaluation ↓ Trading Intent ↓ Risk Validation ↓ Outbound Queue ↓ Venue Adapter ↓ Venue ↓ Execution Events ↓ State Update

Market Events and execution Events continuously update States and drive trading decisions.

This event-driven feedback loop ensures consistent infrastructure behavior across both Backtesting and Live Runtimes.


Runtime Components

The Trading Runtime consists of several cooperating components.

State Management

Maintains the internal State derived from processed Events.

Strategy Layer

Evaluates trading opportunities based on current State.

Risk Engine

Validates trading Intents before they reach execution.

Queue

Regulates outbound execution requests and enforces sequencing constraints.

Venue Adapters

Translate internal execution requests into Venue-specific API interactions.


Operational Concerns

Operating a trading infrastructure requires additional Runtime capabilities beyond the core trading loop.

These include:

  • monitoring and observability
  • incident detection
  • failure handling
  • infrastructure recovery

The following documents describe these operational concerns in detail:

  • Monitoring
  • Incident Model
  • Recovery Model

Relationship to Stacks

The Runtime model operates on top of the infrastructure Stacks described in the Stacks section.

Different Stacks are responsible for different Runtimes.

Stack Research Runtime Live Runtime
Backtesting active inactive
Execution inactive active
Analysis & Observability active active

The Runtime documentation focuses on how these Stacks behave when the infrastructure is actively running.


Runtime Documentation

Additional documents in this section describe operational aspects of the infrastructure Runtime.

These include:

  • monitoring infrastructure
  • incident handling
  • infrastructure recovery procedures
  • specific Runtime behavior