{
  "schema_version": "1.0",
  "topic_id": "D07-F03-A26",
  "title": "Detrended Price Oscillator",
  "purpose": "machine-readable publication-contract verification",
  "data_class": "synthetic teaching input",
  "selected_formula": "DPO_t = P_(t-floor(n/2)-1) - SMA_n(P)_t",
  "canonical_question": "What shorter fluctuation remains after shifting price against a centered-cycle baseline?",
  "input_contract": "an ordered price or OHLC series, declared lookbacks, smoothing seeds, and denominator policy",
  "scenario_assertions": [
    {
      "name": "canonical",
      "expected_state": "calculated",
      "assertion": "valid and sufficiently warm synthetic input reaches calculation"
    },
    {
      "name": "boundary",
      "expected_state": "waiting",
      "assertion": "one missing observation or unresolved equality is not coerced to zero"
    },
    {
      "name": "failure",
      "expected_state": "invalid",
      "assertion": "non-finite, misordered, future-dated, or basis-mixed input is withheld"
    }
  ],
  "timing_rule": "Compute and publish DPO at index t only after P_t and the trailing SMA ending at t are available. The displaced price is effective_for t-floor(n/2)-1, but the DPO value remains available_at t and must never be back-dated.",
  "expected_non_claims": [
    "not historical market data",
    "not a forecast",
    "not a trading instruction",
    "not evidence of profitability"
  ],
  "implementation_status": "Python canonical runtime and audited Node/TypeScript adapter released with topic-owned fixtures and tests"
}
