Backtester
v1.0.0Test a plain-words trading rule on historical prices and compare the trades with SPY.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_data List available data
List available price data, fields, dates, limits, and whether reports can be retained for publishing.
get_prices Get historical prices
Read historical prices for a run form. Needs only version and data.
| Parameter | Type | Description |
|---|---|---|
run * |
build_series Build data series
Build named time series from a run form. Needs version, data, and series.
| Parameter | Type | Description |
|---|---|---|
run * |
build_signal Build trading signals
Build named trading signals from a run form. Needs version, data, series, and signals.
| Parameter | Type | Description |
|---|---|---|
run * |
simulate Simulate past trades
Simulate historical fills and account balances. Needs the full run form.
| Parameter | Type | Description |
|---|---|---|
run * |
report Run a backtest report
Run a backtest and show its results. Supply strategyExplanation in plain terms for the widget. In your reply, explain the rule, always show Return vs. SPY (summary.returnVsSpyPct in percentage points, or Unavailable), and give one takeaway or limit supported by the report. Choose any additional cards using stats. Use scoreSeries for a separate score panel. Use chartSeries to select named report series and set their legend labels, line or bar types, colors, and line patterns. Keep the interpretation about this historical test. To publish this exact result later, pass its reportId to save_strate…
| Parameter | Type | Description |
|---|---|---|
run * | ||
chartSeries | ||
scoreSeries | string | Named report series to draw in the separate score panel. |
stats | ||
strategyExplanation |
list_strategies List saved strategies
List published website strategies, their URLs, and their current keys. Use a current key as expectedKey only when the user asks to replace that saved strategy.
save_strategy Publish a report to the public website
PUBLIC: anyone can see the saved page. Publish a completed report to the public website after the user asks to save it. Use the reportId returned by report, a public slug, and client-authored page and presentation choices. Never submit or invent result numbers. Adds it to the strategy directory without rerunning the strategy. Existing slugs require expectedKey to replace a different result. setAsHome changes the home page only when explicitly requested.