POST/shorts.v1alpha1.StrategyService/GetBacktestRun

GetBacktestRun

One canonical backtest run: the live version's published run (run_id 0), or a canonical run by id. A variant run, a gate-refused run or an unknown id is NotFound. A not-computable outcome fetched by id returns its stored state. The series is daily for windows of 500 sessions or fewer, weekly otherwise (series_resolution says which). Public and cached per instance.

Parameters

Connect-Protocol-VersionheaderRequired
number [1]

Define the version of the Connect protocol

Connect-Timeout-Msheader
number

Define the timeout, in ms

Request Body

application/json
object

Request for GetBacktestRun.

resolutionstring

"weekly" (default) or "daily". Daily is served for windows of 500 sessions or fewer. (proto string)

runIdintegerstring <int64>

0: the published run of the live version. Otherwise a canonical run of this strategy. (proto int64)

strategyIdstring

Required: a canonical strategy id. (proto string)

windowstring

since_2019_05 (default) | since_2023 | trailing_12m | live. live needs a paper track. (proto string)

Responses

200Success
application/json
object

Response for GetBacktestRun.

runobject

(proto shorts.v1alpha1.BacktestRun)

computableFromstring

not_computable: "" when the 50% threshold was never met. (proto string)

computableSharePctnumber <double>

not_computable: the measured universe share, when measured. (proto double)

engineMatchesLiveboolean

The run's engine is the running engine. (proto bool)

fiscalLabelstring

not_computable: the measured label; "" when none. (proto string)

fundamentalsLabelstring

The fundamentals policy, in words the surfaces print. (proto string)

hasComputableShareboolean

(proto bool)

inputChangeNotestring

The diff note against the previous run; "" when none. (proto string)

paperStartstring

The paper track's actual first recorded session; "" when the run has none. (proto string)

replayAgreementstring

"Replay agrees: 14 of 15 trades", or why it is not comparable. (proto string)

rulesMatchLiveboolean

The run's rules and recipe are the live ones. (proto bool)

runningSincestring

running: when the request started, RFC 3339. (proto string)

seriesResolutionstring

"daily" or "weekly": what the series carries. (proto string)

statestring

published | approximate | run_required | running | not_computable. (proto string)

stateReasonstring

Why the state is what it is, in words. (proto string)

strategyIdstring

(proto string)

windowIdstring

The window the series and window tables are served for. (proto string)

defaultError
application/json
object

Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation

codestring [canceled, unknown, invalid_argument, deadline_exceeded, not_found, already_exists, permission_denied, resource_exhausted, failed_precondition, aborted, out_of_range, unimplemented, internal, unavailable, data_loss, unauthenticated]

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

detailsarray

A list of messages that carry the error details. There is no limit on the number of messages.

Array Items:
messagestring

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

curl -X POST "https://api.shorted.com.au/shorts.v1alpha1.StrategyService/GetBacktestRun" \
  -H "Content-Type: application/json" \
  -d '{
  "resolution": "string",
  "runId": null,
  "strategyId": "string",
  "window": "string"
}'