Skip to content
Fourohtwo

quantum.halowerk.com/v1/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.

BaseAnswering
POSThttps://quantum.halowerk.com/v1/portfolio-qaoa

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://quantum.halowerk.com/v1/portfolio-qaoa", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"assets":[{"expected_return":0.08,"name":"A"},{"expected_return":0.06,"name":"B"},{"expected_return":0.1,"name":"C"},{"expected_return":0.04,"name":"D"}],"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]],"risk_aversion":0.7,"select_count":2}),
});
console.log(await res.json());

Example input

{
  "assets": [
    {
      "expected_return": 0.08,
      "name": "A"
    },
    {
      "expected_return": 0.06,
      "name": "B"
    },
    {
      "expected_return": 0.1,
      "name": "C"
    },
    {
      "expected_return": 0.04,
      "name": "D"
    }
  ],
  "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
    ]
  ],
  "risk_aversion": 0.7,
  "select_count": 2
}

More from HALOWERK quantumwerkProvider status