Beacon¶
Backtest Records¶
GET /beacon/backtests
Every stored backtest record, newest first (BN-162).
The enumeration Beacon View's search bar needs: which indices HAVE a
record, and when each was captured. One row per index — the record
store keeps the latest run only — and the row is deliberately thin;
/beacon/{index_id}/record serves the books.
A record that cannot be read is skipped with a warning rather than
failing the listing: one bad file must not hide every good one. Since
BN-174 "cannot be read" means the same thing here as at /record, and
the count of what was skipped is published beside the rows — a listing
silently short is indistinguishable from a complete one.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | BacktestRecordCollection |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Compare¶
GET /beacon/compare
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ids |
query | array of string | yes | Index 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.
Asset¶
GET /beacon/{index_id}/assets/{identifier}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_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 /beacon/{index_id}/attribution
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_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. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | AttributionView |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Submit Backtest¶
POST /beacon/{index_id}/backtest
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: BacktestRequest or null
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Successful Response | BacktestJobStatus |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Overview¶
GET /beacon/{index_id}/overview
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_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.
Backtest Record¶
GET /beacon/{index_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 BN-155 shaped and BN-158 finally serves: 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 index has never been backtested successfully — the same answer, and the same pointer, as the overview. Since BN-174 a record that cannot be parsed or validated answers the same way rather than 500ing: it is the document the listing skips, and a stored artefact the server cannot interpret is indistinguishable, from here, from one that was never written. The fault is logged at WARNING.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | BacktestResultSummary |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Weights¶
GET /beacon/{index_id}/weights
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_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 index'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. Requires risk=true. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | WeightsView |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.