All projectsTrading systems

Automated Trading Infrastructure with Risk Controls

A production system that processes live market data, executes orders automatically, and enforces risk limits without human intervention. Runs 24/7, with a full research pipeline for validating strategies before they touch real capital.

Role
Founder and Backend Engineer
Evidence
24/7 operation · automatic recovery · persistent risk state
Status
Private by design
PythonFastAPIPostgreSQLRedisDockerExchange APIs

The problem

An automated system that handles money has no tolerance for the usual failure modes. A dropped connection, a float rounding error, or an unhandled API failure is not a bug report, it is lost capital.

Reliability engineering

  • Resilient data stream. WebSocket client with exponential backoff, reconnect delay doubling from 1 to 60 seconds and resetting on success. A subscription manager tracks active topics and re-subscribes automatically after a drop, so the data feed survives network failures without manual intervention.
  • Circuit breaker with persistent state. Trading halts on consecutive API failures or when a daily loss limit is hit. State lives in Redis and survives container restarts, so a crash cannot silently re-enable a system that was deliberately stopped.
  • Risk-based position sizing. Exposure is calculated from risk tolerance rather than account balance, with all financial arithmetic in decimal rather than floating point. Float rounding in money math is not acceptable.
  • Manual override. Emergency shutdown with two-step confirmation, closing all open positions immediately.

Research pipeline

Columnar storage for historical data, automated gap detection in datasets, walk-forward optimisation, and a paper-trading engine with a simulated broker. Nothing reaches live capital before it has been validated against clean historical data.

Stack

Python, FastAPI, PostgreSQL, Redis, Docker, cloud deployment.

PRIVATE BY DESIGN

Proprietary product of my own company. Source code is closed, but I can walk through the architecture and reliability patterns in detail.

Ready when the problem is real

Where does manual work become expensive for you?

Describe the process, the failure you cannot afford and the result you need. We will propose the smallest system that solves it reliably.

Discuss a similar system