# Equity Analytics API > Financial ratios, two-stage DCF, WACC, OLS beta, corporate-action adjustments, total-return indexes, Altman/Piotroski/Beneish screens, DuPont and peer multiples, dividend metrics, and ISIN/CUSIP/SEDOL/LEI check-digit validation from caller-supplied statements and prices. Each paid operation uses a fixed USDC price on Base with the x402 exact scheme. Unpaid GET, HEAD, and POST return 402 payment terms (POST validates the body only after payment terms are satisfied). A request that carries payment-signature is not yet charged: settlement happens only after a successful (2xx) result. HTTP 4xx/5xx are not charged. Coverage bodies with status complete, partial, or failed all return HTTP 200 and are charged at the full listed price. Settled 2xx responses include a payment-response header; 4xx/5xx do not. Follow https://www.brainiac.software/agent-instructions.txt for install, payment pins, idempotency, and billing rules. - Product: https://www.brainiac.software/api/equity-analytics - Docs: https://www.brainiac.software/api/equity-analytics/docs - OpenAPI: https://www.brainiac.software/api/equity-analytics/openapi.json - Contact: support@brainiac.software (https://www.brainiac.software/contact) ## Operations ### POST /api/v1/equity-analytics/financial-ratios $0.03 USDC. Profitability, liquidity, leverage, efficiency and valuation ratios from caller-supplied statements and an optional price. Missing fields yield null metrics; division by zero is reported. Inputs: statements, price?, unit? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-financial-ratios Example request: ```json { "statements": [ { "period": "FY2025", "revenue": 1000, "cogs": 550, "ebit": 300, "interestExpense": 10, "netIncome": 250, "cfo": 280, "capex": 80, "totalAssets": 900, "currentAssets": 400, "currentLiabilities": 450, "totalLiabilities": 700, "longTermDebt": 250, "receivables": 82, "inventory": 40, "equity": 200, "sharesOutstanding": 38, "cash": 50 } ], "price": 190.5, "unit": "USD thousands" } ``` Example response: ```json { "periods": [ { "period": "FY2025", "grossMargin": 0.45, "operatingMargin": 0.3, "netMargin": 0.25, "roa": 0.2777777777777778, "roe": 1.25, "currentRatio": 0.8888888888888888, "quickRatio": 0.8, "debtToEquity": 3.5, "interestCoverage": 30, "assetTurnover": 1.1111111111111112, "inventoryTurnover": 13.75, "dso": 29.93, "pe": 28.956, "pb": 36.195, "evToEbit": 24.796666666666667, "fcfYield": 0.02762812543168946, "missing": [], "reasons": {} } ], "unit": "USD thousands", "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Ratios use caller-supplied statement fields only. Missing inputs yield null metrics listed under missing; division by z…", "ROA and ROE use average assets/equity when a prior period is present, otherwise year-end values.", "…" ] } ``` ### POST /api/v1/equity-analytics/dcf-valuation $0.04 USDC. Discount explicit free cash flows and a Gordon or exit-multiple terminal value to enterprise and equity value per share, with a discount-rate and growth sensitivity grid. Inputs: fcf, discountRate, terminal, netDebt?, sharesOutstanding, midYear? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-dcf-valuation Example request: ```json { "fcf": [ 100, 110, 120 ], "discountRate": 0.08, "terminal": { "method": "gordon", "growth": 0.02 }, "netDebt": 200, "sharesOutstanding": 50, "midYear": false } ``` Example response: ```json { "pvExplicit": 282.159732, "terminalValue": 2040, "pvTerminal": 1619.417772, "enterpriseValue": 1901.577503, "equityValue": 1701.577503, "perShare": 34.03155, "sensitivity": [ { "discountRate": 0.07, "growth": 0.015, "perShare": 37.904414 }, { "discountRate": 0.07, "growth": 0.02, "perShare": 41.715783 }, "…" ], "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Two-stage DCF on caller FCF only. Gordon terminal requires growth < discountRate (invalid_growth otherwise).", "Exit-multiple terminal value is multiple × metric at year N as supplied; no separate forecast is built.", "…" ] } ``` ### POST /api/v1/equity-analytics/wacc-calculate $0.02 USDC. CAPM cost of equity and after-tax cost of debt combined into WACC from supplied equity and debt values. Inputs: equityValue, debtValue, riskFree, beta, equityRiskPremium, costOfDebt, taxRate, sizePremium? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-wacc-calculate Example request: ```json { "equityValue": 600, "debtValue": 400, "riskFree": 0.04, "beta": 1.2, "equityRiskPremium": 0.05, "costOfDebt": 0.05, "taxRate": 0.25, "sizePremium": 0 } ``` Example response: ```json { "costOfEquity": 0.1, "afterTaxCostOfDebt": 0.0375, "weights": { "equity": 0.6, "debt": 0.4 }, "wacc": 0.075, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Cost of equity is CAPM: riskFree + beta × equityRiskPremium + sizePremium.", "WACC uses supplied equity and debt market values; no target capital structure is inferred.", "…" ] } ``` ### POST /api/v1/equity-analytics/beta-regression $0.03 USDC. Align asset and benchmark closes, compute simple returns at daily, weekly or monthly frequency, and return OLS beta, alpha, R², standard error and optional Blume-adjusted beta. Inputs: assetPrices, benchmarkPrices, frequency?, blumeAdjust? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-beta-regression Example request: ```json { "assetPrices": [ { "date": "2024-02-01", "close": 100 }, { "date": "2024-02-02", "close": 102 }, { "date": "2024-02-03", "close": 104.03999999999999 }, { "date": "2024-02-04", "close": 106.12080000000002 }, { "date": "2024-02-05", "close": 108.243216 }, { "date": "2024-02-06", "close": 110.40808032 }, { "date": "2024-02-07", "close": 112.61624192640001 }, { "date": "2024-02-08", "close": 114.868566764928 }, { "date": "2024-02-09", "close": 117.16593810022657 }, { "date": "2024-02-10", "close": 119.50925686223111 }, { "date": "2024-02-11", "close": 121.89944199947573 }, { "date": "2024-02-12", "close": 124.33743083946524 }, { "date": "2024-02-13", "close": 126.82417945625457 }, { "date": "2024-02-14", "close": 129.36066304537965 }, { "date": "2024-02-15", "close": 131.94787630628724 }, { "date": "2024-02-16", "close": 134.586833832413 }, { "date": "2024-02-17", "close": 137.27857050906124 }, { "date": "2024-02-18", "close": 140.02414191924248 }, { "date": "2024-02-19", "close": 142.82462475762733 }, { "date": "2024-02-20", "close": 145.68111725277987 }, { "date": "2024-02-21", "close": 148.59473959783548 }, { "date": "2024-02-22", "close": 151.5666343897922 }, { "date": "2024-02-23", "close": 154.59796707758804 }, { "date": "2024-02-24", "close": 157.68992641913982 }, { "date": "2024-02-25", "close": 160.84372494752262 } ], "benchmarkPrices": [ { "date": "2024-02-01", "close": 100 }, { "date": "2024-02-02", "close": 101 }, { "date": "2024-02-03", "close": 102.01 }, { "date": "2024-02-04", "close": 103.03010000000002 }, { "date": "2024-02-05", "close": 104.060401 }, { "date": "2024-02-06", "close": 105.10100501000001 }, { "date": "2024-02-07", "close": 106.15201506010001 }, { "date": "2024-02-08", "close": 107.21353521070101 }, { "date": "2024-02-09", "close": 108.28567056280802 }, { "date": "2024-02-10", "close": 109.36852726843608 }, { "date": "2024-02-11", "close": 110.46221254112045 }, { "date": "2024-02-12", "close": 111.56683466653166 }, { "date": "2024-02-13", "close": 112.68250301319698 }, { "date": "2024-02-14", "close": 113.80932804332895 }, { "date": "2024-02-15", "close": 114.94742132376223 }, { "date": "2024-02-16", "close": 116.09689553699987 }, { "date": "2024-02-17", "close": 117.25786449236988 }, { "date": "2024-02-18", "close": 118.43044313729357 }, { "date": "2024-02-19", "close": 119.6147475686665 }, { "date": "2024-02-20", "close": 120.81089504435316 }, { "date": "2024-02-21", "close": 122.0190039947967 }, { "date": "2024-02-22", "close": 123.23919403474468 }, { "date": "2024-02-23", "close": 124.47158597509211 }, { "date": "2024-02-24", "close": 125.71630183484304 }, { "date": "2024-02-25", "close": 126.97346485319147 } ], "frequency": "daily", "blumeAdjust": true } ``` Example response: ```json { "beta": 0.3570770905, "adjustedBeta": 0.5692416506, "alpha": 0.016429229095, "r2": 0.251320132, "stdErrBeta": 0.1313843441, "n": 24, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Dates are inner-joined after resampling to the last close of each day, ISO week or calendar month.", "Beta uses sample covariance and variance (n − 1). Blume adjustment is 0.67β + 0.33 when blumeAdjust is true.", "…" ] } ``` ### POST /api/v1/equity-analytics/corporate-action-adjust $0.03 USDC. Apply split and cash-dividend factors backwards through a price series (CRSP-style multiplicative dividends) and return adjusted closes, volumes and cumulative factors. Inputs: prices, actions? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-corporate-action-adjust Example request: ```json { "prices": [ { "date": "2024-01-01", "close": 100, "volume": 1000 }, { "date": "2024-01-02", "close": 25, "volume": 4000 }, { "date": "2024-01-03", "close": 25.5, "volume": 4100 } ], "actions": [ { "exDate": "2024-01-02", "type": "split", "ratio": 4 } ] } ``` Example response: ```json { "adjusted": [ { "date": "2024-01-01", "close": 25, "volume": 4000, "factor": 0.25 }, { "date": "2024-01-02", "close": 25, "volume": 4000, "factor": 1 }, "…" ], "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Split ratio is new shares per old share: closes before exDate are divided by the ratio and volumes multiplied.", "Cash dividends use a CRSP-style multiplicative factor 1 − D / prior close, compounded backwards with splits.", "…" ] } ``` ### POST /api/v1/equity-analytics/total-return-series $0.03 USDC. Compound a total-return index from closes and cash dividends with optional withholding tax, and report price return, total return and CAGR. Inputs: prices, dividends?, base?, withholdingTax? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-total-return-series Example request: ```json { "prices": [ { "date": "2024-01-01", "close": 100 }, { "date": "2025-01-01", "close": 110 } ], "dividends": [ { "exDate": "2025-01-01", "amount": 2 } ], "base": 100, "withholdingTax": 0 } ``` Example response: ```json { "index": [ { "date": "2024-01-01", "value": 100 }, { "date": "2025-01-01", "value": 112 } ], "priceReturn": 0.1, "totalReturn": 0.12, "cagr": 0.1197399316, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Daily total return on an ex-date is (close + dividend × (1 − withholdingTax)) / prior close − 1; the index compounds fr…", "priceReturn ignores dividends. CAGR uses an actual/365.25 year fraction between the first and last dates.", "…" ] } ``` ### POST /api/v1/equity-analytics/altman-z-score $0.02 USDC. Compute the public manufacturing Z-score, private Z′ or non-manufacturing Z″ with published safe/grey/distress zones from caller-supplied balance-sheet and income items. Inputs: variant, workingCapital, retainedEarnings, ebit, marketValueEquity?, bookEquity?, sales?, totalAssets, totalLiabilities? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-altman-z-score Example request: ```json { "variant": "Z", "workingCapital": 100, "retainedEarnings": 200, "ebit": 100, "marketValueEquity": 1500, "sales": 1200, "totalAssets": 1000, "totalLiabilities": 1000 } ``` Example response: ```json { "score": 2.83, "zone": "grey", "components": { "x1": 0.1, "x2": 0.2, "x3": 0.1, "x4": 1.5, "x5": 1.2 }, "sources": [ { "source": "Altman Z-score models (Altman 1968, 1983, 2000)", "url": "https://en.wikipedia.org/wiki/Altman_Z-score", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Z is the public manufacturing model; Z_prime uses book equity; Z_double_prime omits the sales/assets term.", "Zone cut-offs follow the published bands for each variant. This is a screening aid, not a credit rating.", "…" ] } ``` ### POST /api/v1/equity-analytics/piotroski-f-score $0.02 USDC. Nine binary profitability, leverage, liquidity and operating-efficiency tests from two years of statements. Inputs: current, prior Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-piotroski-f-score Example request: ```json { "current": { "revenue": 110, "cogs": 40, "netIncome": 12, "cfo": 18, "totalAssets": 100, "currentAssets": 55, "currentLiabilities": 20, "longTermDebt": 8, "sharesOutstanding": 10, "priorTotalAssets": 90 }, "prior": { "revenue": 90, "cogs": 40, "netIncome": 5, "cfo": 6, "totalAssets": 90, "currentAssets": 40, "currentLiabilities": 20, "longTermDebt": 15, "sharesOutstanding": 10, "priorTotalAssets": 80 } } ``` Example response: ```json { "score": 9, "tests": { "roaPositive": true, "cfoPositive": true, "roaImproved": true, "accrual": true, "leverageDown": true, "currentRatioUp": true, "noDilution": true, "grossMarginUp": true, "assetTurnoverUp": true }, "sources": [ { "source": "Piotroski F-score (Piotroski 2000)", "url": "https://en.wikipedia.org/wiki/Piotroski_F-score", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Nine binary tests from Piotroski (2000). ROA uses priorTotalAssets when supplied, otherwise year-end totalAssets.", "A missing input needed for a test makes that test false.", "…" ] } ``` ### POST /api/v1/equity-analytics/beneish-m-score $0.03 USDC. Compute DSRI, GMI, AQI, SGI, DEPI, SGAI, LVGI and TATA and the Beneish (1999) M-score with the −1.78 flag threshold. Inputs: current, prior Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-beneish-m-score Example request: ```json { "current": { "revenue": 100, "cogs": 60, "receivables": 10, "currentAssets": 40, "ppeNet": 30, "totalAssets": 100, "depreciation": 5, "sga": 10, "netIncome": 10, "cfo": 10, "currentLiabilities": 20, "longTermDebt": 10 }, "prior": { "revenue": 100, "cogs": 60, "receivables": 10, "currentAssets": 40, "ppeNet": 30, "totalAssets": 100, "depreciation": 5, "sga": 10, "netIncome": 10, "cfo": 10, "currentLiabilities": 20, "longTermDebt": 10 } } ``` Example response: ```json { "m": -2.48, "flag": false, "threshold": -1.78, "indices": { "DSRI": 1, "GMI": 1, "AQI": 1, "SGI": 1, "DEPI": 1, "SGAI": 1, "LVGI": 1, "TATA": 0 }, "sources": [ { "source": "Beneish M-score eight-variable model (Beneish 1999)", "url": "https://en.wikipedia.org/wiki/Beneish_M-score", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Eight-variable Beneish (1999) model. Indices that cannot be formed from the supplied fields default to 1 (TATA to 0).", "flag is true when M > −1.78. This is a screening statistic, not proof of earnings manipulation.", "…" ] } ``` ### POST /api/v1/equity-analytics/dupont-analysis $0.02 USDC. Decompose ROE into net margin, asset turnover and equity multiplier, and optionally the five-step tax, interest and EBIT-margin path. Inputs: netIncome, revenue, totalAssets, equity, ebt?, ebit? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-dupont-analysis Example request: ```json { "netIncome": 150, "revenue": 1000, "totalAssets": 800, "equity": 400, "ebt": 200, "ebit": 220 } ``` Example response: ```json { "threeStep": { "netMargin": 0.15, "assetTurnover": 1.25, "equityMultiplier": 2, "roe": 0.375 }, "fiveStep": { "taxBurden": 0.75, "interestBurden": 0.9090909091, "ebitMargin": 0.22, "assetTurnover": 1.25, "equityMultiplier": 2, "roe": 0.375 }, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Three-step ROE is net margin × asset turnover × equity multiplier. Five-step needs ebt and ebit.", "Outputs are calculations on caller-supplied inputs for human review. No market data is fetched, and this is not investm…" ] } ``` ### POST /api/v1/equity-analytics/peer-multiples $0.03 USDC. Summarise peer EV/EBITDA, P/E and related multiples with optional IQR trimming, and imply enterprise, equity and per-share values for a target. Inputs: target, peers, multiples, trimOutliersIqr? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-peer-multiples Example request: ```json { "target": { "ebitda": 100, "netDebt": 50, "shares": 10, "netIncome": 60 }, "peers": [ { "name": "A", "evToEbitda": 8 }, { "name": "B", "evToEbitda": 10 }, { "name": "C", "evToEbitda": 12 } ], "multiples": [ "evToEbitda" ], "trimOutliersIqr": true } ``` Example response: ```json { "stats": { "evToEbitda": { "min": 8, "median": 10, "mean": 10, "max": 12, "n": 3 } }, "implied": { "evToEbitda": { "ev": 1000, "equity": 950, "perShare": 95 } }, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Negative and missing peer multiples are dropped. Optional 1.5×IQR trimming uses sample quartiles.", "Implied equity for EV multiples is median × target metric − netDebt.", "…" ] } ``` ### POST /api/v1/equity-analytics/dividend-metrics $0.02 USDC. Compute trailing yield, payout ratio, FCF coverage and DPS CAGR from a price and a dividends-per-share series. Inputs: price, dividendsPerShare, eps?, fcfPerShare? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-dividend-metrics Example request: ```json { "price": 50, "dividendsPerShare": [ { "year": 2021, "dps": 1 }, { "year": 2025, "dps": 1.4641 } ], "eps": 3, "fcfPerShare": 2.5 } ``` Example response: ```json { "yield": 0.029282, "payoutRatio": 0.4880333333, "fcfCoverage": 1.7075336384, "cagr": 0.1, "sources": [ { "source": "Caller-supplied statements, prices and identifiers processed locally", "url": "https://www.brainiac.software/api/v1/equity-analytics", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Yield uses the latest DPS / price. CAGR uses (last/first)^(1/years) − 1 over the year span of the series.", "Outputs are calculations on caller-supplied inputs for human review. No market data is fetched, and this is not investm…" ] } ``` ### POST /api/v1/equity-analytics/security-identifier-validate $0.02 USDC. Detect identifier type by pattern, validate check digits, and optionally convert CUSIP or SEDOL to ISIN. Existence is not confirmed. Inputs: identifiers, toIsin? Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-security-identifier-validate Example request: ```json { "identifiers": [ "US0378331005", "037833100", "0263494" ], "toIsin": { "country": "US" } } ``` Example response: ```json { "results": [ { "input": "US0378331005", "type": "ISIN", "valid": true }, { "input": "037833100", "type": "CUSIP", "valid": true, "isin": "US0378331005" }, "…" ], "sources": [ { "source": "ISIN ISO 6166, CUSIP check digit, SEDOL check digit", "url": "https://www.iso.org/standard/78502.html", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Validates check digits and structure only. Existence on an exchange or in a directory is not confirmed; no CUSIP/ISIN/L…", "CUSIP→ISIN uses the supplied toIsin.country (US or CA, default US). SEDOL→ISIN uses GB00 + SEDOL + ISIN check digit.", "…" ] } ``` ### POST /api/v1/equity-analytics/lei-validate $0.01 USDC. Check ISO 17442 structure and ISO/IEC 7064 MOD 97-10 check digits for a Legal Entity Identifier. Registration status is not looked up. Inputs: lei Docs: https://www.brainiac.software/api/equity-analytics/docs#equity-analytics-lei-validate Example request: ```json { "lei": "HWUPKR0MPOU8FGXBT394" } ``` Example response: ```json { "valid": true, "louPrefix": "HWUP", "checkDigits": "94", "sources": [ { "source": "ISO 17442 LEI structure and ISO/IEC 7064 MOD 97-10 check digits (GLEIF documentation)", "url": "https://www.gleif.org/en/about-lei/iso-17442-the-lei-code-structure", "retrievedAt": "2026-11-14", "status": "ok" } ], "limitations": [ "Validates ISO 17442 structure and ISO/IEC 7064 MOD 97-10 check digits only.", "Does not confirm the LEI is registered or active; no GLEIF data is bundled.", "…" ] } ```