A Atlantis Core

Framework

Atlantis Core Framework

A detailed guide to the instrument-agnostic trading core being extracted from legacy Atlantis into AtlantisV2.

# AtlantisV2 core pipeline
ReferenceTime
  -> MarketSnapshot
  -> FeatureVector
  -> PatternHit[]
  -> TradeHypothesis
  -> SignalIntent
  -> PermissionDecision
  -> PositionIntent
  -> OutcomeRecord

Atlantis Core is the reusable decision framework below options, perps, spot, scanners, dashboards, live trading, paper trading, replay, and research.

It turns adapter-normalized market state into evidence-rich trade theses, permission decisions, lifecycle objects, and outcome records. The framework deliberately avoids broker payloads, venue schemas, database rows, option strike lookup, and dashboard response models.

Atlantis Core architecture map

Current implementation status The first framework spine is implemented and verified. On top of it, the first Move Intelligence Core Pack is now in place: typed price, volume, open-interest, and greeks capability shells; legacy MI feature names; strict multi-feature pattern ranges; and migrated `short_covering`, `long_unwinding`, `range_expansion_bullish`, and `range_expansion_bearish` pattern definitions.

What We Built

The current repository implements the first instrument-agnostic vertical slice:

ReferenceTime
  -> EventEnvelope[]
  -> MarketSnapshot
  -> FeatureVector
  -> PatternHit[]
  -> TradeHypothesis
  -> SignalIntent
  -> PermissionDecision
  -> PositionIntent
  -> ExposureExpression
  -> OpenExposure
  -> MarkRecord / LifecycleTransition
  -> OutcomeRecord

The point is not to copy legacy Atlantis module-for-module. The point is to preserve its durable behavior while removing historical coupling to options, specific venues, process wiring, and TimescaleDB tables.

What Core Owns

AreaCore object examplesPurpose
Time disciplineReferenceTime, Clock, CycleContextMake live, replay, and research use the same as-of semantics
Event ingestion boundaryEventEnvelope, EventLineage, AdapterEventBatchNormalize adapter output without leaking raw venue payloads
Market stateMarketSnapshot, PriceCapability, VolumeCapability, OpenInterestCapability, GreeksCapabilityRepresent capability-bearing state with explicit availability
Feature extractionFeatureDefinition, FeatureRegistry, FeatureVectorCompute deterministic features from bounded snapshots
Pattern detectionPatternDefinition, PatternStage, FeatureRange, PatternHit, PatternRegistryEmit evidence, availability, version, stage, range score, and definition hash
ScoringTradeHypothesis, EvidenceStack, ConvictionBreakdownAggregate pattern evidence into directional hypotheses
Signal intentSignalIntent, ExposurePreference, IntentConstraintsExpress the thesis without selecting an instrument contract
PermissionPermissionDecision, RiskContext, ReasonCodeAdmit, reject, defer, or downgrade the intent with reason codes
LifecyclePositionIntent, OpenExposure, LifecycleTransitionTrack state changes without broker orders
OutcomesMarkRecord, CloseEvent, OutcomeRecordPreserve path labels and economic labels separately

What Core Does Not Own

Core does not own raw Delta, Zerodha, OpenAlgo, FastAPI, TimescaleDB, React, or broker order payloads.

Those belong in adapters or runtime layers:

  • Venue adapters normalize market payloads into EventEnvelope.
  • Instrument adapters express a SignalIntent as spot, perp, future, option, or no viable expression.
  • Execution adapters place or simulate orders.
  • Persistence adapters serialize core objects.
  • UI adapters present views without reshaping the domain.

Why This Matters

Legacy Atlantis contains valuable behavior, but it was often embedded inside options-specific or runtime-specific code. The rewrite keeps the valuable parts and makes them portable:

  • no hidden latest-row reads
  • no wall-clock reads inside core logic
  • missing, stale, invalid, and withheld data remain distinct
  • signal generation is gate-free, while permission is reason-coded
  • lifecycle states are append-only and replayable
  • path outcomes and economic outcomes are separate labels
  • tests encode behavior before migration changes land

Current Verification Standard

The current framework checkpoint is verified by:

python -m pytest
ruff check .
ruff format --check .

The suite includes contract tests, replay-safety tests, feature/window tests, pattern availability tests, scoring tests, signal intent tests, permission tests, lifecycle tests, adapter boundary tests, and the first legacy parity fixture.

The current verified count is 148 tests.

Reading Order

  1. Quickstart for the smallest working mental model.
  2. Time and events for replay safety.
  3. Market state for capability blocks and snapshots.
  4. Features and patterns for deterministic evidence.
  5. Scoring to permission for thesis and risk flow.
  6. Lifecycle and outcomes for state and labels.
  7. Adapters for where raw venue behavior enters and exits.
  8. Legacy parity for preserving old Atlantis lessons.
  9. Contract reference for a compact object map.