Backtest Model (Hindsight Check)
curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/backtest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.woodwide.ai/models/{model_id}/backtest"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.woodwide.ai/models/{model_id}/backtest', 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.woodwide.ai/models/{model_id}/backtest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.woodwide.ai/models/{model_id}/backtest"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.woodwide.ai/models/{model_id}/backtest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/backtest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "initializing",
"deduplicated": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Endpoints
Backtest Model (Hindsight Check)
Score the previous dataset version with the model’s CURRENT version and compare against the labels that later materialized — a hindsight check (‘would have caught’), never a forward guarantee.
Returns 409 when ineligible (single dataset version, no label column, clustering/factors task, or the pair was already backtested). Only one backtest runs per model at a time; a concurrent request returns the in-flight job with deduplicated: true.
POST
/
models
/
{model_id}
/
backtest
Backtest Model (Hindsight Check)
curl --request POST \
--url https://api.woodwide.ai/models/{model_id}/backtest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.woodwide.ai/models/{model_id}/backtest"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.woodwide.ai/models/{model_id}/backtest', 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.woodwide.ai/models/{model_id}/backtest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.woodwide.ai/models/{model_id}/backtest"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.woodwide.ai/models/{model_id}/backtest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.woodwide.ai/models/{model_id}/backtest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "initializing",
"deduplicated": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Accepted (or deduped in-flight) backtest job for a model.
Public ID of the backtest job (e.g. job_A8K2P9QX).
Available options:
initializing, pending, queued, running, succeeded, failed, canceled, rejected, waiting_for_upload True when an in-flight backtest for this model was returned instead.
Was this page helpful?