Docs
How the Paper Agent works
PAPER ONLY — no real money
Three rules-based agents trade Robinhood Chain stock tokens with fake money. No wallet, no real orders, no AI model making calls. Every decision is stored with a plain-English reason and shown in a public log.
Agents and rules
Each agent starts with $10,000 paper, is long-only, and holds at most one position per asset. Universe: NVDA, TSLA, AAPL, AMZN, SPY, GME. Indicators use the last 26 closed 15-minute bars, so the first 25 bars of the window are warm-up only.
| Agent | Buys when | Sells when |
|---|---|---|
| Glide Momentum | Price is above its 20-bar average and up at least 0.6% over the last 4 bars (1 hour). The 4 bars must be in the same session, so an overnight gap never counts as momentum. Glide makes no momentum entries in the first hour of a session. | Price closes below its 20-bar average, or falls 2% from the highest close since entry (trailing stop). |
| Plumb Mean reversion | Price is 2 or more standard deviations below its 20-bar average (z-score ≤ −2.0). | Price is back at its 20-bar average (z ≥ 0), or is 3% below entry (stop). |
| Dipper Dip buyer | Price closes 2.5% or more below its highest close of the last 26 bars (about 1 trading day). | +2% take-profit, or −4% stop, or 52 bars (2 trading days) have passed. |
After selling an asset, an agent waits 1 hour (4 bars) before it can buy that asset again. During market hours, if an agent doesn’t trade on a run, it logs one HOLD note. The note names the asset closest to its entry rule, any asset in cooldown, and any buy signal skipped because paper cash ran low.
Price source
Reference price: 15-minute bars of the underlying stock from Yahoo Finance (free, no key), fetched server-side by the Worker. Stock tokens on Robinhood Chain are designed to track their underlying share, so the agents use the stock price as the token’s reference price.
Not yet included: the on-chain token price itself, which can trade at a premium or discount to the stock. Reading it is on the Planned list. Only regular US session bars are used, taken from Yahoo’s per-day trading periods, so early-close days (13:00 New York time) are handled. A bar is used only after it has closed.
Paper fills
- Fills happen at the close of the 15-minute bar that triggered the rule. Times in the log are bar-close times in UTC.
- Position size: up to $2,000 paper per buy, capped by remaining paper cash. A signal with under $250 of paper cash left is skipped.
- No fees, no slippage, fractional units. Real trading would do worse than this.
- Paper P&L on SELL rows is realized: units × (exit − entry). Open positions are marked at the last closed bar.
Replay vs live
So the desk wasn't empty on day one, the Worker's first run replayed the previous 5 trading days of real 15-minute bars through the exact same rules. Those rows are tagged REPLAY. Every row the cron writes after that is tagged LIVE. Balances carry over from the replay into live trading. You can filter the log to live rows only.
How it runs
- Cloudflare Worker with a cron trigger every 15 minutes. It fetches bars, processes only bars it hasn't seen (a cursor per asset), runs the three agents, and writes everything in one D1 transaction.
- Cloudflare D1 (SQLite) stores decisions, equity snapshots, run history and agent state.
- If a price fetch fails for any asset, the whole run is skipped and logged as an error. The next run catches up, so assets stay in time order.
- This site is static HTML/CSS/JS on Cloudflare Pages. A small Pages Function forwards
/api/*to the Worker, so the API shares the site’s address. The page refreshes every 60 seconds. No API keys exist anywhere in the front end.
Public API
Read-only JSON, CORS-enabled, served from this site’s own address. Responses are cached at the edge for about 15 seconds (new bars arrive every 15 minutes), and a best-effort per-IP limit also applies. Base URL: …
GET /api/state
→ agents (cash, equity, P&L, open positions, latest decision, equity curve),
lastRun, market hours, counts, liveSince, priceSource
GET /api/log?agent=glide|plumb|dipper&mode=live|replay&action=buy|sell|hold|trades&limit=1..200&before=<id>
→ { rows: [ { id, t, agent, symbol, action, qty, price, value, reason, pnl, pnlPct, mode } ], nextBefore }
GET /api/health
t is the bar's start time in Unix seconds. Add 900 to get the bar-close time shown on the site.
Limits
- This is a paper experiment. It's not a trading service, a signal service or advice. The agents' rules are deliberately simple and public.
- Results depend on the window. A few days of paper results tell you nothing about future results.
- Yahoo Finance is an unofficial free source and can be delayed or briefly unavailable. When that happens, the live bar on the site shows the error and nothing is invented.
- Outside US market hours, no new bars arrive, so there are no new decisions.
Not financial advice. Experimental software.