SYSTEM 03 / PAPER MARKETS + AI

VISIT MARTOCCIMAYHEM.COM ↗← ALL SYSTEMS

AI PAPER TRADER

Paper-Only Market Operations

Martocci Mayhem connects market research, agentic review workflows, broker previews, explicit approvals, risk controls, durable portfolio state and operator observability. The current system is paper-only.

ALPACA PAPERAGENTIC WORKFLOWSMARKET DATAAPPROVAL GATESRISK CONTROLSDURABLE STATEOBSERVABILITY
01

CONTEXT

A trading application changes character when it is expected to operate continuously. The engineering problem is no longer only “can the strategy produce a decision?” It becomes “can the entire system remain coherent, observable and bounded when no human is watching every event?”

02

PROBLEM

Strategy logic, broker state, order execution and risk can drift apart if they are tightly coupled or treated as one function. Autonomous operation also creates failure cases that interactive software can hand back to a human but background software must handle explicitly.

03

IDEA

Separate strategy from authority. AI-assisted analysis can assemble evidence and propose a paper action, but deterministic policy, approval and risk layers decide what may proceed. Broker state is reconciled as external truth, and every meaningful decision remains inspectable afterward.

04

SYSTEM

The current broker focus is Alpaca. The system is structured around market data, strategy evaluation, rules, risk, order decisions, broker integration, persisted position state, monitoring and audit logs.

05

ARCHITECTURE

A deliberately separated flow keeps data, decision-making and operations inspectable.

  1. 01MARKET DATA
  2. 02SIGNAL / STRATEGY
  3. 03RULE ENGINE
  4. 04RISK LAYER
  5. 05ORDER DECISION
  6. 06BROKER API
  7. 07POSITION STATE
  8. 08MONITORING
  9. 09AUDIT LOG
06

INTERFACE

The operator view should emphasize state and control: current strategy state, positions, queued or completed decisions, risk blocks, broker reconciliation and system health.

07

TECHNICAL DECISIONS

A few decisions shape how this system behaves.

  • Put risk controls between strategy output and broker execution.
  • Treat Alpaca/broker state as an external source that must be reconciled rather than assumed.
  • Persist enough decision context to explain what the system believed when it acted or declined to act.
08

CHALLENGES

The interesting engineering work lives at the boundaries and failure modes.

  • Market state changes while network requests and orders are in flight.
  • A local process that runs continuously needs recovery and restart behavior, not only happy-path logic.
  • Automation can amplify errors unless risk and operational limits are independent of strategy logic.
09

LESSONS

The system has reinforced several recurring engineering principles.

  • Autonomy increases the value of audit logs and state reconciliation.
  • Observability is a control mechanism, not merely a debugging convenience.
  • The safest automated system is one designed to stop or decline action when its state is uncertain.
10

CURRENT STATUS

Working paper-only engineering platform focused on Alpaca, review-first operation and fail-closed authority boundaries. The project demonstrates software architecture and operational controls, not investment performance.

11

WHAT'S NEXT

Continue hardening retrieval-grounded research, evaluations, broker reconciliation, monitoring, explicit human-in-the-loop approvals and safe recovery behavior before considering any wider authority.