Andrew Parra ES

Lab · Markets

TradeTorch

A personal trading lab: one rule-based trading agent plus paper-money “desks” that have to prove an idea before it could ever touch real money.

Status
Live · paper money only
Who uses it
Andrew only, behind a passcode.
Built with
Node.js on Netlify Functions + Blobs · Python backtests · Alpaca (paper) · SEC EDGAR · Kalshi · Polymarket · Claude API

The chain of checks, as it stands today

→ Order request

  1. 1Armed✕ Stopped here: ships disarmed
  2. 2Real-money switch
  3. 3Market open
  4. 4Cash only
  5. 5Drawdown kill switch
  6. 6Order cap
  7. 7Daily loss stop
  8. 8Position limit
  9. 9Insider-selling veto
  10. 10One order a day

log · stopped at check 1 (armed: no) · no order placed

Hypothesis ledger

Market-regime buy filterPrediction frozenGraveyard

Tested and dropped. Regime is now reported, not traded on.

The 10-point gate before real money

  • Beat dollar-cost averaging
  • Profitable without the best two trades
  • Drawdown under 15%
  • Survives doubled costs
  • Beats random entries
  • Sealed holdout, used once
  • Pre-mortem written
  • + 3 more checks in the full gate

0 ideas have passed the gate

“Each run walks a fixed chain of checks and logs which one stopped it.” Nothing has passed the gate yet, so today every request stops at the first check.

The problem

Most trading ideas look good in hindsight and fail live. TradeTorch puts every idea through a pre-registered test and a forward paper test first, and records failures as carefully as successes. The default answer is “not yet”.

How it works

A rule-based agent, no AI judgment

One symbol, a small cap, checked every few minutes in market hours. Each run walks a fixed chain of checks and logs which one stopped it: armed, real-money switch, market open, cash only, drawdown kill switch, order cap, daily loss stop, position limit, insider-selling veto, one order a day.

Paper desks

An S&P 500 dip rule, frozen daily “buy today?” calls scored five days later, Kalshi weather markets against the National Weather Service forecast, a Polymarket copy desk and favorites test, a logical-arbitrage scanner and a sports-lines logger. All simulated.

Hypothesis ledger

Every idea is written down before it is tested, its prediction frozen, with at most three rewrites before it is killed or graduates. Killed ideas go to a “graveyard” that new ideas must explain themselves against.

Losing-trade autopsy

A critic tags only the losing trades, code computes each tag’s share of the loss, and at most one fix is allowed, retested from scratch.

Nightly integrity check

If a desk’s ledger doesn’t reconcile, that desk reads UNKNOWN everywhere.

Read-only terminal

Sharpe, Sortino, value-at-risk and similar, with no order ticket.

Where AI fits

  • Scheduled review routines: a weekly critic, a Sunday autopsy and lessons notes, all read-only.
  • A separate AI paper desk where Claude proposes trades and code enforces every limit.
  • The live agent itself uses no AI. “Math in code, judgment in model, veto in code.”

Guardrails

One path to an order

Only one function in the codebase can place an order, and every rule applies to manual and scheduled runs alike.

Ships disarmed

Real money needs a host setting only Andrew can set, a typed “ARM” and small caps. Nothing has passed the gate yet.

Paper means paper

Options, prediction markets, sports and crypto are paper only; tests fail if broker code is imported there.

Frozen risk rules

Changing the risk layer fails CI without Andrew’s recorded approval. Claude can read the brokerage account but never place an order.

Engineering notes

A 10-point gate before real money

Beat dollar-cost averaging, stay profitable without the best two trades, keep drawdown under 15%, survive doubled costs, beat random entries, use a sealed holdout once, and write a pre-mortem.

Rejected ideas stay rejected

A market-regime buy filter was tested and dropped; regime is now reported, not traded on.

Cost-aware polling

Checks were cut from every minute to every 15 minutes after the first schedule used up the hosting allowance.

What’s next

Each desk collects around 100 settled results before a verdict. Other ideas stay in shadow mode until Andrew decides.