Skip to content
HALOWERK

Trade Operations

stock demand newsvendor loss

Newsvendor order quantity minimizes empirical expected shortage and leftover cost for a single selling period. Use it when an agent needs choosing a one-off order under asymmetric cost.

POST https://handel.halowerk.com/v1/stock-demand-newsvendor-loss

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
unitsarrayYes
under_costnumberYes
over_costnumberYes
Show full input schema
{
  "type": "object",
  "properties": {
    "units": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "maxItems": 366,
      "minItems": 2
    },
    "under_cost": {
      "type": "number",
      "minimum": 0.001,
      "maximum": 100000
    },
    "over_cost": {
      "type": "number",
      "minimum": 0.001,
      "maximum": 100000
    }
  },
  "required": [
    "units",
    "under_cost",
    "over_cost"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "units": [
    169,
    29,
    0,
    63,
    294,
    52,
    4,
    9,
    0,
    0,
    0,
    0,
    1,
    0,
    0
  ],
  "under_cost": 4,
  "over_cost": 2
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub โ†’