πŸ”’ Private Access

DeadCatFound is in development.
Enter your access code to continue.

Incorrect access code.
← DeadCatFound
Courses Performance Live Trades
Track 01 β€” Autonomous SystemsM-01
Mission Brief & The Stack
Before you build anything, understand what you're building, why it matters, and exactly what each tool in the stack costs. Numbers up front. No surprises.

What an Autonomous Trading Firm Actually Is

A trading "firm" in this course is a collection of small autonomous AI agents β€” one for research, one for risk, one for execution, one for communications β€” coordinated by a CEO agent. Each agent has a single job, a defined personality, and the authority to act within its lane. Together they run a real trading operation while you sleep.

This isn't a chat interface. It's an operational system: agents wake up on a schedule, do their jobs, log their work, alert you to anything that needs attention, and shut down. No human in the loop unless something breaks.

By the End of This Course
You will have a working, autonomous, paper-trading firm running on your own machine. Six agents. Two strategies. Live IBKR paper account. Daily Telegram alerts. Auto-deploying public dashboard. Total monthly cost: ~$5-15 in AI tokens.

The Full Stack β€” What Each Tool Costs

Required Tools & Real Pricing (May 2026)
ToolWhat It DoesCost
PaperclipAgent orchestration platform β€” runs your agentsFree
Claude APIPowers each agent's reasoning~$0.25–$3 / M tokens
Codex / GPT-4oAlternative LLM if you prefer OpenAI~$5 / M tokens
IBKR (Interactive Brokers)Paper + live broker β€” the only one we useFree paper account
yfinanceHistorical & live market dataFree
Telegram Bot APITrade alerts to your phoneFree
Cloudflare WorkersHosts your dashboard publiclyFree tier
Python 3.14 + packagesThe runtime that ties it all togetherFree
Binance USOptional β€” crypto tradingFree API

Realistic Monthly Cost

A typical firm running 2 strategies, scoring 50–200 stocks/day, sending Telegram alerts, and refreshing a dashboard every 5 minutes spends roughly:

  • $5–15/month on Claude Haiku for routine scoring
  • $0–5/month on Claude Sonnet for complex reasoning (only when invoked)
  • $0 on everything else
Cost Optimization Tip
Use Claude Haiku 4.5 for bulk scoring (cheap, fast, good enough). Only escalate to Sonnet 4.6 when a decision genuinely needs better reasoning β€” strategy design, anomaly explanation, weekly review. This single rule cuts the API bill by 80%.

What You Need Before Starting

  • A Mac, Linux machine, or Windows WSL β€” anything that runs Python 3.14
  • ~20 GB free disk space
  • An IBKR account (free) with paper trading enabled
  • A Claude API key from console.anthropic.com
  • A Telegram account (for alerts)
  • ~3 hours to get the first version running
Track 01 β€” Autonomous SystemsM-02
Setting Up Your Firm
Install Paperclip, scaffold your firm's directory structure, and lay the foundation that every later module builds on.

Install Paperclip

Paperclip is the open-source agent orchestration platform we use. It runs as a single process on your machine, provides a chat UI, manages agent state, and exposes a clean Python API.

terminal β€” install paperclip
npm install -g paperclipai # Verify install paperclip --version # Start the local server paperclip start # Visit the UI open http://localhost:3100

Firm Directory Structure

Set up a clean directory layout from day one. The whole firm lives under a single folder you can version, back up, and migrate between machines:

project structure
my-firm/ β”œβ”€β”€ agents/ # Per-agent AGENTS.md identity files β”‚ β”œβ”€β”€ ceo/ β”‚ β”œβ”€β”€ research/ β”‚ β”œβ”€β”€ risk/ β”‚ β”œβ”€β”€ execution/ β”‚ └── comms/ β”œβ”€β”€ config/ # API keys, broker config, risk thresholds β”‚ β”œβ”€β”€ ibkr.json β”‚ β”œβ”€β”€ notifications.json β”‚ └── risk-thresholds.json β”œβ”€β”€ dashboard/ # Static HTML + JSON for public dashboard β”œβ”€β”€ memory/ # Strategy state, backtest results, daily logs β”œβ”€β”€ scripts/ # Python executors (sync, scoring, alerts) β”œβ”€β”€ strategies/ # Active and archived strategy specs └── ~/Library/LaunchAgents/ # launchd plists for scheduling

The First Three Config Files

Before writing any agent code, fill in these three files. They are the truth source for the rest of the firm:

config/ibkr.json
{ "host": "127.0.0.1", "port": 7497, "account": "YOUR_PAPER_ACCOUNT_ID", "mode": "paper" }
config/notifications.json
{ "telegram_token": "123456789:ABC-xyz...", "telegram_chat_id": "YOUR_CHAT_ID", "claude_api_key": "sk-ant-..." }
Hard Rule β€” Never Skip
config/ibkr.json mode must stay "paper" at all times until your strategy has passed all validation gates. Every executor in the firm hard-blocks on this value. Switching to live requires explicit board approval. Add the file to .gitignore so secrets never get committed.
Track 01 β€” Autonomous SystemsM-03
Designing Your Agents
Six agents. Each one with a single job. Each one with a written identity file. Together they run an entire firm.

The Hub-and-Spoke Topology

Agents do not talk directly to each other. They talk to the CEO agent, which routes work to whichever spoke agent is responsible. This keeps the system simple, traceable, and debuggable.

The Six-Agent Firm
AgentRoleAuthority
CEOOrchestrates the firm. Routes work, sets daily focus.Approves strategy changes, sets risk limits
ResearchScreens universe, identifies candidatesRecommends, never trades directly
Risk ManagementSizes positions, sets stops, monitors drawdownCan veto any trade
ExecutionPlaces, monitors, cancels orders via IBKROnly acts on Risk-approved trades
CommunicationsTelegram alerts, daily summaries, error reportsRead-only across firm
ComplianceAudits trades, checks for policy violationsCan halt the firm

The AGENTS.md File

Every agent has a single Markdown file that defines its identity: role, responsibilities, allowed tools, escalation rules, and tone. This is the agent's constitution. Get this right and everything downstream becomes easy.

agents/execution/AGENTS.md
# Execution Agent ## Role You are the Execution Agent for a paper-trading firm. You place orders at Interactive Brokers via the IBKRExecutor module. You are the only agent that can submit, modify, or cancel orders. ## Authority - Place bracket orders (entry + stop + target) when Risk approves - Cancel orders on Risk or Compliance request - Close positions on Risk override ## Hard Rules 1. NEVER trade without explicit Risk Agent approval 2. NEVER trade if config/ibkr.json mode != "paper" 3. NEVER place a position larger than risk_thresholds.json::max_position_pct 4. ALWAYS log every action to logs/execution.log ## Tools Available - IBKRExecutor.place_bracket() - IBKRExecutor.close_position() - IBKRExecutor.cancel_all() - IBKRExecutor.get_positions() ## Escalation - TWS unreachable for >60s: alert CEO and Comms - Order rejection: include rejection reason in escalation - Daily P&L exceeds threshold: halt and escalate to Compliance ## Tone Terse. Factual. No editorializing. Log line per action.
Design Principle
Agents should have narrow authority and broad observability. Each agent can read everything but write only in its lane. This makes failures localized and the system explainable.
Track 01 β€” Autonomous SystemsM-04
Strategy Design
A trading strategy is a contract: under condition X, take action Y, with stop Z. Here's how to write that contract so the agents can execute it without ambiguity.

The Two Live Strategies

This course teaches you to build two complementary strategies that the firm currently runs:

Active Strategy Portfolio
StrategyCapital ShareUniverseRebalance
Momentum v1075%40 large-cap US equitiesWeekly (5-day cadence)
Lev ETF v225%11 curated 2x/3x leveraged ETFsWeekly (5-day cadence)

The Strategy Spec β€” A Real Example

Every strategy is a Markdown document in strategies/active/. The format is rigid because the agents read it programmatically:

strategies/active/momentum-v10.md
# Momentum v10 ## Universe 40 large-cap US equities with avg daily volume >$500M. Symbols: AAPL, NVDA, MSFT, GOOGL, AMZN, META, TSLA, ... (see config) ## Signal Rank universe by 30-day total return (anti-lookahead: use .shift(1)). Top 5 ranked stocks become candidates. ## Filter Layer - VIX must be < 25 (or scale size to half) - SPY must be above its 50-day SMA (regime filter) - Each candidate scored 0-100 by Research Agent via Claude Haiku ## Entry Market buy at next session open, equal weight among top 3 by score. ## Risk Template - Stop loss: -8% from entry - Profit target: +20% from entry - Max position: 25% of strategy capital - Max concurrent positions: 5 ## Exit Rules - Stop or target hit (broker bracket order) - Stock falls out of top 10 by rank β€” close at next open - Strategy capital drawdown > 15% β€” halt all new entries ## Capital 75% of trading capital (config/trading_capital.json)

The Three Strategy Templates

For risk consistency, the firm uses only three pre-defined risk templates. Every position must fit one:

Risk Templates
TemplateStopTargetMax PositionUse For
Conservative-5%+10%10% capitalPosition trades, low-vol stocks
Standard-8%+20%25% capitalMomentum names, mid-vol
Aggressive-12%+30%40% capitalLev ETFs, crypto
Track 01 β€” Autonomous SystemsM-05
Backtesting
Before any strategy gets paper capital, it must survive a brutal backtest. Here's the framework β€” including the lookahead-bias trap that kills most retail strategies.

The Anti-Lookahead Rule

The single most common backtesting mistake is using today's data to make today's decision. In real life, today's close prints after the market closes β€” you can only act on it the next day. Every signal calculation in the firm uses .shift(1).

scripts/backtest_momentum.py
import yfinance as yf import pandas as pd UNIVERSE = ["AAPL","NVDA","MSFT","GOOGL","AMZN","META","TSLA","NFLX","AVGO","AMD"] # Pull 2 years of daily data data = yf.download(UNIVERSE, period="2y", interval="1d")["Close"] # Compute 30-day return signal β€” SHIFTED to prevent lookahead bias signal = data.pct_change(30).shift(1) # Each day, rank symbols by signal, pick top 3 top3 = signal.apply(lambda row: row.nlargest(3).index.tolist(), axis=1) # Compute forward 5-day returns for those picks fwd_returns = data.pct_change(5).shift(-5) # Realized strategy return strategy_returns = [] for date, picks in top3.items(): if not isinstance(picks, list): continue daily_avg = fwd_returns.loc[date, picks].mean() strategy_returns.append(daily_avg) # Stats import numpy as np returns = pd.Series(strategy_returns).dropna() sharpe = (returns.mean() / returns.std()) * np.sqrt(252) print(f"Sharpe: {sharpe:.2f}") print(f"Win rate: {(returns > 0).mean()*100:.1f}%") print(f"Total return: {(1+returns).prod()-1:.2%}")

The Validation Gates

A strategy must pass all of these on the backtest before earning paper capital. These are non-negotiable.

Backtest Gates
MetricMinimumReason
Trades over backtest> 50Statistical significance
Win rate> 52%Edge over coin flip
Profit factor> 1.25Wins must significantly exceed losses
Sharpe ratio> 1.0Risk-adjusted return
Max drawdown< 25%Survivability
Cost/Gross ratio< 100%Strategy survives transaction costs
The Walk-Forward Test
A passing backtest is not a passing strategy. Always do a walk-forward test: optimize on Jan 2020 – Dec 2023, then test untouched on Jan 2024 – present. If performance collapses out-of-sample, you've overfit. Re-design or kill.
Track 01 β€” Autonomous SystemsM-06
Live Execution
Now the Execution Agent comes online. This is where signals become orders, orders become positions, and the firm starts trading paper capital.

The Bracket Order Pattern

Every position the firm opens is a bracket order: one atomic submission containing the entry, the stop-loss, and the profit target. If you place these separately, you risk a partial fill leaving you exposed. Bracket = atomic = safe.

scripts/ibkr_executor.py β€” place_bracket
from ibapi.client import EClient from ibapi.wrapper import EWrapper from ibapi.contract import Contract from ibapi.order import Order def place_bracket(symbol, qty, action, stop_price, target_price): """ Place entry MKT + stop-loss + profit target as one atomic bracket. Critical: eTradeOnly=False and firmQuoteOnly=False or paper rejects. """ entry_oid = next_oid stop_oid = next_oid + 1 target_oid = next_oid + 2 # Entry β€” transmit=False until all legs queued entry = Order() entry.orderId = entry_oid entry.action = action entry.orderType = "MKT" entry.totalQuantity = qty entry.eTradeOnly = False entry.firmQuoteOnly = False entry.transmit = False # Stop-loss stop = Order() stop.orderId = stop_oid stop.action = "SELL" if action == "BUY" else "BUY" stop.orderType = "STP" stop.auxPrice = stop_price stop.totalQuantity = qty stop.parentId = entry_oid stop.eTradeOnly = False stop.firmQuoteOnly = False stop.transmit = False # Target β€” transmit=True triggers all target = Order() target.orderId = target_oid target.action = stop.action target.orderType = "LMT" target.lmtPrice = target_price target.totalQuantity = qty target.parentId = entry_oid target.eTradeOnly = False target.firmQuoteOnly = False target.transmit = True app.placeOrder(entry_oid, contract, entry) app.placeOrder(stop_oid, contract, stop) app.placeOrder(target_oid, contract, target)
Paper Account Gotcha
Newer IBKR ibapi versions default eTradeOnly=True and firmQuoteOnly=True. Paper accounts reject these silently with error 10268. Always set both to False on every order, every leg.

The Daily Execution Loop

The Execution Agent runs once per day at market open + 5 minutes. Here's what it does:

  1. Read today's signal output from Research Agent
  2. Read Risk Agent's approval matrix (which trades cleared)
  3. For each approved trade, calculate position size from config/trading_capital.json
  4. Submit bracket order via IBKR
  5. Confirm fill via orderStatus callback
  6. Log trade to memory/trades.log
  7. Ping Comms Agent to send Telegram alert
Track 01 β€” Autonomous SystemsM-07
Risk Management
The Risk Agent has veto power over every trade. Without it, the firm is a runaway script. With it, the firm is a disciplined operator.

The Risk Threshold File

All risk limits live in one config file. This single file is the firm's risk policy β€” change it deliberately, review it monthly:

config/risk-thresholds.json
{ "max_position_pct": 25, "max_concurrent_positions": 5, "max_strategy_drawdown_pct": 15, "max_firm_drawdown_pct": 20, "vix_high_threshold": 25, "vix_extreme_threshold": 35, "halt_on_consecutive_losses": 5, "min_account_reserve_usd": 1000 }

Quarter-Kelly Position Sizing

The Kelly Criterion tells you the mathematically optimal bet size β€” but full Kelly bankrupts you on the first bad streak. The firm uses quarter-Kelly: take 25% of what Kelly recommends. Significantly safer, captures most of the geometric return.

Quarter-Kelly Formula
position_pct = 0.25 Γ— (win_rate Γ— avg_win βˆ’ loss_rate Γ— avg_loss) / avg_win

Example: 60% win rate, avg win 10%, avg loss 5% β†’ Quarter-Kelly suggests ~10% per position. Capped at max_position_pct.

The Veto Conditions

The Risk Agent rejects a trade if any of these is true. No exceptions, no override without CEO sign-off:

  • Position size exceeds max_position_pct
  • Strategy already holds max_concurrent_positions
  • Strategy is in drawdown > max_strategy_drawdown_pct
  • Firm is in drawdown > max_firm_drawdown_pct
  • VIX is above vix_extreme_threshold
  • Last 5 trades in this strategy were losses (halt_on_consecutive_losses)
  • Account cash buffer would drop below min_account_reserve_usd
Track 01 β€” Autonomous SystemsM-08
Going Live & Operations
The firm is built. Now it has to run every day with zero human intervention. Schedule, alert, monitor, recover. Here's the operations layer.

The launchd Stack

On macOS, launchd schedules every recurring job. Each agent has one plist:

~/Library/LaunchAgents/com.firm.execution.plist
<?xml version="1.0" encoding="UTF-8"?> <plist version="1.0"> <dict> <key>Label</key><string>com.firm.execution</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/python3.14</string> <string>/Users/you/my-firm/scripts/execution_agent.py</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key><integer>9</integer> <key>Minute</key><integer>35</integer> <key>Weekday</key><integer>1</integer> <!-- Mon-Fri set via 5 entries --> </dict> <key>StandardOutPath</key><string>/tmp/execution.out</string> <key>StandardErrorPath</key><string>/tmp/execution.err</string> </dict> </plist>

The Heartbeat

Every 5 minutes, a heartbeat script writes the current firm state to dashboard/trades.json and sends an OK to Telegram if anything changed. If three consecutive heartbeats fail, the Comms Agent escalates to your phone with a πŸ”΄ alert.

The Validation Gates β€” Paper to Live

The firm stays on paper until it earns the right to go live. The gates are absolute β€” no exceptions:

Paper β†’ Live Gates
GateThresholdWhy
Completed trades> 30Sample size
Win rate> 52%Edge
Profit factor> 1.25Wins exceed losses
Max drawdown< 15%Survivability
Consecutive trading days clean> 20Operational reliability
Board approvalExplicit sign-offHuman in the loop
When You Flip the Switch
Going live is a one-line change: config/ibkr.json::mode from "paper" to "live", and config/ibkr.json::port from 7497 to 7496. Then restart all agents. Every executor was built to fail closed on missing config β€” so flipping is safe but should never be done without all gates passing.

You've Built the Firm. Now Get the Prompts.

This course gave you the architecture. The Prompt Arsenal gives you every copy-paste prompt used to build it β€” agent identities, executor code, backtest logic, dashboard infrastructure.

βœ“ All 5 agent AGENTS.md prompts (CEO, Research, Risk, Execution, Comms)
βœ“ Executor code generation prompts (equity momentum, crypto hybrid)
βœ“ Backtest framework prompt
βœ“ Dashboard + heartbeat + launchd suite
Access Prompt Arsenal β€” Free β†’
⚠ Important Disclaimer

DeadCatFound is an educational platform only. We are not a registered financial advisor, broker-dealer, investment advisor, or financial institution of any kind. Nothing in this course constitutes financial advice, investment advice, or any recommendation to buy or sell any security.

All content is for educational and informational purposes only. Trading involves substantial risk of loss. Always consult a licensed financial professional. By accessing this course you acknowledge that DeadCatFound bears no liability for any financial outcomes.