Vai al contenuto
GET /v1/frontier

Efficient-frontier points and weights

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/portfoliooptimizer-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/portfoliooptimizer-api/v1/frontier" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/portfoliooptimizer-api/v1/frontier", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/portfoliooptimizer-api/v1/frontier");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/portfoliooptimizer-api/v1/frontier",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "assets": [
            "stocks",
            "bonds"
        ],
        "points": 12,
        "source": "PORTFOLIO",
        "frontier": [
            {
                "weights": {
                    "bonds": 0.672182,
                    "stocks": 0.327818
                },
                "volatility": 0.024805,
                "sharpe_ratio": 56.720021,
                "expected_return": 1.426945
            },
            {
                "weights": {
                    "bonds": 0.672863,
                    "stocks": 0.327137
                },
                "volatility": 0.024808,
                "sharpe_ratio": 56.588707,
                "expected_return": 1.423829
            },
            {
                "weights": {
                    "bonds": 0.6715,
                    "stocks": 0.3285
                },
                "volatility": 0.024813,
                "sharpe_ratio": 56.828468,
                "expected_return": 1.430061
            },
            {
                "weights": {
                    "bonds": 0.673545,
                    "stocks": 0.326455
                },
                "volatility": 0.02482,
                "sharpe_ratio": 56.434696,
                "expected_return": 1.420713
            },
            {
                "weights": {
                    "bonds": 0.670819,
                    "stocks": 0.329181
                },
                "volatility": 0.02483,
                "sharpe_ratio": 56.913958,
                "expected_return": 1.433176
            },
            {
                "weights": {
                    "bonds": 0.674226,
                    "stocks": 0.325774
                },
                "volatility": 0.024843,
                "sharpe_ratio": 56.258245,
                "expected_return": 1.417597
            },
            {
                "weights": {
                    "bonds": 0.670138,
                    "stocks": 0.329862
                },
                "volatility": 0.024857,
                "sharpe_ratio": 56.976483,
                "expected_return": 1.436292
            },
            {
                "weights": {
                    "bonds": 0.669456,
                    "stocks": 0.330544
                },
                "volatility": 0.024895,
                "sharpe_ratio": 57.016122,
                "expected_return": 1.439408
            },
            {
                "weights": {
                    "bonds": 0.668775,
                    "stocks": 0.331225
                },
                "volatility": 0.024942,
                "sharpe_ratio": 57.03303,
                "expected_return": 1.442524
            },
            {
                "weights": {
                    "bonds": 0.668093,
                    "stocks": 0.331907
                },
                "volatility": 0.024999,
                "sharpe_ratio": 57.027446,
                "expected_return": 1.44564
            },
            {
          
…