Skip to content

Backtests

Compare

GET /strategies/compare

Several strategies' latest runs on one axis, over the dates they all cover.

Parameters

Name In Type Required Description
ids query array of string yes Strategy ids to compare, two or more.

Responses

Status Meaning Body
200 Successful Response CompareView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Runs

GET /strategies/runs

Every strategy's latest saved run, newest first.

One row per strategy: the record store keeps the latest run only, and /strategies/{strategy_id}/record serves its books. A record that cannot be read is skipped and counted rather than failing the listing.

Responses

Status Meaning Body
200 Successful Response BacktestRecordCollection

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Asset

GET /strategies/{strategy_id}/assets/{identifier}

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
identifier path string yes

Responses

Status Meaning Body
200 Successful Response AssetView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Attribution

GET /strategies/{strategy_id}/attribution

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
start query string or null no Inclusive start date, YYYY-MM-DD.
end query string or null no Inclusive end date, YYYY-MM-DD.
reference_fields query string or null no Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns.

Responses

Status Meaning Body
200 Successful Response AttributionView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Submit Backtest

POST /strategies/{strategy_id}/backtest

Backtest a stored strategy, as a job.

The body is everything the strategy does not hold: the period, capital, costs, currency, dividends, benchmark, modelling assumptions, flows and vehicle. The strategy, its index and its implementation are the stored strategy's.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.

Request body: StrategyBacktestRequest or null

Responses

Status Meaning Body
202 Successful Response BacktestJobStatus

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Validate Backtest

POST /strategies/{strategy_id}/backtest/validate

What a backtest of the strategy would run, without running it.

The same body POST /strategies/{strategy_id}/backtest takes. Answers the fully resolved settings or every finding, each at its field's path.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.

Request body: StrategyBacktestRequest or null

Responses

Status Meaning Body
200 Successful Response BacktestValidation

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Holdings

GET /strategies/{strategy_id}/holdings

The strategy's holdings workflow at a date, one row per name: the universe narrowed to the index, the index's cap, the benchmark's weight, the strategy's choice, each implementation stage, the weight traded to at the rebalance in force, and as of the date its drift, held weight and units. The run's last day when no date is given.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
date query string or null no Date to report at, YYYY-MM-DD. Defaults to the latest rebalance.
reference_fields query string or null no Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns.

Responses

Status Meaning Body
200 Successful Response HoldingsView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Overview

GET /strategies/{strategy_id}/overview

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.

Responses

Status Meaning Body
200 Successful Response OverviewView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Periods

GET /strategies/{strategy_id}/periods

The latest run's figures in each calendar year, quarter or month, against its index and its benchmark: each period from the previous period's close, the first from the run's start, so the periods compound to the whole run.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
frequency query one of "annual", "quarterly", "monthly" no The calendar periods: years, quarters or months.

Responses

Status Meaning Body
200 Successful Response PeriodsView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Backtest Record

GET /strategies/{strategy_id}/record

The latest run's books, nested: the record, not the derived view.

BacktestJobStatus.result carries the run payload (rebased level, returns, drawdown), which is what a chart wants. This is the other half: the portfolio book with its day-zero NAV, bounded positions and weights with true totals, and the comparator books, null when the run had none.

Raises: DataNotFoundError: If the strategy has never been backtested successfully. A record that cannot be read answers the same, as the listing skips it.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
reference_fields query string or null no Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns.

Responses

Status Meaning Body
200 Successful Response BacktestResultSummary

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Result

GET /strategies/{strategy_id}/result

The strategy's latest successful run: the payload its job answered with, every series and record in it, kept across a restart. Each rebalance, unfilled order and price gap carries the reference columns of its names as they stood on its date.

Raises: DataNotFoundError: Until the strategy has been backtested.

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
reference_fields query string or null no Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns.

Responses

Status Meaning Body
200 Successful Response BacktestRunResult

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.

Weights

GET /strategies/{strategy_id}/weights

Parameters

Name In Type Required Description
strategy_id path string yes Letters, digits, dash and underscore; up to 64.
asof query string or null no Date to report at, YYYY-MM-DD. Defaults to the latest rebalance.
risk query boolean no Decompose the portfolio's volatility across its constituents. Off by default: estimating a covariance over every name is the pane's whole cost.
benchmark query string or null no Index id to measure tracking error against, calculated on its own. Requires risk=true.
reference_fields query string or null no Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns.

Responses

Status Meaning Body
200 Successful Response WeightsView

Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.