Skip to main content
GET
/
api
/
signals
/
backtesting
Signal Backtesting
curl --request GET \
  --url https://api.example.com/api/signals/backtesting
{
  "ledger": [
    {
      "signalId": "<string>",
      "signalType": "<string>",
      "headline": "<string>",
      "issuedAt": "<string>",
      "outcome": "<string>",
      "outcomeNotes": "<string>"
    }
  ],
  "summary": {
    "totalSignals": 123,
    "correctRate": 123,
    "partialRate": 123,
    "incorrectRate": 123,
    "evaluationPeriod": "<string>"
  },
  "byType": [
    {
      "signalType": "<string>",
      "count": 123,
      "correctRate": 123,
      "partialRate": 123
    }
  ],
  "overTime": [
    {
      "period": "<string>",
      "correctRate": 123,
      "signalCount": 123
    }
  ]
}
Returns a comprehensive backtesting dashboard for signals within a geography. The response includes a full signal ledger, aggregate summary statistics, accuracy broken down by signal type, and performance trends over time.

Authentication

Requires a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Query Parameters

geography
string
default:"US"
Target geography. Supported values: US, UK.

Response

ledger
array
Full ledger of historical signals with their outcomes.
summary
object
Aggregate summary statistics across all signal types.
byType
array
Accuracy breakdown by signal type.
overTime
array
Performance trends bucketed by time period.

Examples

curl -X GET "https://api.consumersignals.io/api/signals/backtesting?geography=US" \
  -H "Authorization: Bearer <token>"

Example Response

{
  "ledger": [
    {
      "signalId": "sig_20250115_energy_01",
      "signalType": "energy_divergence",
      "headline": "Gasoline refinery margins exceeding seasonal norms",
      "issuedAt": "2025-01-15T12:00:00Z",
      "outcome": "correct",
      "outcomeNotes": "CPI energy component rose 0.4% in following month, consistent with signal."
    }
  ],
  "summary": {
    "totalSignals": 142,
    "correctRate": 0.71,
    "partialRate": 0.84,
    "incorrectRate": 0.16,
    "evaluationPeriod": "2023-01-01 to 2026-03-28"
  },
  "byType": [
    {
      "signalType": "energy_divergence",
      "count": 47,
      "correctRate": 0.74,
      "partialRate": 0.89
    },
    {
      "signalType": "housing_momentum",
      "count": 35,
      "correctRate": 0.68,
      "partialRate": 0.82
    }
  ],
  "overTime": [
    { "period": "2025-Q1", "correctRate": 0.69, "signalCount": 18 },
    { "period": "2025-Q2", "correctRate": 0.73, "signalCount": 21 },
    { "period": "2025-Q3", "correctRate": 0.75, "signalCount": 19 },
    { "period": "2025-Q4", "correctRate": 0.72, "signalCount": 22 }
  ]
}