AITOS — AI-Assisted Trading Architecture

An AI-assisted market analysis pipeline featuring stage-gated signal scoring, ONNX Runtime sequence model inference, deterministic risk gates, and paper trading parity.

FastAPI PyTorch ONNX Runtime Deterministic Risk Gate Paper Trading
Read Architecture Case Study → Read ONNX Inference Subsystem →
[DISCLAIMER & STATUS: EXPERIMENTAL / WIP]
AITOS evaluates machine learning market signals against hard risk boundaries. It does not constitute financial advice or live trading recommendations.

1. Executive Overview

AITOS decouples probabilistic candidate signal generation from execution authority. Machine learning models (PyTorch / ONNX Runtime) generate candidate scoring vectors, but a deterministic risk engine evaluates daily loss limits, account capital caps, and market session time checks (`09:15-15:25 IST`) before order submission.

2. Stage-Gated Execution Pipeline

AITOS Execution Boundary Pipeline
flowchart TD
    A[Market Data Feed] --> B[Data Validation Engine]
    B --> C[Feature Engineering Pipeline]
    C --> D[Sequence Model ONNX Runtime]
    D -->|Candidate Score| E[Deterministic Risk Gate]
    E -->|Check Capital & Session| F{Approved?}
    F -->|Yes| G[Paper Trading Sandbox]
    F -->|No| H[Audit Log Rejection]
    G --> I[PostgreSQL PnL Ledger]
            

3. Core Subsystems

4. Technology Stack by Role

Layer / Role Technologies Used
Backend Framework Python 3.11, FastAPI, Pydantic
Machine Learning & Inference PyTorch, ONNX Runtime, NumPy, Pandas
Persistence & State PostgreSQL, Redis Pub/Sub