Zum Inhalt
HALOWERK

Quantumwerk

portfolio qaoa

Enumerates every selection of exactly k assets for at most 16 assets, maximizing summed expected return minus a caller-selected covariance penalty. It runs no quantum circuit and provides a deterministic classical optimum for testing a corresponding binary QAOA or QUBO formulation; it is not investment advice and ignores transaction costs and allocation sizes.

POST https://quantum.halowerk.com/v1/portfolio-qaoa

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
assetsarrayJa
covariancearrayJa
select_countintegerJa
risk_aversionnumberJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "assets",
    "covariance",
    "select_count",
    "risk_aversion"
  ],
  "additionalProperties": false,
  "properties": {
    "assets": {
      "type": "array",
      "minItems": 1,
      "maxItems": 16,
      "items": {
        "type": "object",
        "required": [
          "name",
          "expected_return"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "expected_return": {
            "type": "number",
            "minimum": -1000,
            "maximum": 1000
          }
        }
      }
    },
    "covariance": {
      "type": "array",
      "minItems": 1,
      "maxItems": 16,
      "items": {
        "type": "array",
        "minItems": 1,
        "maxItems": 16,
        "items": {
          "type": "number",
          "minimum": -1000000,
          "maximum": 1000000
        }
      }
    },
    "select_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 16
    },
    "risk_aversion": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "assets": [
    {
      "name": "A",
      "expected_return": 0.08
    },
    {
      "name": "B",
      "expected_return": 0.06
    },
    {
      "name": "C",
      "expected_return": 0.1
    },
    {
      "name": "D",
      "expected_return": 0.04
    }
  ],
  "covariance": [
    [
      0.04,
      0.01,
      0.015,
      0.005
    ],
    [
      0.01,
      0.03,
      0.008,
      0.004
    ],
    [
      0.015,
      0.008,
      0.06,
      0.006
    ],
    [
      0.005,
      0.004,
      0.006,
      0.02
    ]
  ],
  "select_count": 2,
  "risk_aversion": 0.7
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://quantum.halowerk.com/v1/portfolio-qaoa/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 →