Zum Inhalt
HALOWERK

Handelswerk

price elasticity

Fits a constant-elasticity demand curve to the price and sales series you supply and returns the elasticity with its standard error, t statistic, two-sided p value and a Student t confidence interval, not a normal one, because at eight observations the difference in interval width is double-digit percent and a too narrow interval is exactly the kind of number a machine reuses unchecked.

POST https://handel.halowerk.com/v1/price-elasticity

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
observationsarrayJaYour own price and sales history for one SKU. Every amount is in the currency named at document level.
unit_costnumberNeinVariable cost per unit. Required for the contribution-optimal price; without it only the elasticity is returned.
include_competitor_pricebooleanNeinWhether to add the log competitor price as a second regressor and report the cross-price elasticity. Every observation must then carry competitor_price.
include_promotionbooleanNeinWhether to add the promotion indicator as a regressor.
price_gridarrayNeinCandidate prices to evaluate with predicted units and contribution. Evaluated at the fitted model, in the order you give them.
confidence_levelnumberNeinConfidence level for the elasticity interval. Student t, not normal.
currencystringNeinISO 4217 code for every amount in this request. Not converted, only carried through.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "observations"
  ],
  "additionalProperties": false,
  "properties": {
    "observations": {
      "type": "array",
      "minItems": 4,
      "maxItems": 2000,
      "description": "Your own price and sales history for one SKU. Every amount is in the currency named at document level.",
      "items": {
        "type": "object",
        "required": [
          "price",
          "units_sold"
        ],
        "additionalProperties": false,
        "properties": {
          "price": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100000000,
            "description": "Selling price in that period. Must be positive: the estimation is on logarithms."
          },
          "units_sold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000,
            "description": "Units sold at that price. A zero cannot enter a log-log fit and is excluded, reported and never silently dropped."
          },
          "period_start": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Optional period label as YYYY-MM-DD, passed through unchanged."
          },
          "promotion": {
            "type": "boolean",
            "default": false,
            "description": "Whether the period was a promotion. Enters the fit as a separate indicator when include_promotion is true, so that a campaign is not attributed to the price."
          },
          "competitor_price": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100000000,
            "description": "Competitor price in that period. Only used when include_competitor_price is true; you bring the figure, nothing is looked up."
          }
        }
      }
    },
    "unit_cost": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000000,
      "description": "Variable cost per unit. Required for the contribution-optimal price; without it only the elasticity is returned."
    },
    "include_competitor_price": {
      "type": "boolean",
      "default": false,
      "description": "Whether to add the log competitor price as a second regressor and report the cross-price elasticity. Every observation must then carry competitor_price."
    },
    "include_promotion": {
      "type": "boolean",
      "default": false,
      "description": "Whether to add the promotion indicator as a regressor."
    },
    "price_grid": {
      "type": "array",
      "maxItems": 200,
      "items": {
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 100000000
      },
      "description": "Candidate prices to evaluate with predicted units and contribution. Evaluated at the fitted model, in the order you give them."
    },
    "confidence_level": {
      "type": "number",
      "enum": [
        0.8,
        0.9,
        0.95
      ],
      "default": 0.95,
      "description": "Confidence level for the elasticity interval. Student t, not normal."
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "default": "EUR",
      "description": "ISO 4217 code for every amount in this request. Not converted, only carried through."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "currency": "EUR",
  "unit_cost": 11.5,
  "observations": [
    {
      "period_start": "2026-01-05",
      "price": 24.9,
      "units_sold": 412
    },
    {
      "period_start": "2026-01-12",
      "price": 22.9,
      "units_sold": 503
    },
    {
      "period_start": "2026-01-19",
      "price": 26.9,
      "units_sold": 341
    },
    {
      "period_start": "2026-01-26",
      "price": 19.9,
      "units_sold": 688
    },
    {
      "period_start": "2026-02-02",
      "price": 24.9,
      "units_sold": 431
    },
    {
      "period_start": "2026-02-09",
      "price": 29.9,
      "units_sold": 262
    },
    {
      "period_start": "2026-02-16",
      "price": 21.9,
      "units_sold": 559
    },
    {
      "period_start": "2026-02-23",
      "price": 27.9,
      "units_sold": 301
    },
    {
      "period_start": "2026-03-02",
      "price": 23.9,
      "units_sold": 470
    },
    {
      "period_start": "2026-03-09",
      "price": 18.9,
      "units_sold": 742
    }
  ],
  "price_grid": [
    19.9,
    21.9,
    23.9,
    25.9,
    27.9
  ],
  "confidence_level": 0.95
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://handel.halowerk.com/v1/price-elasticity/schema#/outputSchema"
}

Veröffentlichtes Ergebnisbeispiel öffnen

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →