All Posts
TutorialEarnings APIEarnings Calendar APIEPS8-K Item 2.02TutorialNVDA

Earnings Calendar API and Earnings API: A Developer Walkthrough

Every endpoint in the StockFit earnings API: the earnings calendar API (upcoming reports, batch lookup, single-ticker date), EPS history, snapshot, trends, growth, quality, and 8-K Item 2.02. Live NVDA JSON and cURL examples.

Published May 11, 202612 min readStockFit Engineering
Earnings Calendar API and Earnings API: A Developer Walkthrough

This post walks the StockFit earnings API end to end: the earnings calendar API for upcoming reports, the per-symbol earnings date lookup, the earnings snapshot, EPS history, multi-year trends, line-item growth rates, earnings quality, and the 8-K Item 2.02 print stream. Every JSON block below is a verbatim production response keyed on NVIDIA (NVDA) ahead of its FY2027 Q1 report on May 27, 2026.

If you are building an earnings watcher, a screener, an analyst tool, or a strategy that trades around earnings, this is the full set of endpoints you need. Each section gives the cURL call, the live response, and what to do with it. Tier coverage is at the bottom.

The StockFit earnings API: eight endpoints, one base URL

The earnings API lives under /api/earnings/*. The earnings calendar API is three of those endpoints (/upcoming, /calendar, /date). The rest of the earnings API covers history, snapshot, trends, and quality. The 8-K Item 2.02 stream is on /api/filings/latest with event=earnings, and line-item growth lives on /api/financials/growth.

text
/api/earnings/upcoming         Earnings calendar API: market-wide upcoming reports (1-14 day window)
/api/earnings/calendar         Earnings calendar API: batch lookup, up to 50 tickers per call
/api/earnings/date             Earnings calendar API: single-ticker date prediction
/api/earnings/snapshot         One-call summary (EPS, revenue, margins, returns, Z/F-score)
/api/earnings/eps-history      Quarterly or annual EPS series with YoY growth
/api/earnings/trends           3yr/5yr CAGRs, margin direction, quality ratios
/api/earnings/chart/eps        Chart-ready EPS and net income time series
/api/earnings/chart/quality    Chart-ready net income vs operating cash flow

/api/financials/growth         Line-item YoY growth (revenue, gross, operating, net, FCF)
/api/filings/latest            Filings stream, filter event=earnings for 8-K Item 2.02
/api/filings/item              Extract Item 2.02 body as HTML or plain text

Earnings calendar API: upcoming, calendar, date

The earnings calendar API answers who is reporting next? Three endpoints share the same data source (each issuer's historical SEC filing cadence) but differ in shape.

/api/earnings/upcoming: the market-wide calendar

/api/earnings/upcoming returns every US-listed issuer expected to report within the next N days (default 7, max 14). Paginated. Companies in their first year of reporting (no prior cadence to learn from) are excluded.

bash
curl 'https://api.stockfit.io/v1/api/earnings/upcoming?days=14&pageSize=15' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
{
  "page": 1,
  "pageSize": 15,
  "totalPages": 43,
  "totalResults": 637,
  "data": [
    { "symbol": "ACHR", "name": "Archer Aviation Inc.",          "earningsDate": "2026-05-11", "filingType": "10-Q" },
    { "symbol": "AGEN", "name": "AGENUS INC",                    "earningsDate": "2026-05-11", "filingType": "10-Q" },
    { "symbol": "APGE", "name": "Apogee Therapeutics, Inc.",     "earningsDate": "2026-05-11", "filingType": "10-Q" },
    { "symbol": "ARWR", "name": "ARROWHEAD PHARMACEUTICALS, INC.","earningsDate": "2026-05-11", "filingType": "10-Q" }
  ]
}

637 expected filings in the next 14 days, four shown. Typical use: schedule overnight jobs to refresh the calendar, then fan out per-symbol requests for the rest of the earnings API.

/api/earnings/calendar: batch lookup for a watchlist

When you already know the symbols, use /api/earnings/calendar for a batch of up to 50 tickers in one request. This is the right call shape for keeping a static watchlist's earnings dates up to date.

/api/earnings/date: single-ticker date

For a single symbol, /api/earnings/date returns the next predicted earnings and filing date.

bash
curl 'https://api.stockfit.io/v1/api/earnings/date?symbol=NVDA' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
{
  "symbol": "NVDA",
  "earningsDate": "2026-05-27",
  "filingDate": "2026-05-27"
}

Predicted dates come from each issuer's historical filing cadence (when last year's same-quarter 10-Q hit EDGAR, plus or minus fiscal-calendar drift). For large- and mid-cap issuers the prediction lands within a few business days of the actual filing. First-time filers are excluded from /upcoming because there is no prior cadence to fit.

Earnings snapshot endpoint

/api/earnings/snapshot returns the latest annual fundamentals as a single object: EPS, revenue, three margins, three returns, free cash flow, growth rates, Piotroski F-Score, Altman Z-Score, and the next expected earnings date. One call per symbol, useful for screening 500 tickers without 500 follow-ups.

bash
curl 'https://api.stockfit.io/v1/api/earnings/snapshot?symbol=NVDA' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
{
  "symbol": "NVDA",
  "period": "2026-01-31",
  "fiscalYear": 2026,
  "fiscalPeriod": "FY",
  "eps": 4.93,
  "epsDiluted": 4.9,
  "netIncome": 120067000000,
  "revenue": 215938000000,
  "grossMargin": 71.07,
  "operatingMargin": 60.38,
  "netMargin": 55.6,
  "roe": 101.49,
  "roic": 92.57,
  "freeCashFlow": 89935000000,
  "fcfToNetIncome": 74.9,
  "revenueGrowth": 0.6547,
  "epsGrowth": 0.6599,
  "netIncomeGrowth": 0.6475,
  "piotroskiFScore": 4,
  "altmanZScore": 6.71,
  "altmanZone": "safe",
  "nextEarningsDate": "2026-05-27",
  "nextFilingDate": "2026-05-27"
}

For NVDA, the latest FY ended 2026-01-31 with $215.9B revenue, 60.4% operating margin, and 65% YoY EPS growth. Z-Score 6.71 is well inside the safe zone; F-Score 4 (range 0-9) flags that the strength is concentrated in profitability and growth rather than working-capital conservatism.

EPS history endpoint

/api/earnings/eps-history returns the quarterly or annual EPS series with YoY growth pre-computed. Period options: annual, quarter, or ttm for a single trailing-twelve-months figure. Data is mapped from income-statement XBRL in each 10-K, 10-Q, and 20-F.

bash
curl 'https://api.stockfit.io/v1/api/earnings/eps-history?symbol=NVDA&period=quarter&limit=8' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
[
  { "fiscalYear": 2026, "fiscalPeriod": "Q4", "eps": 1.77, "epsDiluted": 1.76, "netIncome": 42960000000, "epsGrowth": 0.3511 },
  { "fiscalYear": 2026, "fiscalPeriod": "Q3", "eps": 1.31, "epsDiluted": 1.30, "netIncome": 31910000000, "epsGrowth": 0.213 },
  { "fiscalYear": 2026, "fiscalPeriod": "Q2", "eps": 1.08, "epsDiluted": 1.08, "netIncome": 26422000000, "epsGrowth": 0.4026 },
  { "fiscalYear": 2026, "fiscalPeriod": "Q1", "eps": 0.77, "epsDiluted": 0.76, "netIncome": 18775000000, "epsGrowth": -0.1444 },
  { "fiscalYear": 2025, "fiscalPeriod": "Q4", "eps": 0.90, "epsDiluted": 0.89, "netIncome": 22091000000, "epsGrowth": 0.1392 },
  { "fiscalYear": 2025, "fiscalPeriod": "Q3", "eps": 0.79, "epsDiluted": 0.78, "netIncome": 19309000000, "epsGrowth": 0.1618 },
  { "fiscalYear": 2025, "fiscalPeriod": "Q2", "eps": 0.68, "epsDiluted": 0.67, "netIncome": 16599000000, "epsGrowth": 0.1333 },
  { "fiscalYear": 2025, "fiscalPeriod": "Q1", "eps": 0.60, "epsDiluted": 0.60, "netIncome": 14881000000, "epsGrowth": 0.20 }
]

The May 27 print has a concrete comparator: Q1 FY2026 (April 2025) was $0.76 diluted on $18.8B net income. Trailing four quarters average $1.23 diluted, with sequential growth re-accelerating after Q1 FY2026's soft quarter.

For chart input shape, /api/earnings/chart/eps returns the same series pre-aligned for line charts (absolute EPS plus net income, no growth math required client-side).

/api/earnings/trends returns the 3yr and 5yr CAGRs for revenue, net income, EPS, and free cash flow, plus the margin trajectory with a classified direction (expanding, contracting, stable) measured against the same-quarter value three years prior.

bash
curl 'https://api.stockfit.io/v1/api/earnings/trends?symbol=NVDA' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
{
  "symbol": "NVDA",
  "latestPeriod": "2026-01-31",
  "margins": {
    "gross":     { "latest": 71.1, "threeYearAgo": 56.9, "direction": "expanding" },
    "operating": { "latest": 60.4, "threeYearAgo": 15.7, "direction": "expanding" },
    "net":       { "latest": 55.6, "threeYearAgo": 16.2, "direction": "expanding" }
  },
  "netMarginStdDev": 14.6,
  "netMarginStdDevRecent": 15.0,
  "historicalMaxNetMargin": 55.8,
  "cagr": {
    "revenue3yr":      100.0,
    "revenue5yr":       66.9,
    "netIncome3yr":    201.8,
    "netIncome5yr":     94.3,
    "eps3yr":          201.4,
    "eps5yr":           22.9,
    "freeCashFlow3yr": 349.5
  },
  "quality": {
    "fcfToNetIncome":     74.9,
    "interestCoverage":  503.4,
    "debtToOperatingIncome": 0.1,
    "roe":                76.3
  }
}

NVDA operating margin expanded from 15.7% to 60.4% over three years. Net margin (55.6%) is at the top end of the historical range (max 55.8%), so the next print's upside is more likely to come from volume than from margin. The 3yr revenue CAGR of 100% is also the unsustainable number to watch.

If you are running trends inside a backtest, every value is correct at the latest fiscal close, but only as a point-in-time signal as old as that timestamp. The point-in-time fundamentals guide covers how to unwind amendments so your simulation never reads a value disclosed after the decision timestamp.

Line-item growth via /api/financials/growth

EPS growth is a residual of revenue, margin, share count, and tax. /api/financials/growth exposes the underlying line-item growth rates (revenue, gross profit, operating income, net income, EBITDA, free cash flow, total assets, equity, operating cash flow) so you can attribute the bottom-line number to its drivers.

bash
curl 'https://api.stockfit.io/v1/api/financials/growth?symbol=NVDA&period=quarter&limit=4' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'
json
[
  {
    "period": "2026-01-31", "fiscalYear": 2026, "fiscalPeriod": "Q4",
    "revenueGrowth": 0.1951, "grossProfitGrowth": 0.2209,
    "operatingIncomeGrowth": 0.2302, "netIncomeGrowth": 0.3463,
    "epsGrowth": 0.3511, "ebitdaGrowth": 0.3303,
    "operatingCashFlowGrowth": 0.5236
  },
  {
    "period": "2025-10-31", "fiscalYear": 2026, "fiscalPeriod": "Q3",
    "revenueGrowth": 0.2196, "grossProfitGrowth": 0.2362,
    "operatingIncomeGrowth": 0.2662, "netIncomeGrowth": 0.2077,
    "epsGrowth": 0.213, "operatingCashFlowGrowth": 0.5458
  },
  {
    "period": "2025-07-31", "fiscalYear": 2026, "fiscalPeriod": "Q2",
    "revenueGrowth": 0.0608, "grossProfitGrowth": 0.2694,
    "operatingIncomeGrowth": 0.3144, "netIncomeGrowth": 0.4073,
    "epsGrowth": 0.4026
  },
  {
    "period": "2025-04-30", "fiscalYear": 2026, "fiscalPeriod": "Q1",
    "revenueGrowth": 0.1203, "grossProfitGrowth": -0.0715,
    "operatingIncomeGrowth": -0.0997, "netIncomeGrowth": -0.1501,
    "epsGrowth": -0.1444
  }
]

Reading Q4 vs Q1 line-by-line: Q4 FY2026 revenue +19.5%, gross profit +22.1% (margin expansion), EPS +35%. Q1 FY2026 revenue +12% but gross profit -7%, and the only quarter in the trailing year with negative EPS growth. That makes Q1 FY2026 the comparator for the May 27 print, which gives base-effect tailwind even on flat gross-margin operating leverage.

Earnings quality endpoint

Two companies can report identical EPS while telling very different stories. The reliable one converts net income to operating cash flow near 1:1. The brittle one accrues revenue that does not land in the bank. /api/earnings/chart/quality returns chart-ready net-income-vs-operating-cash-flow pairs over time. As a single ratio, fcfToNetIncome on /api/earnings/snapshot answers the same question (NVDA: 74.9%, with the gap explained by data-center capex).

8-K Item 2.02: the live earnings print

US issuers report earnings on Form 8-K under Item 2.02, Results of Operations and Financial Condition, within minutes of market close. The earnings press release is attached as Exhibit 99.1. The matching 10-Q follows hours or days later. The official 8-K instructions on sec.gov spell out the item.

Stream all earnings 8-Ks across the market with /api/filings/latest filtered to event=earnings. The endpoint classifies 8-K items server-side, so you skip the client-side parsing.

bash
curl 'https://api.stockfit.io/v1/api/filings/latest?event=earnings&pageSize=10' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

Once an accession number is in hand, /api/filings/item with item=2.02 extracts the body as HTML or plain text for downstream summarization or string-matching against the prior quarter's release. The companion SEC forms field guide lists every 8-K item code we support (1.01 material agreements, 5.02 officer changes, 2.05 exit activities, etc.).

Full earnings API workflow in cURL

Same API key end to end. Pipe through jq for ad-hoc filtering.

bash
# 1. Earnings calendar API: what is reporting in the next 14 days
curl 'https://api.stockfit.io/v1/api/earnings/upcoming?days=14' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY' | jq '.data[] | select(.symbol == "NVDA")'

# 2. NVDA earnings snapshot
curl 'https://api.stockfit.io/v1/api/earnings/snapshot?symbol=NVDA' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

# 3. NVDA EPS history with YoY growth
curl 'https://api.stockfit.io/v1/api/earnings/eps-history?symbol=NVDA&period=quarter&limit=8' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

# 4. NVDA multi-year trends and margin trajectory
curl 'https://api.stockfit.io/v1/api/earnings/trends?symbol=NVDA' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

# 5. NVDA line-item growth
curl 'https://api.stockfit.io/v1/api/financials/growth?symbol=NVDA&period=quarter&limit=4' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

# 6. Live 8-K Item 2.02 earnings prints across the market
curl 'https://api.stockfit.io/v1/api/filings/latest?event=earnings&pageSize=20' \
  -H 'Authorization: Bearer $STOCKFIT_API_KEY'

Node.js workflow for the earnings API

Same workflow in Node.js 18+ (native fetch). Save as earnings-workflow.mjs and run with STOCKFIT_API_KEY=fl_xxx node earnings-workflow.mjs.

javascript
// earnings-workflow.mjs: exercise the StockFit earnings API end to end.
const API = 'https://api.stockfit.io/v1';
const KEY = process.env.STOCKFIT_API_KEY;
if (!KEY) throw new Error('Set STOCKFIT_API_KEY');

const call = async (path) => {
  const res = await fetch(`${API}${path}`, { headers: { Authorization: `Bearer ${KEY}` } });
  if (!res.ok) throw new Error(`${res.status} ${res.statusText} on ${path}`);
  return res.json();
};

const symbol = 'NVDA';

// 1. Earnings calendar API: find the symbol in the next 14 days of reporters
const upcoming = await call(`/api/earnings/upcoming?days=14&pageSize=100`);
const slot = upcoming.data.find((r) => r.symbol === symbol);
console.log('upcoming →', slot ?? '(symbol not in next 14 days)');

// 2. Earnings calendar API: single-ticker date
const date = await call(`/api/earnings/date?symbol=${symbol}`);
console.log('date →', date);

// 3. Earnings snapshot
const snap = await call(`/api/earnings/snapshot?symbol=${symbol}`);
console.log('snapshot →', {
  period: snap.period, eps: snap.eps, revenue: snap.revenue,
  operatingMargin: snap.operatingMargin, revenueGrowth: snap.revenueGrowth,
  nextEarningsDate: snap.nextEarningsDate,
});

// 4. EPS history with YoY growth
const eps = await call(`/api/earnings/eps-history?symbol=${symbol}&period=quarter&limit=4`);
console.log('eps-history →', eps.map((q) => ({
  fy: q.fiscalYear, fp: q.fiscalPeriod, epsDiluted: q.epsDiluted, yoy: q.epsGrowth,
})));

// 5. Trends and margin trajectory
const trends = await call(`/api/earnings/trends?symbol=${symbol}`);
console.log('trends →', {
  marginsDirection: {
    gross: trends.margins.gross.direction,
    operating: trends.margins.operating.direction,
    net: trends.margins.net.direction,
  },
  revenue3yrCAGR: trends.cagr.revenue3yr,
  eps3yrCAGR: trends.cagr.eps3yr,
});

// 6. Line-item growth decomposition
const growth = await call(`/api/financials/growth?symbol=${symbol}&period=quarter&limit=1`);
console.log('growth →', growth[0]);

// 7. Earnings 8-K stream (Item 2.02) across the market
const prints = await call(`/api/filings/latest?event=earnings&pageSize=3`);
console.log('filings/latest event=earnings →', prints.data.slice(0, 3));

Verbatim output (executed against the production API on 2026-05-11). NVDA does not appear under /upcoming?days=14 because its predicted earnings date is May 27, which is 16 days out (the endpoint caps the look-ahead at 14):

text
upcoming → (symbol not in next 14 days)
date → { symbol: 'NVDA', earningsDate: '2026-05-27', filingDate: '2026-05-27' }
snapshot → {
  period: '2026-01-31',
  eps: 4.93,
  revenue: 215938000000,
  operatingMargin: 60.38,
  revenueGrowth: 0.6547,
  nextEarningsDate: '2026-05-27'
}
eps-history → [
  { fy: 2026, fp: 'Q4', epsDiluted: 1.76, yoy: 0.3511 },
  { fy: 2026, fp: 'Q3', epsDiluted: 1.3,  yoy: 0.213  },
  { fy: 2026, fp: 'Q2', epsDiluted: 1.08, yoy: 0.4026 },
  { fy: 2026, fp: 'Q1', epsDiluted: 0.76, yoy: -0.1444 }
]
trends → {
  marginsDirection: { gross: 'expanding', operating: 'expanding', net: 'expanding' },
  revenue3yrCAGR: 100,
  eps3yrCAGR: 201.4
}
growth → {
  period: '2026-01-31', fiscalYear: 2026, fiscalPeriod: 'Q4',
  revenueGrowth: 0.1951, grossProfitGrowth: 0.2209,
  operatingIncomeGrowth: 0.2302, netIncomeGrowth: 0.3463,
  epsGrowth: 0.3511, ebitdaGrowth: 0.3303,
  freeCashFlowGrowth: null, totalAssetsGrowth: 0.2833,
  stockholdersEquityGrowth: 0.3229, operatingCashFlowGrowth: 0.5236
}
filings/latest event=earnings → [
  {
    type: '8-K',
    accessionNumber: '0001104659-26-054691',
    dateFiled: '2026-05-04',
    items: [ '2.02', '7.01', '9.01' ],
    events: [ 'earnings', 'reg_fd', 'financial_exhibits' ],
    symbol: 'NSSC',
    companyName: 'NAPCO SECURITY TECHNOLOGIES, INC'
  },
  {
    type: '8-K',
    accessionNumber: '0000764622-26-000026',
    dateFiled: '2026-05-04',
    items: [ '2.02', '7.01', '9.01' ],
    events: [ 'earnings', 'reg_fd', 'financial_exhibits' ],
    symbol: 'PNW',
    companyName: 'PINNACLE WEST CAPITAL CORP'
  },
  {
    type: '8-K',
    accessionNumber: '0001193125-26-204161',
    dateFiled: '2026-05-04',
    items: [ '2.02', '8.01', '9.01' ],
    events: [ 'earnings', 'other', 'financial_exhibits' ],
    symbol: 'CATX',
    companyName: 'Perspective Therapeutics, Inc.'
  }
]

Note the items array on each 8-K record. The event filter (event=earnings) is server-side and looks at item codes, so a filing tagged with 2.02 plus 7.01 (Reg FD) plus 9.01 (financial exhibits) shows up exactly once in the earnings stream. No client-side parsing required.

Earnings API tier coverage

Endpoint access by subscription tier. The earnings calendar API endpoints (/upcoming, /calendar) require Stock or higher. EPS history and chart endpoints are free.

Free signup at /signup. No credit card required.

Earnings API via MCP for AI agents

Every endpoint above is also registered as an MCP tool. The same API key works as both a REST key and an MCP key, so Claude Desktop, Claude Code, Cursor, and VS Code agents can call earnings_upcoming, earnings_trends, earnings_snapshot, etc. directly. No separate plan, no SDK glue. Setup details at /mcp.

FAQ

What is an earnings calendar API?

An earnings calendar API returns the predicted earnings report dates for public companies. The StockFit earnings calendar API has three endpoints: /api/earnings/upcoming for the market-wide list of companies reporting in the next 1 to 14 days, /api/earnings/calendar for batch lookup of up to 50 specific tickers, and /api/earnings/date for a single ticker. Dates are predicted from each issuer's historical SEC filing cadence.

What endpoints does the earnings API provide?

The StockFit earnings API has eight endpoints: /api/earnings/upcoming, /api/earnings/calendar, /api/earnings/date, /api/earnings/snapshot, /api/earnings/eps-history, /api/earnings/trends, /api/earnings/chart/eps, and /api/earnings/chart/quality. Add /api/financials/growth for line-item growth and /api/filings/latest with event=earnings for the 8-K Item 2.02 stream.

How do I find upcoming earnings dates programmatically?

Call /api/earnings/upcoming with days=N (1 to 14). The response is paginated and contains ticker, name, exchange, predicted earnings date, and predicted filing date. For a watchlist of known symbols, use /api/earnings/calendar with up to 50 tickers per call. For a single symbol, use /api/earnings/date.

How does the earnings calendar API predict dates?

The earnings calendar API predicts dates from each issuer's historical SEC filing cadence: when the same-quarter 10-Q or 10-K hit EDGAR last year, plus or minus fiscal-calendar drift. For large- and mid-cap issuers the prediction lands within a few business days of the actual filing. First-time filers are excluded from /api/earnings/upcoming because there is no prior cadence to fit. For an authoritative same-day source, monitor /api/filings/latest with event=earnings.

How do I get historical EPS through the earnings API?

Call /api/earnings/eps-history with symbol, period=quarter|annual|ttm, and limit. The response contains basic EPS, diluted EPS, net income, share count, and YoY EPS growth per period. Values come from income-statement XBRL in each 10-K, 10-Q, or 20-F.

What is 8-K Item 2.02 and how do I access it via API?

8-K Item 2.02 is the SEC filing section for “Results of Operations and Financial Condition,” used by US issuers to announce quarterly earnings within minutes of market close. The earnings press release is attached as Exhibit 99.1. Access via the earnings API by calling /api/filings/latest with event=earnings for the stream, then /api/filings/item with item=2.02 for the body as HTML or plain text.

Which tier do I need for the earnings calendar API and earnings API?

The Stock tier ($39/mo) unlocks the full earnings calendar API (/api/earnings/upcoming, /api/earnings/calendar) plus /api/earnings/trends and /api/filings/item. Starter ($15/mo) covers /api/earnings/snapshot, /api/earnings/date, /api/earnings/eps-history, /api/financials/growth, and /api/filings/latest. The free tier exposes /api/earnings/eps-history, /api/earnings/chart/eps, and /api/earnings/chart/quality for prototyping. No credit card to sign up.

How do I avoid look-ahead bias when backtesting an earnings strategy?

Two rules: never use a fact in simulation before its original filing date, and never use a restated value before the restatement's filing date. Every StockFit fundamentals response includes a top-level dateFiled for the original filing and per-amendment before values in the sources map. The unwind algorithm is a few lines of code. See the point-in-time backtesting guide for the full walkthrough.

Ready to build?

Free API key, no credit card. Every endpoint mentioned in this post is available on the free tier.

Get Your Free API Key