Start Backtest Run
curl --request POST \
--url https://api.example.com/api/graph/v1/backtest/v2/run \
--header 'Content-Type: application/json' \
--data '
{
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"score_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbols": [
"<string>"
],
"signal_types": [
"<string>"
],
"quality_tiers": [
"<string>"
],
"regime_filter": [
"<string>"
],
"materialize_run_id": "<string>",
"stop_atr": 1.5,
"target_atr": 2.5,
"time_stop": "15:45",
"slippage_model": "realistic",
"fee_model": "commission_free",
"initial_capital": 100000,
"max_positions": 20,
"sizing_method": "score_weighted",
"strategy_rules": {},
"universe_symbols": [
"<string>"
],
"benchmark_symbol": "SPY",
"bar_timeframe": "1m",
"timeframe": "intraday",
"train_test_split": 123,
"walk_forward": false,
"monte_carlo_n": 10000,
"random_seed": 123,
"regime_strategy": {},
"regime_engine_version": "legacy",
"regime_logic_version": "<string>",
"evidence_logic_version": "<string>",
"regime_feature_version": "<string>",
"regime_variant": "<string>",
"regime_read_mode": "historical",
"policy_version": "<string>",
"evidence_id": "<string>",
"evidence_selector": {},
"evidence_selector_resolution": {},
"regime_artifact_ids": [
"<string>"
],
"portfolio_definition": {
"name": "<string>",
"universe": [
"<string>"
],
"sleeves": [
{
"sleeve_name": "<string>",
"strategy_id": "<string>",
"sleeve_id": "",
"strategy_version": 1,
"vol_target_annual": 0.1,
"weight_cap": 0.5,
"strategy_kind": "rule_driven",
"rules": {},
"cross_sectional_spec": {},
"strategy_family": "<string>",
"universe": [
"<string>"
]
}
],
"portfolio_id": "",
"portfolio_version": 1,
"rebalance_freq": "monthly",
"combination": {
"method": "vol_target",
"target_vol_annual": 0.1,
"max_leverage": 4
},
"borrow_annual": 0.02,
"cost_per_side": 0.00075
},
"portfolio_preset": "<string>",
"max_single_name_pct": 0.5,
"rth_only": false,
"entry_exclude_dates": [
"2023-12-25"
],
"use_final": false,
"skip_first_n_min": 0,
"no_new_entries_after_et": "<string>",
"min_hold_minutes": 0,
"use_per_name_spread": false
}
'import requests
url = "https://api.example.com/api/graph/v1/backtest/v2/run"
payload = {
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"score_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbols": ["<string>"],
"signal_types": ["<string>"],
"quality_tiers": ["<string>"],
"regime_filter": ["<string>"],
"materialize_run_id": "<string>",
"stop_atr": 1.5,
"target_atr": 2.5,
"time_stop": "15:45",
"slippage_model": "realistic",
"fee_model": "commission_free",
"initial_capital": 100000,
"max_positions": 20,
"sizing_method": "score_weighted",
"strategy_rules": {},
"universe_symbols": ["<string>"],
"benchmark_symbol": "SPY",
"bar_timeframe": "1m",
"timeframe": "intraday",
"train_test_split": 123,
"walk_forward": False,
"monte_carlo_n": 10000,
"random_seed": 123,
"regime_strategy": {},
"regime_engine_version": "legacy",
"regime_logic_version": "<string>",
"evidence_logic_version": "<string>",
"regime_feature_version": "<string>",
"regime_variant": "<string>",
"regime_read_mode": "historical",
"policy_version": "<string>",
"evidence_id": "<string>",
"evidence_selector": {},
"evidence_selector_resolution": {},
"regime_artifact_ids": ["<string>"],
"portfolio_definition": {
"name": "<string>",
"universe": ["<string>"],
"sleeves": [
{
"sleeve_name": "<string>",
"strategy_id": "<string>",
"sleeve_id": "",
"strategy_version": 1,
"vol_target_annual": 0.1,
"weight_cap": 0.5,
"strategy_kind": "rule_driven",
"rules": {},
"cross_sectional_spec": {},
"strategy_family": "<string>",
"universe": ["<string>"]
}
],
"portfolio_id": "",
"portfolio_version": 1,
"rebalance_freq": "monthly",
"combination": {
"method": "vol_target",
"target_vol_annual": 0.1,
"max_leverage": 4
},
"borrow_annual": 0.02,
"cost_per_side": 0.00075
},
"portfolio_preset": "<string>",
"max_single_name_pct": 0.5,
"rth_only": False,
"entry_exclude_dates": ["2023-12-25"],
"use_final": False,
"skip_first_n_min": 0,
"no_new_entries_after_et": "<string>",
"min_hold_minutes": 0,
"use_per_name_spread": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
date_from: '2023-12-25',
date_to: '2023-12-25',
score_set_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
symbols: ['<string>'],
signal_types: ['<string>'],
quality_tiers: ['<string>'],
regime_filter: ['<string>'],
materialize_run_id: '<string>',
stop_atr: 1.5,
target_atr: 2.5,
time_stop: '15:45',
slippage_model: 'realistic',
fee_model: 'commission_free',
initial_capital: 100000,
max_positions: 20,
sizing_method: 'score_weighted',
strategy_rules: {},
universe_symbols: ['<string>'],
benchmark_symbol: 'SPY',
bar_timeframe: '1m',
timeframe: 'intraday',
train_test_split: 123,
walk_forward: false,
monte_carlo_n: 10000,
random_seed: 123,
regime_strategy: {},
regime_engine_version: 'legacy',
regime_logic_version: '<string>',
evidence_logic_version: '<string>',
regime_feature_version: '<string>',
regime_variant: '<string>',
regime_read_mode: 'historical',
policy_version: '<string>',
evidence_id: '<string>',
evidence_selector: {},
evidence_selector_resolution: {},
regime_artifact_ids: ['<string>'],
portfolio_definition: {
name: '<string>',
universe: ['<string>'],
sleeves: [
{
sleeve_name: '<string>',
strategy_id: '<string>',
sleeve_id: '',
strategy_version: 1,
vol_target_annual: 0.1,
weight_cap: 0.5,
strategy_kind: 'rule_driven',
rules: {},
cross_sectional_spec: {},
strategy_family: '<string>',
universe: ['<string>']
}
],
portfolio_id: '',
portfolio_version: 1,
rebalance_freq: 'monthly',
combination: {method: 'vol_target', target_vol_annual: 0.1, max_leverage: 4},
borrow_annual: 0.02,
cost_per_side: 0.00075
},
portfolio_preset: '<string>',
max_single_name_pct: 0.5,
rth_only: false,
entry_exclude_dates: ['2023-12-25'],
use_final: false,
skip_first_n_min: 0,
no_new_entries_after_et: '<string>',
min_hold_minutes: 0,
use_per_name_spread: false
})
};
fetch('https://api.example.com/api/graph/v1/backtest/v2/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/backtest/v2/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date_from' => '2023-12-25',
'date_to' => '2023-12-25',
'score_set_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'symbols' => [
'<string>'
],
'signal_types' => [
'<string>'
],
'quality_tiers' => [
'<string>'
],
'regime_filter' => [
'<string>'
],
'materialize_run_id' => '<string>',
'stop_atr' => 1.5,
'target_atr' => 2.5,
'time_stop' => '15:45',
'slippage_model' => 'realistic',
'fee_model' => 'commission_free',
'initial_capital' => 100000,
'max_positions' => 20,
'sizing_method' => 'score_weighted',
'strategy_rules' => [
],
'universe_symbols' => [
'<string>'
],
'benchmark_symbol' => 'SPY',
'bar_timeframe' => '1m',
'timeframe' => 'intraday',
'train_test_split' => 123,
'walk_forward' => false,
'monte_carlo_n' => 10000,
'random_seed' => 123,
'regime_strategy' => [
],
'regime_engine_version' => 'legacy',
'regime_logic_version' => '<string>',
'evidence_logic_version' => '<string>',
'regime_feature_version' => '<string>',
'regime_variant' => '<string>',
'regime_read_mode' => 'historical',
'policy_version' => '<string>',
'evidence_id' => '<string>',
'evidence_selector' => [
],
'evidence_selector_resolution' => [
],
'regime_artifact_ids' => [
'<string>'
],
'portfolio_definition' => [
'name' => '<string>',
'universe' => [
'<string>'
],
'sleeves' => [
[
'sleeve_name' => '<string>',
'strategy_id' => '<string>',
'sleeve_id' => '',
'strategy_version' => 1,
'vol_target_annual' => 0.1,
'weight_cap' => 0.5,
'strategy_kind' => 'rule_driven',
'rules' => [
],
'cross_sectional_spec' => [
],
'strategy_family' => '<string>',
'universe' => [
'<string>'
]
]
],
'portfolio_id' => '',
'portfolio_version' => 1,
'rebalance_freq' => 'monthly',
'combination' => [
'method' => 'vol_target',
'target_vol_annual' => 0.1,
'max_leverage' => 4
],
'borrow_annual' => 0.02,
'cost_per_side' => 0.00075
],
'portfolio_preset' => '<string>',
'max_single_name_pct' => 0.5,
'rth_only' => false,
'entry_exclude_dates' => [
'2023-12-25'
],
'use_final' => false,
'skip_first_n_min' => 0,
'no_new_entries_after_et' => '<string>',
'min_hold_minutes' => 0,
'use_per_name_spread' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/backtest/v2/run"
payload := strings.NewReader("{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/graph/v1/backtest/v2/run")
.header("Content-Type", "application/json")
.body("{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/backtest/v2/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}backtest-v2
Start Backtest Run
Start an async backtest run.
Returns immediately with run_id and status “pending”. The control plane no longer executes the backtest in-process: it registers a pending run and enqueues an interactive job for an out-of-process worker to claim (B5 cutover). Poll GET /run/ for progress. Cancel with POST /run//cancel.
Enforces max 3 concurrent runs per user (returns 429 if exceeded).
POST
/
api
/
graph
/
v1
/
backtest
/
v2
/
run
Start Backtest Run
curl --request POST \
--url https://api.example.com/api/graph/v1/backtest/v2/run \
--header 'Content-Type: application/json' \
--data '
{
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"score_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbols": [
"<string>"
],
"signal_types": [
"<string>"
],
"quality_tiers": [
"<string>"
],
"regime_filter": [
"<string>"
],
"materialize_run_id": "<string>",
"stop_atr": 1.5,
"target_atr": 2.5,
"time_stop": "15:45",
"slippage_model": "realistic",
"fee_model": "commission_free",
"initial_capital": 100000,
"max_positions": 20,
"sizing_method": "score_weighted",
"strategy_rules": {},
"universe_symbols": [
"<string>"
],
"benchmark_symbol": "SPY",
"bar_timeframe": "1m",
"timeframe": "intraday",
"train_test_split": 123,
"walk_forward": false,
"monte_carlo_n": 10000,
"random_seed": 123,
"regime_strategy": {},
"regime_engine_version": "legacy",
"regime_logic_version": "<string>",
"evidence_logic_version": "<string>",
"regime_feature_version": "<string>",
"regime_variant": "<string>",
"regime_read_mode": "historical",
"policy_version": "<string>",
"evidence_id": "<string>",
"evidence_selector": {},
"evidence_selector_resolution": {},
"regime_artifact_ids": [
"<string>"
],
"portfolio_definition": {
"name": "<string>",
"universe": [
"<string>"
],
"sleeves": [
{
"sleeve_name": "<string>",
"strategy_id": "<string>",
"sleeve_id": "",
"strategy_version": 1,
"vol_target_annual": 0.1,
"weight_cap": 0.5,
"strategy_kind": "rule_driven",
"rules": {},
"cross_sectional_spec": {},
"strategy_family": "<string>",
"universe": [
"<string>"
]
}
],
"portfolio_id": "",
"portfolio_version": 1,
"rebalance_freq": "monthly",
"combination": {
"method": "vol_target",
"target_vol_annual": 0.1,
"max_leverage": 4
},
"borrow_annual": 0.02,
"cost_per_side": 0.00075
},
"portfolio_preset": "<string>",
"max_single_name_pct": 0.5,
"rth_only": false,
"entry_exclude_dates": [
"2023-12-25"
],
"use_final": false,
"skip_first_n_min": 0,
"no_new_entries_after_et": "<string>",
"min_hold_minutes": 0,
"use_per_name_spread": false
}
'import requests
url = "https://api.example.com/api/graph/v1/backtest/v2/run"
payload = {
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"score_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbols": ["<string>"],
"signal_types": ["<string>"],
"quality_tiers": ["<string>"],
"regime_filter": ["<string>"],
"materialize_run_id": "<string>",
"stop_atr": 1.5,
"target_atr": 2.5,
"time_stop": "15:45",
"slippage_model": "realistic",
"fee_model": "commission_free",
"initial_capital": 100000,
"max_positions": 20,
"sizing_method": "score_weighted",
"strategy_rules": {},
"universe_symbols": ["<string>"],
"benchmark_symbol": "SPY",
"bar_timeframe": "1m",
"timeframe": "intraday",
"train_test_split": 123,
"walk_forward": False,
"monte_carlo_n": 10000,
"random_seed": 123,
"regime_strategy": {},
"regime_engine_version": "legacy",
"regime_logic_version": "<string>",
"evidence_logic_version": "<string>",
"regime_feature_version": "<string>",
"regime_variant": "<string>",
"regime_read_mode": "historical",
"policy_version": "<string>",
"evidence_id": "<string>",
"evidence_selector": {},
"evidence_selector_resolution": {},
"regime_artifact_ids": ["<string>"],
"portfolio_definition": {
"name": "<string>",
"universe": ["<string>"],
"sleeves": [
{
"sleeve_name": "<string>",
"strategy_id": "<string>",
"sleeve_id": "",
"strategy_version": 1,
"vol_target_annual": 0.1,
"weight_cap": 0.5,
"strategy_kind": "rule_driven",
"rules": {},
"cross_sectional_spec": {},
"strategy_family": "<string>",
"universe": ["<string>"]
}
],
"portfolio_id": "",
"portfolio_version": 1,
"rebalance_freq": "monthly",
"combination": {
"method": "vol_target",
"target_vol_annual": 0.1,
"max_leverage": 4
},
"borrow_annual": 0.02,
"cost_per_side": 0.00075
},
"portfolio_preset": "<string>",
"max_single_name_pct": 0.5,
"rth_only": False,
"entry_exclude_dates": ["2023-12-25"],
"use_final": False,
"skip_first_n_min": 0,
"no_new_entries_after_et": "<string>",
"min_hold_minutes": 0,
"use_per_name_spread": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
date_from: '2023-12-25',
date_to: '2023-12-25',
score_set_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
symbols: ['<string>'],
signal_types: ['<string>'],
quality_tiers: ['<string>'],
regime_filter: ['<string>'],
materialize_run_id: '<string>',
stop_atr: 1.5,
target_atr: 2.5,
time_stop: '15:45',
slippage_model: 'realistic',
fee_model: 'commission_free',
initial_capital: 100000,
max_positions: 20,
sizing_method: 'score_weighted',
strategy_rules: {},
universe_symbols: ['<string>'],
benchmark_symbol: 'SPY',
bar_timeframe: '1m',
timeframe: 'intraday',
train_test_split: 123,
walk_forward: false,
monte_carlo_n: 10000,
random_seed: 123,
regime_strategy: {},
regime_engine_version: 'legacy',
regime_logic_version: '<string>',
evidence_logic_version: '<string>',
regime_feature_version: '<string>',
regime_variant: '<string>',
regime_read_mode: 'historical',
policy_version: '<string>',
evidence_id: '<string>',
evidence_selector: {},
evidence_selector_resolution: {},
regime_artifact_ids: ['<string>'],
portfolio_definition: {
name: '<string>',
universe: ['<string>'],
sleeves: [
{
sleeve_name: '<string>',
strategy_id: '<string>',
sleeve_id: '',
strategy_version: 1,
vol_target_annual: 0.1,
weight_cap: 0.5,
strategy_kind: 'rule_driven',
rules: {},
cross_sectional_spec: {},
strategy_family: '<string>',
universe: ['<string>']
}
],
portfolio_id: '',
portfolio_version: 1,
rebalance_freq: 'monthly',
combination: {method: 'vol_target', target_vol_annual: 0.1, max_leverage: 4},
borrow_annual: 0.02,
cost_per_side: 0.00075
},
portfolio_preset: '<string>',
max_single_name_pct: 0.5,
rth_only: false,
entry_exclude_dates: ['2023-12-25'],
use_final: false,
skip_first_n_min: 0,
no_new_entries_after_et: '<string>',
min_hold_minutes: 0,
use_per_name_spread: false
})
};
fetch('https://api.example.com/api/graph/v1/backtest/v2/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/graph/v1/backtest/v2/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date_from' => '2023-12-25',
'date_to' => '2023-12-25',
'score_set_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'symbols' => [
'<string>'
],
'signal_types' => [
'<string>'
],
'quality_tiers' => [
'<string>'
],
'regime_filter' => [
'<string>'
],
'materialize_run_id' => '<string>',
'stop_atr' => 1.5,
'target_atr' => 2.5,
'time_stop' => '15:45',
'slippage_model' => 'realistic',
'fee_model' => 'commission_free',
'initial_capital' => 100000,
'max_positions' => 20,
'sizing_method' => 'score_weighted',
'strategy_rules' => [
],
'universe_symbols' => [
'<string>'
],
'benchmark_symbol' => 'SPY',
'bar_timeframe' => '1m',
'timeframe' => 'intraday',
'train_test_split' => 123,
'walk_forward' => false,
'monte_carlo_n' => 10000,
'random_seed' => 123,
'regime_strategy' => [
],
'regime_engine_version' => 'legacy',
'regime_logic_version' => '<string>',
'evidence_logic_version' => '<string>',
'regime_feature_version' => '<string>',
'regime_variant' => '<string>',
'regime_read_mode' => 'historical',
'policy_version' => '<string>',
'evidence_id' => '<string>',
'evidence_selector' => [
],
'evidence_selector_resolution' => [
],
'regime_artifact_ids' => [
'<string>'
],
'portfolio_definition' => [
'name' => '<string>',
'universe' => [
'<string>'
],
'sleeves' => [
[
'sleeve_name' => '<string>',
'strategy_id' => '<string>',
'sleeve_id' => '',
'strategy_version' => 1,
'vol_target_annual' => 0.1,
'weight_cap' => 0.5,
'strategy_kind' => 'rule_driven',
'rules' => [
],
'cross_sectional_spec' => [
],
'strategy_family' => '<string>',
'universe' => [
'<string>'
]
]
],
'portfolio_id' => '',
'portfolio_version' => 1,
'rebalance_freq' => 'monthly',
'combination' => [
'method' => 'vol_target',
'target_vol_annual' => 0.1,
'max_leverage' => 4
],
'borrow_annual' => 0.02,
'cost_per_side' => 0.00075
],
'portfolio_preset' => '<string>',
'max_single_name_pct' => 0.5,
'rth_only' => false,
'entry_exclude_dates' => [
'2023-12-25'
],
'use_final' => false,
'skip_first_n_min' => 0,
'no_new_entries_after_et' => '<string>',
'min_hold_minutes' => 0,
'use_per_name_spread' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/graph/v1/backtest/v2/run"
payload := strings.NewReader("{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/graph/v1/backtest/v2/run")
.header("Content-Type", "application/json")
.body("{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph/v1/backtest/v2/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"date_from\": \"2023-12-25\",\n \"date_to\": \"2023-12-25\",\n \"score_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"symbols\": [\n \"<string>\"\n ],\n \"signal_types\": [\n \"<string>\"\n ],\n \"quality_tiers\": [\n \"<string>\"\n ],\n \"regime_filter\": [\n \"<string>\"\n ],\n \"materialize_run_id\": \"<string>\",\n \"stop_atr\": 1.5,\n \"target_atr\": 2.5,\n \"time_stop\": \"15:45\",\n \"slippage_model\": \"realistic\",\n \"fee_model\": \"commission_free\",\n \"initial_capital\": 100000,\n \"max_positions\": 20,\n \"sizing_method\": \"score_weighted\",\n \"strategy_rules\": {},\n \"universe_symbols\": [\n \"<string>\"\n ],\n \"benchmark_symbol\": \"SPY\",\n \"bar_timeframe\": \"1m\",\n \"timeframe\": \"intraday\",\n \"train_test_split\": 123,\n \"walk_forward\": false,\n \"monte_carlo_n\": 10000,\n \"random_seed\": 123,\n \"regime_strategy\": {},\n \"regime_engine_version\": \"legacy\",\n \"regime_logic_version\": \"<string>\",\n \"evidence_logic_version\": \"<string>\",\n \"regime_feature_version\": \"<string>\",\n \"regime_variant\": \"<string>\",\n \"regime_read_mode\": \"historical\",\n \"policy_version\": \"<string>\",\n \"evidence_id\": \"<string>\",\n \"evidence_selector\": {},\n \"evidence_selector_resolution\": {},\n \"regime_artifact_ids\": [\n \"<string>\"\n ],\n \"portfolio_definition\": {\n \"name\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ],\n \"sleeves\": [\n {\n \"sleeve_name\": \"<string>\",\n \"strategy_id\": \"<string>\",\n \"sleeve_id\": \"\",\n \"strategy_version\": 1,\n \"vol_target_annual\": 0.1,\n \"weight_cap\": 0.5,\n \"strategy_kind\": \"rule_driven\",\n \"rules\": {},\n \"cross_sectional_spec\": {},\n \"strategy_family\": \"<string>\",\n \"universe\": [\n \"<string>\"\n ]\n }\n ],\n \"portfolio_id\": \"\",\n \"portfolio_version\": 1,\n \"rebalance_freq\": \"monthly\",\n \"combination\": {\n \"method\": \"vol_target\",\n \"target_vol_annual\": 0.1,\n \"max_leverage\": 4\n },\n \"borrow_annual\": 0.02,\n \"cost_per_side\": 0.00075\n },\n \"portfolio_preset\": \"<string>\",\n \"max_single_name_pct\": 0.5,\n \"rth_only\": false,\n \"entry_exclude_dates\": [\n \"2023-12-25\"\n ],\n \"use_final\": false,\n \"skip_first_n_min\": 0,\n \"no_new_entries_after_et\": \"<string>\",\n \"min_hold_minutes\": 0,\n \"use_per_name_spread\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Available options:
equal_weight, score_weighted, risk_parity, kelly Available options:
legacy, v2 Available options:
macro, swing, intraday Available options:
historical, forward, diagnostic Show child attributes
Show child attributes
Required range:
0 < x <= 1Required range:
x >= 0Required range:
0 <= x <= 390Response
Successful Response