Autonomous Intraday Trading Platform
Deterministic, fail-closed Python trading system validated in paper and sandbox environments
- Role
- Sole architect, developer and test author
- Links
- Source is private or sanitized; no public repository is linked.
- Reading mode
At a glance
- Problem
- Hobby trading code mixes strategy, broker calls and bookkeeping, so results cannot be replayed and failures cannot be explained. The goal was a system where every decision is auditable and blocked when any precondition is unmet.
- Architecture choice
- Strategies emit intent only. A risk engine and capital reservation sit between intent and execution as the single commit point, and broker adapters are separately gated so the deterministic paper path never depends on broker state.
- My contribution
- Sole architect and developer: event pipeline, risk authorization, reservations, sizing, order construction, reconciliation, persistence, the audit and soak harness, and the supervised launch workflow.
- Verified so far
- Earlier certified paper build: 100,000-event soak completed, 20 of 20 mandatory checks passed, determinism and look-ahead audits passed. Separately, a supervised sandbox round trip in October 2026 (user-reported).
- Still open
- Production trading is disabled. The newer dynamic-sizing build has bounded offline validation only, with one known import failure and deselected tests.
Project overview
A modular Python 3.12 platform that processes market data through normalization, indicators, strategy intent, risk authorization, position sizing, order construction, sandbox submission, reconciliation, portfolio accounting and durable persistence. Backtesting and paper trading reuse the same components rather than shortcut logic. An earlier paper-product build completed a certified 100,000-event soak test with all 20 mandatory checks passing. Later work added separately gated autonomous sandbox execution that is still being validated under supervision. Production trading has never been enabled.
Problem and context
Most hobby trading code mixes strategy logic, broker calls and bookkeeping in one place, which makes results impossible to reproduce and failures impossible to reason about. The goal was a system whose every decision can be replayed, audited and blocked when any precondition is unmet.
Objectives
- Deterministic processing: identical inputs produce identical decisions and ledgers
- Strict component isolation so brokers and data providers can be swapped without touching strategy code
- Fail-closed behavior: configuration, data, risk, persistence or recovery failures block new exposure
- Durable recovery across crashes without duplicating financial effects
- Separately gated broker sandbox interaction with production execution disabled
- Automated tests and audits as the acceptance criteria, not discretionary judgment
My contribution
- Designed the event pipeline and the boundaries between paper simulation and broker observation
- Implemented risk authorization, capital reservations, sizing, order construction and reconciliation
- Wrote determinism, look-ahead, failure-atomicity and parity audits, plus the soak harness
- Investigated and remediated risk-control defects discovered during certification
- Built the supervised Windows launch and daily arming workflow for sandbox sessions
Technology stack
- Python 3.12+
- YAML configuration
- pytest
- mypy
- Ruff
- Alpaca market data
- Tradier Sandbox
- SQLite persistence
- CSV data processing
- Event-driven architecture
- Order lifecycle management
- Structured logging
Results
- Earlier certified build: 100,000-event soak completed, 20/20 mandatory checks passed, determinism and look-ahead audits passed
- Separately gated sandbox lifecycle controls (preview, placement, exit, cancel, replace, recovery) certified with flat broker and internal positions afterward
- User-reported supervised sandbox session (October 2026): one natural long entry and exit across five symbols, broker-confirmed flat, clean shutdown, no duplicate trades after an internet interruption
- Multiple risk-control defects discovered during certification were investigated and remediated with tests
Limitations
- Production trading is disabled and has never been enabled; no profitability claims are made
- The soak certification applies to the earlier paper-product build, not to the later autonomous sandbox path
- The expanded dynamic-sizing build has bounded offline validation only: one known import failure, deselected tests, no complete regression run
- Single-session sandbox results do not establish repeated-session or unattended readiness
- Exits are application-detected and supervised; there is no broker-native protective stop
Interactive demonstration
- Market Data, state pass
- Strategy, state pass
- Risk Engine, state action
- Order Management, state pass
- Broker Sandboxproduction disabled, state pass
- Portfolio State, state pass
Opening range forms, a breakout bar produces long intent, risk approves, the sandbox fills, and the target is reached.
Event 1 of 1209:30 ET · O 100 H 100.4 L 99.7 C 100.2
- Market Datanormalize · freshness, state pass
- Strategyintent only, state pass
- Risk Enginegates · reservation, state pass
- Order Managementwrite-ahead record, state idle
- Broker Sandboxproduction disabled, state idle
- Portfolio Stateatomic checkpoint, state pass
Event log
Structured log lines emitted per stage.
Simulated equity
Synthetic 100,000 starting balance. Realized +0.00.
Position
flat
Expected outcome: One approved entry, one target exit, positive realized P&L on synthetic data.
Milestones
Paper-product certification
100,000-event soak test completed; 20 of 20 mandatory checks passed; determinism and look-ahead audits passed on the earlier build.
Sandbox lifecycle controls certified
Preview, placement, exit, cancel, replace and recovery paths certified in the Tradier sandbox; positions flat afterward.
Supervised sandbox round trip (user-reported)
One natural long entry and exit across a five-symbol universe, broker-confirmed flat, clean shutdown.
Dynamic sizing build installed
Expanded LONG/SHORT sizing with bounded offline validation; expanded-capital live validation pending.