← trdrbot.com Slide deck — a standalone document, hosted as-is
Alpaca AI Trading Agents Hackathon · paper trading

Theo knows the difference between being right and being lucky.

An autonomous options-trading agent that forms a falsifiable view, prices several ways to express it, sizes by a track record it has to earn, and afterwards scores whether its view was right, its structure was right — or it simply got lucky. Only the first two ever move its confidence.

trdrbot · built on Alpaca's MCP server · $100,000 paper account

Theo, trdrbot's elf mascot, working at a laptop beside a trdrbot mug
The problem

Over one week, profit and loss cannot tell skill from luck.

Most trading agents score themselves on P&L. We measured what that actually buys you over a hackathon-length window — and it is close to nothing.

69%

of the time a genuinely skilled agent with a 60% edge out-scores a coin flip over 20 trades. Barely better than a coin flip about the coin flip.

−7.8% … +8.2%

the range a zero-skill agent lands in over the same window. Any result in that band proves nothing at all.

1 in 3

roughly the chance a coin flip beats real skill. So a leaderboard over one week ranks variance, not ability.

Worse: an agent that learns from P&L alone reinforces whatever story happened to correlate with money. That is how a system acquires a superstition.

The idea

Theo asks two separate questions instead of one.

Theo thinking, with a rising chart in a thought bubble

Was the view right?  and  was the way I expressed it right?

Only one cell is unambiguous — held and profit, top left, genuinely earned. The two amber cells are still useful: a loss is informative whichever way it points, so both feed learning. The red cell is the trap: a profit on a failed thesis. P&L-based scoring treats that as strong confirmation. Here it teaches nothing, and it is excluded from what lets Theo size up.

Self-improving, concretely

Better calibration is not a dashboard metric. It is permission to bet more.

feedback loop

Outcomes score the claim

Every falsifiable claim is pre-registered before it resolves — traded or not. When it resolves, attribution asks which of the four boxes it lands in.

memory

Memory keeps what was useful

Four stores with four different jobs. Blocks that informed a decision are credited or decayed by that decision's verdict — never by its P&L.

the lever

Size is the reward

Demonstrated calibration raises the Kelly fraction the agent is allowed. Experience → reliability → larger size. No step rewards mere confidence.

And the deterministic half. The model never executes anything. Code wakes the agent, code runs the gauntlets, code computes Kelly, and code fires the exit rules — every 60 seconds, without asking. The LLM's job is narrow: form a view and propose ways to express it. Everything downstream of that is arithmetic that cannot be talked round.

The loop

Five stages, looped so the system can learn from itself.

01

Sense

Look at the world. Prices, positions, news, odds, technicals.

every 60s · no LLM

02

Think

Form a falsifiable view; price at least two ways to express it.

~15 min · LLM + arithmetic

03

Act

Place the multi-leg order, then verify it against broker truth.

Alpaca MCP

04

Learn

Guard the position deterministically; then judge it honestly.

every 60s · no LLM

05

Remember

Route what was learned to the store shaped to hold it.

four stores

attribution → calibration → permission to size
Stage 01 · Sense

Look at the world — cheap, automatic, every minute.

What it does

Refreshes account and position state from the broker, pulls news and prediction-market odds, and computes technicals, realised volatility, beta and a bootstrap forecast from each name's own return history.

Why it is built this way

  • No LLM here at all. Observation is not judgement. Sensing is arithmetic, so it runs every tick for almost nothing.
  • A stop checked hourly is worthless. The cost of not looking scales with what is at risk; the cost of looking scales with LLM spend. So the cheap half runs constantly and the expensive half rarely.
  • A failure renders itself. An empty news block means the world was quiet; “(unavailable)” means we could not look. Those are different claims.
subsystems
analyticsaccount, positions, quotes, book greeks
sensorsnews + Polymarket odds into one inbox
market_statstechnicals, realised vol, beta, bootstrap
reconcileour record vs the broker's truth

Measured live: SPY and QQQ correlate at 0.92 — so the research universe was rebuilt for low mutual correlation, not familiarity.

Stage 02 · Think

Three independent ways to have an idea — then one narrow job for the model.

research

Daily, top-down. Technicals + news + prediction-market odds → a regime page and company dossiers → falsifiable opportunities.

discovery

Bottom-up. The news nominates the companies. Every nominee must clear a deterministic gauntlet — technicals, forecast, fundamentals, options liquidity — before an LLM writes anything up.

the muse

Creative collision. Random concepts × news × odds, argued into domino chains, every candidate pre-registered and adversarially gated. The top two graduate.

what the LLM decides
  • A falsifiable thesis — a claim with a date and a level
  • At least two structurally different ways to express it
  • An honest probability, and a vol view if the trade is about vol
what the code decides
  • simulate_experiments prices every candidate under one declared measure — the thesis's own drift and vol, with the market's pricing beside it
  • size_position computes Kelly from the conditional payoff and shrinks the claim by measured calibration
  • A no-op is a logged, legitimate answer. Theo declines far more often than it trades.
Stage 03 · Act

Place the order, then double-check it against the broker.

What it does

Submits a genuine multi-leg options order through Alpaca's MCP server, stamps it with an idempotent client order id, then reconciles every leg against what the broker actually filled.

Why it is built this way

  • The model authors every tool argument. So a guard rewrites the order id before it leaves — without it, idempotency is whatever the model invented.
  • Risk is repriced from the fill, not from the model's word. Every book cap sums max_loss_usd; if that number came from a model and never met a fill, every later cap is denominated in fiction.
  • A whole-book close is refused above one open position, and an orphan found at the broker is adopted into the managed set rather than just logged.
the real order
classmleg — 2-leg vertical, one ticket
legsSPY260903P00766000 buy_to_open
SPY260903P00758000 sell_to_open
typelimit, net debit $1.70, day
idtheo-spy-bps-20260828-766758

Every position traces back to its reasoning through one position_id — journal, wiki, memory, and back to the broker.

Stage 04 · Learn

Guard the position without consulting the agent. Then judge it honestly.

the guard — every 60 seconds

Exit rules are the agent's own commitments, executed deterministically. One signal registry: every rule reads a signal, compares to a threshold, debounces. Thesis-level stops watch the underlying, not the noisy option mark.

An exit rule stated only in prose does not exist. Percentages mean what a trader means — a percent of the net debit paid, not of gross premium. On the wrong base, three of the four mark-based rules this book has ever carried could not fire at all.

the scoring — at the thesis horizon

Attribution waits for the horizon the claim named, then asks the two questions from slide 3. A profit on a wrong view is recorded as luck and teaches nothing.

Calibration then scores every stated probability with a Brier score and its Murphy decomposition — reliability (am I overconfident?) separated from resolution (do my forecasts actually separate winners from losers?).

Attribution is the distinctive signal, and it is deliberately expensive to earn: promotion past the second rung requires that most resolved theses were actually explicable. A book of luck is not competence, however good the P&L looks.

Stage 05 · Remember

Four stores, one for each kind of knowledge.

journal

Append-only events. What happened, when, and which model said so. The record, never rewritten.

1,239 rows

wiki

Stable reference that rewrites itself: position pages, company dossiers, the regime page.

markdown on disk

elfmem

Evolving memory with decay and reinforcement — and a ratified constitution of epistemic principles.

credited by verdict, not P&L

ledger

Every falsifiable claim ever made, traded or not — so the trial count a multiple-testing correction needs cannot be lost.

48 resolved

The ledger is the quiet one that matters most. Forecasts on setups we declined are scored too, at zero capital risk — and they are the only realistic route to a calibration sample that means anything inside a week.

Architecture

Where the model sits, and how little of the system it is.

calibration & attribution → the size the next trade is allowed SENSE analytics · sensors market_stats · reconcile every 60s · no LLM THINK research · discovery · muse simulate → size the only LLM judgement ACT Alpaca MCP · mleg order tool_guard · reconcile idempotent, verified LEARN exit_rules · attribution calibration · coach every 60s · no LLM REMEMBER journal — append-only events wiki — stable reference elfmem — evolving memory ledger — every claim

Chassis: one scheduler, a singleton lock, an ordered model fallback chain, and a health probe that asks every subsystem “you ran — but did you produce anything?”

Roughly 15,700 lines of Python · 535 offline tests · four trader-readable simulation scaffolds

Technology implementation

How Alpaca is used — and three things that were harder than they look.

MCP, one session per tick

Alpaca's MCP server runs as a local stdio subprocess. The adapter's default starts a fresh process per tool call — six calls cost 12.3s. Sharing one session across the tick cut it to 2.75s.

−78% wall clock, measured

Real multi-leg options orders

Verticals, condors and butterflies go as mleg tickets with per-leg position_intent. Calendars and diagonals are refused, not approximated — pricing the far leg needs a model we deliberately do not have.

a confident wrong payoff is worse than a refusal

Only 19 of 72 tools bound

Binding all 72 MCP tools cost ~21k tokens of schema per call, 71% of it for tools never used once — and a bigger menu measurably worsens tool selection.

$3.46 → $1.32 per decide cycle

The lesson that generalises. All three of those had already shipped as code that ran and did nothing: the option-chain compactor failed open against an envelope shape it did not recognise, the session was never actually shared, and the prompt cache was never asked for. Each looked healthy in the logs. That is why trdrbot health exists and asks a different question from the tests — “you ran, but did you produce anything?”

Worked example · 28 August 2026 · 1 of 3

Something happened in the world, and the equity market had not priced it.

Fed funds futures flipped intraday to price a September hike as more likely than a hold. Gold, Bitcoin and TLT all sold off. SPY did not — it had printed 775.30 before the remarks and sat at 769.07, down 0.3%, after a +5.7% run.

That asymmetry is the trade. Not a chart shape — a dated, causal claim that one market had repriced and another had not.

the thesis, as recorded

“SPY drifts modestly lower into 2026-09-03 as equities digest fed funds futures repricing.”

horizon 2026-09-03 · falsifiable · pre-registered before any order

Sense → Think, the actual tool calls
1get_stock_snapshot
2get_stock_bars
3get_clock
4get_news
5get_option_chain
6simulate_experiments
7size_position
8place_option_order
9record_position
Worked example · 2 of 3

Three ways to trade it. The easy-looking one failed the math.

CandidateWin ratePaysRisksVerdict
775/780 call credit spread76–92%$95$283 rejected looks safe because it usually wins
760 butterflylow$70 debit rejected needs the fall to stop exactly at 760; $22 of 4-leg friction
766/758 put debit spread42% 2.85 : 1$2,171 taken EV-positive even at the market's own drift

“Honest confidence 0.42. This loses more often than it wins. That is fine — it is the same trade logic as a 38% call spread with 3.8:1 payoff. I resisted rounding up to make it feel better; the number is scored.”

Theo's own decision record, 28 August
then size_position, not the agent
  • Kelly from the conditional payoff — E[win|win] / E[loss|loss], not the max/max ratio, which is measurably biased toward buying premium
  • The stated 42% shrunk by measured calibration before it sets size
  • Capped three ways at once: per-position, per-underlying, whole book
  • 13 contracts. $2,171 max loss — 2.14% of equity. The agent did not choose that number.
Worked example · 3 of 3

Five rules took over. Two questions get answered when the trade closes.

the guard, from the moment of the fill
profit target+140% of debit
stop−65% of debit
underlying stopSPY above 776
time stopexpiry day
leg divergencebroker truth vs ours

The agent named the underlying stop as the one it trusts most: if SPY makes new highs, the premise that equities haven't discounted the hike is simply false, and the position should die regardless of what the mark says.

where it stands

+19.6%

on net debit at last mark. But the P&L is not the question that moves anything.

what actually gets asked on 3 September
  • Did SPY close below the level the thesis named? → was the view right?
  • Given that answer, did this structure express it well? → was the expression right?

a profit with a wrong view scores as luck and moves nothing

Risk

Position size is earned, not chosen — and it is the only reward on offer.

EXPLORE

nothing — the starting allocation

10%book
5%one position
ESTABLISH

≥5 resolved theses

15%book
7.5%one position
SCALE

≥15 resolved, ≥60% attributable

20%book
10%one position
MATURE

≥40 resolved, ≥70% attributable, reliability <0.04

25%book
12.5%one position

Colour deepens with earned trust — MATURE's tint is the same green this deck uses for a genuinely earned outcome, nowhere else. Climbing costs evidence, not confidence: each rung names exactly what must be demonstrated, and none of them can be talked round.

  • Monotonic in evidence. More knowledge can never mean less size. Two separate ladder inversions shipped and were caught by an invariant test that sweeps the whole ladder rather than checking examples.
  • Asymmetric. Promotion needs a sustained record; a 5% drawdown demotes a whole tier immediately, and 10% goes back to the start.

Attribution is a promotion criterion, not a metric. This is the rung that makes “right vs lucky” cost something real.

Kelly refuses any structure with unbounded LOSS outright. Unbounded profit is fine — a long call is not a naked short.

Risk / reward · drag the sliders

How much risk to take depends on how sure you are the edge is real.

1.00×
50%

SPY's own resampled returns, fair-priced structure, the production sizer. Full explorer →

reward : risk

median gain when the view is right, against the loss when it is wrong

the honest reading

Results · paper account · as of 31 Aug 2026, 18:00 UTC

The P&L, and why we will not use it as proof.

equity$101,678

from a $100,000 start

return +1.68%

peak $102,432 · max drawdown 0.7%

positions3

2 closed at +8.2% and +52.8% on debit; 1 open at +19.6%

decide cycles95

82 ended in a deliberate no-op

Three positions over five days is not evidence of skill, and we can prove it rather than merely say it. That is exactly the range in which a zero-skill agent lands somewhere between −7.8% and +8.2%. We report the number plainly because it is real — and we built the calibration and attribution machinery precisely so there is something better than this number to judge us on.

The uncomfortable slide

The record says something we would rather it did not. Here it is anyway.

MeasureValueReading
resolved forecasts4812.4 effective — concentrated in a few names
Brier score0.2250.25 is a coin flip
reliability0.000well calibrated not overconfident
resolution0.000no discrimination forecasts are not separating winners from losers

Theo says 40% and it happens about 40% of the time — honest. But it has not yet shown that its 60%s come in more often than its 30%s — not yet skilful. Those are different claims, and only a decomposed score can tell them apart.

The size ladder already reflects this. Theo is still on the second rung of four. It has not promoted itself on a good week, because the criterion is attribution, not profit. The system that would let us hide this is the same system that found it.

Every threshold that matters needs ~50 resolved forecasts. The record is young and the ladder correctly says so.

Honest limitations

What Theo does not do — written down before a judge finds it.

Calendars are refused

Pricing the far leg needs a model we deliberately do not have. A confident wrong payoff is worse than a refusal.

One vol, not a smile

Per-leg IVs set the greeks and the vega-weighted vol, with the EV span across legs printed beside it — but a smile-consistent terminal distribution is refused for the same reason.

The first position can never be attributed

No thesis was recorded at entry. Fabricating one retroactively would be worse than the gap.

Declines are not yet scored

12 theses simulated, 1 traded. A decline that was right about vol and one that was right about direction are currently indistinguishable. Logged as an open issue.

No approval gate, by choice

Paper account, and gates block the feedback loop. What replaces it is stricter: the agent cannot execute a mistake the arithmetic refuses to compute.

Everything above is in the repo

A living bug ledger records every defect the moment it is found and removes it only in the commit that fixes it. 69 numbered issues so far.

Theo celebrating with both fists raised
In one sentence

Any agent can make money for a week. Theo can tell you whether it deserved to.

The distinctive thing here is not the strategy. It is that every claim is written down before it resolves, scored afterwards on whether the reasoning held, and allowed to change how much capital the next decision gets — with a lucky win worth exactly nothing.

Repogithub.com/…/trdrbot
Deep divethe risk research note · the interactive explorer
AccountAlpaca paper · $100,000 start
1 / 21