Skip to main content

Circuit Breakers

Circuit breakers are automatic safety mechanisms that halt or constrain trading activity when predefined conditions are met. They activate without human intervention and require explicit action to reset.

Drawdown breaker

Trigger: Portfolio drawdown exceeds the active profile's max_drawdown threshold.

Effect: New long trade intents are rejected. Existing positions continue to be managed by the exit manager (stops remain active). Short trades may still be permitted depending on the profile configuration.

Reset: Automatic when portfolio recovers above the drawdown threshold, or manual via the dashboard kill-switch controls.

Why it matters: A drawdown breaker prevents the system from averaging down into a losing regime. Once drawdown is significant, the probability that the current signal set has been miscalibrated rises substantially — halting new entries protects remaining capital while the position managers work to reduce exposure.


Ingestion lag circuit breaker

Trigger: The ingestion service fails to publish new market data for longer than the configured lag threshold.

Effect: Signal generation is suspended. No new signals are emitted because the engine cannot evaluate signals on stale data.

Reset: Automatic when fresh market data resumes flowing.

Why it matters: A signal generated on 30-second-old price data in a fast-moving market is a signal generated on wrong data. The lag breaker prevents the system from acting on information that has already been superseded by market moves.


Infra circuit breaker

Trigger: A critical dependency (Redis, PostgreSQL) becomes unreachable for longer than the configured timeout.

Effect: The affected service enters a degraded state. For feasibility, this means fail-closed (no new intents approved). For execution, this means no new orders submitted and position monitoring enters heartbeat-only mode.

Reset: Automatic when the dependency recovers and health checks pass.


VPIN crash detection gate

Trigger: The VPIN (Volume-Synchronized Probability of Informed Trading) indicator crosses alert thresholds, suggesting elevated informed trading activity or abnormal order flow.

Effect: Not a full halt — rather a constraint. Signal confidence thresholds are raised (only higher-conviction signals pass), and Kelly fraction caps are reduced (position sizes are smaller). This makes the system more selective and less aggressive during periods of abnormal microstructure.

Reset: Automatic when VPIN normalizes.


Fail-closed gate

Trigger: Any critical safety check cannot be completed (service unreachable, timeout, corrupt state).

Effect: The gate defaults to rejecting the operation. This applies to feasibility validation, the precision signal filter, and the HMAC-verified fail-safe module.

Design rationale: In safety-critical systems, an uncertain answer is treated as "no." TRADEOS.tech applies this principle throughout: when in doubt, don't trade.


Manual controls

Beyond automatic circuit breakers, operators have two manual controls accessible from the dashboard or via the operations CLI:

Emergency halt — immediately stops all new order submission and drains active trade intents. Takes effect within one heartbeat cycle without requiring container restarts. Existing positions remain active and continue to be managed by the exit manager.

Autonomous agent pause — suspends the autonomous parameter-tuning agent independently from the trade pipeline. The live trading loop continues unaffected; only new parameter proposals are paused. Can be re-enabled instantly without a restart.

Both controls are designed for operational use during infrastructure incidents, manual review periods, or regulatory compliance windows.