Home - sandhya1631/agentic-paper-trader GitHub Wiki

Project Overview

Agentic Paper Trader is an autonomous software engineering framework that connects a Large Language Model (LLM) to a paper trading sandbox (Alpaca) through deterministic tool calling, hardcoded safety guardrails, and full audit logging. Rather than focusing on generating trading profit, the project is centered on applied software engineering: building a reliable agent orchestration layer, safe tool-calling execution, and an observable full-stack system around it.

Project vision

Our vision is a fully autonomous trading agent capable of ingesting live market data, reasoning about complex multi-factor trading strategies, and independently managing a portfolio across many asset types and market conditions with minimal human oversight — while remaining fully transparent and auditable in every decision it makes.

Project Scope

For this semester, the scope is narrowed to a single-broker MVP built around the Alpaca Paper Trading API. The system will:

  • Ingest live OHLCV market data and compute deterministic technical indicators (RSI, SMA)
  • Use an LLM to reason over that data and propose Buy/Sell/Hold decisions via structured function calling
  • Enforce hardcoded risk guardrails (cash checks, max position limits) before any trade executes
  • Execute approved trades against the Alpaca paper sandbox
  • Log every decision, rationale, and trade to a PostgreSQL audit trail
  • Display live portfolio performance and agent reasoning on a React web dashboard

Roles

  • Project Lead: Sandhya
  • Project Manager: Sandhya
  • Architect / Tech lead: Dhruv
  • Developers: Samruddhi, Sandhya, Dhruv
  • DevOps / Automation: Dhurv, Samruddhi
  • Test Engineer: Jared
  • UX Designer: Dhruv
  • Requirements Engineer: Jared

Project Risks

  • Defining "success" is subjective — a short-term loss can still be a good long-term decision, so trade outcomes alone won't be a fair measure of the project's success
  • A single semester (~3.5 months) isn't enough time to meaningfully evaluate real trading performance
  • Choosing a smaller/local LLM risks weaker reasoning and tool-calling accuracy; a cloud LLM adds ongoing cost
  • Testing against historical market data can distort results if that data overlaps with the model's own training
  • The project depends on third-party APIs (Alpaca, market data feeds) that could introduce rate limits or downtime
  • Streaming live data directly into the LLM risks flooding its context window; must rely on periodic polling instead
  • Incorrect or malformed tool calls from the LLM could trigger invalid or unintended trades
  • Allowing too much user customization of agent behavior could expand scope beyond what's achievable this semester

Assumptions

  • The project will integrate with a single paper trading platform (Alpaca) rather than multiple brokers
  • Live market data will be available throughout the semester via Alpaca/Polygon/yfinance at no significant cost
  • A cloud-hosted LLM will be used for reliable structured tool-calling and low latency
  • The agent will run on a scheduled polling cycle (e.g., every 5–15 minutes) rather than continuous real-time streaming
  • Success will be measured by functionality delivered (working agent loop, guardrails, dashboard, audit trail) rather than trading profitability
  • All trades will run against a simulated paper account — no real funds are involved
  • Risk guardrails will be deterministic/hardcoded rather than left to LLM judgment