{"uid":"cap_o_ZmQx8AyeapDNve1LD_P","slug":"api-quantoracle-dev-0335dab2","name":"QuantOracle Correlation Matrix","description":"QuantOracle: stats/correlation-matrix","url":"https://api.quantoracle.dev/v1/stats/correlation-matrix","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"method":{"enum":["pearson","spearman"],"type":"string","title":"Method","default":"pearson","description":"Correlation method"},"series":{"type":"object","title":"Series","description":"Named data series, e.g. {\"A\": [...], \"B\": [...]}","additionalProperties":{"type":"array","items":{"type":"number"}}},"include_eigenvalues":{"type":"boolean","title":"Include Eigenvalues","default":false,"description":"Whether to compute eigenvalue decomposition"}}},"responseSchema":null,"example":{"request":{"method":"pearson","series":{"Series_A":[1,2.5,3.2,4.1,5,5.8,6.5,7.2,8,8.7,9.5,10.1,10.8,11.5,12.2,12.9,13.6,14.3,15,15.7,16.4,17.1,17.8,18.5,19.2,19.9,20.6,21.3,22,22.7],"Series_B":[1.1,2.4,3.3,4,4.9,5.7,6.6,7.4,8.3,9.1,10,10.8,11.7,12.5,13.4,14.2,15.1,15.9,16.8,17.6,18.5,19.3,20.2,21,21.9,22.7,23.6,24.4,25.3,26.1],"Series_C":[0.9,2.6,3.1,4.2,5.1,5.9,6.8,7.6,8.5,9.3,10.2,11,11.9,12.7,13.6,14.4,15.3,16.1,17,17.8,18.7,19.5,20.4,21.2,22.1,22.9,23.8,24.6,25.5,26.3]},"include_eigenvalues":true},"response":{"n":30,"ms":15.34,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","powered_by":"QuantOracle"},"assets":["Series_A","Series_B","Series_C"],"method":"pearson","covariance":[[40.22033333,47.5043908,47.78954023],[47.5043908,56.16547126,56.48528736],[47.78954023,56.48528736,56.8154023]],"correlation":[[1,0.9995,0.9997],[0.9995,1,0.9999],[0.9997,0.9999,1]],"eigenvalues":[2.9994,0.0005,0.0001],"condition_number":29994}},"exampleRequest":{"method":"pearson","series":{"Series_A":[1,2.5,3.2,4.1,5,5.8,6.5,7.2,8,8.7,9.5,10.1,10.8,11.5,12.2,12.9,13.6,14.3,15,15.7,16.4,17.1,17.8,18.5,19.2,19.9,20.6,21.3,22,22.7],"Series_B":[1.1,2.4,3.3,4,4.9,5.7,6.6,7.4,8.3,9.1,10,10.8,11.7,12.5,13.4,14.2,15.1,15.9,16.8,17.6,18.5,19.3,20.2,21,21.9,22.7,23.6,24.4,25.3,26.1],"Series_C":[0.9,2.6,3.1,4.2,5.1,5.9,6.8,7.6,8.5,9.3,10.2,11,11.9,12.7,13.6,14.4,15.3,16.1,17,17.8,18.7,19.5,20.4,21.2,22.1,22.9,23.8,24.6,25.5,26.3]},"include_eigenvalues":true},"tags":["x402"],"displayCostAmount":"0.015","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.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MAOAAlqb7ZCqAmgF75Nae","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a Pearson (or other method) correlation matrix and covariance matrix for multiple numeric time series, with optional eigenvalue decomposition","exampleAgentPrompt":"Can you compute a Pearson correlation matrix with eigenvalues for these three return series — Series_A: [1, 2.5, 3.2, 4.1, 5], Series_B: [1.1, 2.4, 3.3, 4, 4.9], Series_C: [0.9, 2.6, 3.1, 4.2, 5.1] — so I can see how closely they move together?","exampleUseCases":null,"resultDescription":"Returns a full correlation matrix (n×n) and covariance matrix for all input series, plus eigenvalues of the correlation matrix, the condition number, list of asset names, sample count, and computation time in milliseconds.","failureModes":["Mismatched series lengths — series must have equal number of observations","Too few data points — need at least 2 observations per series","Invalid method name — only supported methods accepted","Empty series input — at least two named series required","Non-numeric values in series data — all entries must be numbers"],"whenToPreferThis":"Choose this endpoint when you need pairwise correlation and covariance statistics across multiple named time series in a single call, especially when eigenvalue decomposition is needed for portfolio optimization, PCA preparation, or multicollinearity diagnostics. Prefer over manual computation when you need a numerically stable matrix with optional spectral analysis baked in.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:35:13.340Z","isFirstParty":false}