← Developer Hub
Quant Models
Run Forecast Model Tournament
Backtest approved forecasting models on a holdout tail, rank by error, and refit the winner for the requested forward horizon.
Version: v2
Stability: stable
Sandbox: Available
Production: Entitlement required
Target latency: ≤ 1,800 ms
POST
/api/v2/quant/model-tournamentsCandidate forecasts are persisted as auditable model runs. FinanceGPT does not represent tournament winners as guarantees of future performance.
Required scope:
quant:models:runTry it in the FinanceGPT sandbox
The playground uses deterministic isolated sandbox fixtures. It never queries production workspace data and does not require you to paste an API secret into the browser.
Sign in to runExample response
{
"data": {
"winner_model_key": "forecasting.holt_linear",
"winner_forecast": [
137.80000000000001136868377216160297393798828125,
140.19999999999998863131622783839702606201171875,
142.599999999999994315658113919198513031005859375
]
}
}Code examples
curl
curl -X POST \
https://financegpt.dev/api/v2/quant/model-tournaments \
-H "Authorization: Bearer $FINANCEGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"series":[100,102,103,106,108,111,113,116,118,121,124,126,129,131,134,137],"holdout":4,"forecast_horizon":3,"metric":"rmse"}'python
import os, requests
url = "https://financegpt.dev/api/v2/quant/model-tournaments"
headers = {"Authorization": f"Bearer {os.environ['FINANCEGPT_API_KEY']}"}
payload = {
"series": [
100,
102,
103,
106,
108,
111,
113,
116,
118,
121,
124,
126,
129,
131,
134,
137
],
"holdout": 4,
"forecast_horizon": 3,
"metric": "rmse"
}
response = requests.request("POST", url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())javascript
const response = await fetch('https://financegpt.dev/api/v2/quant/model-tournaments', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.FINANCEGPT_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"series":[100,102,103,106,108,111,113,116,118,121,124,126,129,131,134,137],"holdout":4,"forecast_horizon":3,"metric":"rmse"})
});
if (!response.ok) throw new Error(`FinanceGPT ${response.status}`);
console.log(await response.json());php
<?php
$ch = curl_init('https://financegpt.dev/api/v2/quant/model-tournaments');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => ['Authorization: Bearer '.getenv('FINANCEGPT_API_KEY'), 'Content-Type: application/json'], CURLOPT_POSTFIELDS => '{\"series\":[100,102,103,106,108,111,113,116,118,121,124,126,129,131,134,137],\"holdout\":4,\"forecast_horizon\":3,\"metric\":\"rmse\"}']);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) throw new RuntimeException($response);
echo $response;Versions & changelog
v2 published
M19 publication of this governed FinanceGPT API operation.
Ready to build?
Explorer gives immediate isolated sandbox access. Production plans require a commercial entitlement.
Create account