Skip to content

The terminal, programmable.

Write strategies in Python with an AI assistant, backtest them on Olypse history and run them on paper against the live tape.

Preview of the Olypse Sandbox: a code editor with a file list, a terminal and an AI assistant. Asked for a bot that follows Kalshi whale fills of $25,000 or more on the Fed's October decision, the assistant proposes a new file, strategies/fed_whales.py, as a diff and cites two sources. The edit is accepted, the file opens in the editor and the strategy runs on paper: the status reads Running, and the terminal shows a $31,600 whale buy followed by a 100-share paper buy of Yes at 41 cents.

How the Sandbox works

Write it, or describe it

Python in a real editor, or a plain request to the assistant. Every edit waits for your Accept.

A starter strategy open in the editor, above the assistant's message box with a request being typed in Write strategy mode.

Test it on the past

Replays Olypse history with each venue's fees and next-bar fills. Nothing from the future leaks in.

The backtest setup for examples/mean_reversion.py as one panel of chips: a 30-day UTC window, $10,000, 15-minute bars, venue fees on with a 2-second order delay, and a Run backtest button.

Run it on paper

Live data, paper orders only, in your browser. It stops when you press Stop or close the tab.

The runner reads Running, with its token's expiry and a Stop button, above a terminal where a whale-follower bot sees a $41,600 buy and places a 2-share paper buy.

01 — Assistant

It reads the traceback. You review the diff.

The assistant writes, fixes and explains your code with the Sandbox SDK reference in context. Every edit is a diff you accept or reject, and it is asked to cite a source for each market figure it quotes.

A live run of strategies/cpi_momentum.py stopped with a TypeError on line 22. In Fix error mode, the assistant explains that live runs start with the positions an earlier run left, so the strategy held 100 shares while its entry time was still empty; it cites the Strategy API and the open position, and proposes a two-line guard as a diff with Reject and Accept buttons.

A live run of strategies/cpi_momentum.py stopped with a TypeError on line 22. In Fix error mode, the assistant explains that live runs start with the positions an earlier run left, so the strategy held 100 shares while its entry time was still empty; it cites the Strategy API and the open position, and proposes a two-line guard as a diff with Reject and Accept buttons.

02 — Backtest

Replay the tape. Count every cost.

Run the same code over Olypse's price history. Each bar arrives only once it was knowable, orders fill on the next bar at the bid or ask, and each venue's fees are charged.

A short loop of the backtester as a board of panels for strategies/cpi_momentum.py. The toolbar holds the setup (Sep 10 – Oct 9, $10,000, 15-minute bars, venue fees on, a 2-second order delay) and Run backtest. Once it is pressed, all eight lines of the Equity panel draw in together (the equity, its realised P&L, the spread taken away and doubled, harsher fills, and nearby hold and trigger settings). The Result panel then shows +$59.34 net after costs (+0.59%), the verdict that 22 positions on one event are too few to judge, +$158.50 before costs, a $22.42 maximum drawdown, a 59% win rate, a daily Sharpe of 4.83, 22 positions from 44 fills, $74.66 in fees and four time folds that all made money (+$19.94, +$7.44, +$20.41 and +$11.55). Under them, Robustness and costs replays the run with the spread at none, as modelled and doubled (+$83.84, +$59.34 and +$34.84, venue fees kept), notes that at double it keeps at least half of its P&L and that the modelled spread takes 29% of it, lists the $99.16 of costs and splits the positions into halves (+$27.38 on 12, +$31.96 on 10); Monthly returns lays the days out as a Monday-to-Sunday calendar tinted by gain and loss. Over the board's lower right, the strategy file is open in the editor: a comment that it buys YES after a 3-cent rise over the last hour and sells 12 hours later, the market, 100 shares, and the 12-hour hold. A crosshair on Sep 29 lists all eight values.

A short loop of the backtester's panels for strategies/cpi_momentum.py: all eight lines of the Equity panel draw in together (the equity, its realised P&L, the spread taken away and doubled, harsher fills, and nearby hold and trigger settings). The Result panel shows +$59.34 net after costs (+0.59%), the verdict that 22 positions on one event are too few to judge, and the figures; the robustness checks show both halves positive, a loss at twice the costs, one independent event of the 30 needed and no test on unseen data.

02 — Inside a run

The whole run, not just the total.

Every backtest returns the same report: each position after costs, every day, week and month, the costs scaled and replayed, the run cut into halves and folds, and the checks it fails. All of it in-sample, and labelled so.

The backtest setup bar: Sep 10 – Oct 9 (30 days), $10,000, Kalshi only, venue history, 15m bars, fees on with a 2-second delay, and Run backtest. Below it the Costs and fills panel is open: half-spreads of 1¢ on Kalshi and 0.75¢ on Polymarket where a bar has no quote, 0¢ slippage, a 2-second order delay, resting orders filling on the data's default, venue fees on their current schedules and comparison lines on.

Set up a run in one row

Up to 92 UTC days of the venues' history, or the research dataset's Aug 9 – Sep 21 capture, $1 to $10M of cash, bars from 1m to 1h. Spread, slippage, order delay and venue fees sit one click deeper.

The verdict, too few positions to judge: 22 positions on 1 event, where at least 30 positions on 30 independent events are needed. The robustness checks: both halves made money (+$27.38 and +$31.96), doubling every cost loses $39.82, there is only one event to take out, 1 of the 30 independent events needed, not enough events for a 90% range per contract, and no test on unseen data. Under them, the line every result carries: this replays past data with modelled fills and costs and does not show the strategy will make money live.

Checks that say no

Six in-sample checks on every result, never in a pass colour, and a verdict that names what fails first: here, 22 positions on one event are too few to judge.

The positions table for the run: 22 positions netting +$59.34, each 100 YES contracts on KXCPIYOY-26OCT-T3.0 bought at market and sold 12 hours later, with entry and exit prices, gross, costs, net, net per contract and the running total. The first is bought at 38¢ on Sep 10 at 17:30 and sold at 53¢ for +$11.60.

Every position, after every cost

Entry, exit, how it ended, gross, costs and net per contract, filterable and sortable. Click a row and the editor opens at the line that names its market, or at on_bar.

Robustness and costs. Halves split at Sep 25: +$27.38 on 12 positions and +$31.96 on 10. Four time folds, all of which made money: +$19.94, +$7.44, +$20.41 and +$11.55. The cost line: +$158.50 before costs, +$59.34 as modelled and −$39.82 with every cost doubled, from $99.16 of costs ($74.66 of fees and $24.50 of spread). The cost replays with venue fees kept: +$83.84, +$59.34 and +$34.84, with returns, drawdowns, Sharpe ratios of 6.84, 4.83 and 2.82, costs and 44 trades each; at twice the spread it keeps at least half of its P&L.

The same run, cut up and re-costed

Both halves and four time folds on one set of settings, every cost doubled on the same fills, and real replays with spread, impact and slippage at none, as modelled and doubled (fees kept). Every cost doubled loses $39.82; the doubled replay still keeps $34.84.

Monthly returns: September +$36.20 (+0.36%) and October +$23.14 (+0.23%); five ISO weeks from W37 to W41; and a calendar of every day from Thursday Sep 10 to Friday Oct 9, the best +$14.83 on Sep 28. Days, weeks and months all add up to +$59.34.

Every day, week and month

A Monday-to-Sunday calendar tinted by gain and loss, ISO weeks and months with their starting equity, and a line that checks they all add up to the engine's total.

Concentration: with its one market or event taken out nothing is left; without its best entry day (Oct 4, +$14.70) it keeps +$44.64, without the best two (Oct 4 and Sep 20) +$31.04. Nearby settings: this run +$59.34 on 44 fills, harsher fills +$15.34, an 8-hour hold +$33.08, a 16-hour hold +$69.98 and a 2¢ trigger −$19.28.

What the result rests on

The net with the top market, event or best days taken out, and the strategy replayed with one setting changed at a time: each line a real replay, not a probability range.

Compare, with two saved runs of the same window ticked: this one, shown, and one with venue fees off. Side by side: +$59.34 against +$134.00, returns of 0.59% and 1.34%, max drawdowns of 0.22% and 0.14%, Sharpe 4.83 and 10.87, win rates of 59.1% and 63.6%, and their equity curves overlaid by % return.

Saved as they finish, any three compared

Each finished run saves itself, up to 100. Tick up to three to read them side by side, with their equity overlaid as % return or in dollars.

  • One key from the code

    ⌘⇧B switches between the editor and the backtest. Finished runs save themselves under Saved runs.

  • Ask why

    One click sends the result to the assistant, which says what drove it and what to test next.

  • Data and assumptions

    The fill rule in plain words, the engine's warnings grouped, bar coverage per market and the hashes that reproduce the run.

  • Live against the backtest

    Set a paper bot's live fills beside a backtest of the same window, with the reasons the two can differ.

Bring your strategy to the tape.

Paper trading only. Bots run in your browser tab and stop when it closes.