start_test
Runs one of QuanterLab's ready tests on a stock or fund as a circuit of the lab's cards: the rule is tuned on past years only, then tested on the last three years, which the tuning never saw, against simply holding the same stock. It takes no settings to start: each test has its own default stock, below, and a test picked from get_started's card or named in words runs as it is.
Tests: mean_reversion (a fitted model that buys when the price has fallen unusually far below its recent
level; default KO), trend_following (a model that rides a trend while it lasts; SPY), momentum (holds
while the last few months were up; QQQ), buy_the_dip (buys after two days of sharp falls, the 2-day RSI
under 10; SPY), famous_rule (the 200-day line: hold above the 200-day average, cash below; SPY), and mvo
(a book of up to 20 stocks of an index picked each quarter by mean-variance optimisation, from the companies
in the index on that date; it takes `index`, not a ticker, and is set against holding the index's fund).
Its card draws the circuit as the lab does and lights each card as it runs, with the result under it.
get_primitives_run_progress follows it by its task_id; when it has finished it answers with the result,
report_url and offers, each with its exact call, the first one tracking the test live
(start_paper_trade). The circuit card shows the result, so a ready test needs no show_report_card.
Every account runs it within a daily allowance; a refused call does not count, and get_started and
every run's answer give today's count.
Args:
test: mean_reversion, trend_following, momentum, buy_the_dip, famous_rule or mvo.
ticker: Optional. The stock or fund to test it on, as its symbol ('AAPL', 'SPY'); else the test's own.
index: Optional, for mvo: nasdaq100 (its own) or dow30. The book on the S&P 500 does not run here
yet (more than a run here does in full in under a minute), and another index (the DAX, the
FTSE 100) has no dated members: pass what the person asked all the same, and QuanterLab answers
with its note and the same book on the Nasdaq 100, one tap away, and nothing runs.
settings: Optional. The one setting a test lets a person change, by name: mean_reversion
{"z_entry": 1 to 3.5}, trend_following {"trend_threshold": 0.25 to 3}, momentum {"months": 1 to
4}, buy_the_dip {"rsi_below": 2 to 30}, famous_rule {"days": 20 to 300}, mvo {"holdings": 5 to
30}, e.g. {"days": 100} for
the 100-day line; and on every test {"stop_loss": 0.5 to 30}, the lab's Stop Loss card added
under the forward test, which sells everything once the run has lost that many percent since the
start of the month. A test changed by talking ("use the 100-day line instead", "add a stop
loss") is the same call: the same test and stock and the last run's settings with that one change;
the card draws the changed circuit and runs it. Without settings the test runs as it stands.
question: Optional. One sentence restating what the run should answer, not the person's message: the
title of the report, and kept only as that.
study: Optional, instead of test. A published paper's id (from search or fetch). Unchanged, it answers
at once with the paper's registered result: the run its last registered window recorded, from that
window's date to the day it was recorded, and it uses none of today's runs. Changed (its settings)
or with to_today, it runs the paper's circuit from that window's date to today. It takes no ticker;
its `settings` are the settings the paper names (fetch lists them, e.g. {"symbol": "QQQ"} for which
fund, {"spread_bps": 20} for the trading cost), and a refusal names them.
to_today: Optional, with study. True runs the paper's circuit unchanged from its last registered window
to today, a run like any other: what the person asks for with "run it up to today", or a tap on
that offer after a paper's registered result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test | No | ||
| index | No | ||
| study | No | ||
| ticker | No | ||
| question | No | ||
| settings | No | ||
| to_today | No |