{"uid":"cap_M5zp1nQ2ahQ8Ax70KFDQG","slug":"delx-commerce-pairs-hedge-ratio-ols-a244aab9","name":"Delx Commerce — Pairs Hedge Ratio (OLS)","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/pairs-hedge-ratio?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"x":{"type":"array","description":"Independent series for OLS hedge ratio"},"y":{"type":"array","description":"Dependent series for OLS hedge ratio"}}},"responseSchema":{"type":"json","example":{"n":5,"beta":1.98,"schema":"delx/util-pairs-hedge-ratio/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LiecanNvhJUZoap_DXPQ1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the OLS hedge ratio (beta) between two price series for pairs trading strategies.","exampleAgentPrompt":"Calculate the OLS hedge ratio between these two price series — X: [100, 102, 101, 103, 105] and Y: [198, 202, 200, 205, 208] — so I know how many units of X to hold per unit of Y in my pairs trade.","exampleUseCases":[{"title":"Stat arb spread construction","prompt":"I want to build a pairs trade between two ETF price series. Here are the daily closes for SPY (x): [410, 412, 411, 415, 417] and QQQ (y): [340, 342, 341, 344, 347]. Can you compute the OLS hedge ratio so I know the right ratio to trade them?"},{"title":"Portfolio delta-neutral hedging","prompt":"I'm trying to delta-hedge my gold position against silver. Here are the last 10 closing prices for gold (x): [1900, 1905, 1898, 1910, 1915, 1908, 1920, 1918, 1925, 1930] and silver (y): [24.1, 24.3, 24.0, 24.5, 24.6, 24.4, 24.8, 24.7, 25.0, 25.2]. What's the hedge ratio?"},{"title":"Crypto pairs trading setup","prompt":"I'm setting up a BTC/ETH pairs trade. BTC prices (x): [30000, 30500, 29800, 31000, 31500] and ETH prices (y): [1900, 1930, 1890, 1960, 1980]. Run an OLS regression and tell me the beta so I can size the positions correctly."}],"resultDescription":"Returns a JSON object containing the number of observations used (n), the OLS beta coefficient representing the hedge ratio (beta), and a schema identifier string (schema). The beta value indicates how many units of the independent series (x) are needed to hedge one unit of the dependent series (y).","failureModes":["Mismatched array lengths between x and y series may cause errors or undefined behavior","Empty or single-element arrays may produce invalid or degenerate regression results","Non-numeric values in either series will likely cause computation failures","Payment failure via x402 protocol will prevent the computation from executing","Constant series (zero variance in x) will cause division-by-zero in OLS"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call OLS hedge ratio calculation without building your own regression infrastructure. Ideal for AI agents running quantitative finance workflows, pairs trading signal generation, or spread construction where you need an exact hedge ratio on demand with no account setup and verifiable micropayment delivery via USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:49.523Z","isFirstParty":false,"canonicalSlug":"delx-commerce-pairs-hedge-ratio-ols-a244aab9"}