Example queries

Questions people ask of the data, answered in pandas and in SQL (DuckDB reads the parquet files directly). Run them from the folder with your downloaded files. Each one is tested against every release.

Using Python? pip install varve-data downloads the files and loads any table in one line: vd.load("quarterly") instead of pd.read_parquet. Library details.

The habits they share: join fundamentals on filed, never period_end; key companies on varve_id; map tickers with the interval that was valid on the date. prices stands for your own price table (symbol, date, close).

Varve Fundamentals

varve_fundamentals_quarterly

Every company's latest public quarter on 31 March 2020

Filter on filed, not period_end: on 31 March most December quarters weren't filed yet.

import pandas as pd
q = pd.read_parquet("varve_fundamentals_quarterly.parquet")
q = q[q["lineage_primary"] & (q["filed"] <= "2020-03-31")]
latest = q.sort_values(["filed", "period_end"]).groupby("varve_id").tail(1)
latest[["ticker", "period_end", "filed", "revenue", "net_income"]]
varve_fundamentals_quarterly

Attach the quarter that was public on each price date

An as-of join on filed. prices needs varve_id (see ticker_history for mapping symbols).

import pandas as pd
q = pd.read_parquet("varve_fundamentals_quarterly.parquet")
q = q[q["lineage_primary"]].dropna(subset=["filed"]).sort_values("filed")
panel = pd.merge_asof(prices.sort_values("date"), q[["varve_id", "filed", "period_end", "revenue", "equity"]],
                      left_on="date", right_on="filed", by="varve_id", direction="backward")
panel
varve_fundamentals_factors

Top decile by gross profitability on 31 March 2020

Each company's newest factor row public that day, among companies still reporting.

import pandas as pd
f = pd.read_parquet("varve_fundamentals_factors.parquet")
f = f[f["filed"] <= "2020-03-31"].sort_values(["filed", "period_end"]).groupby("varve_id").tail(1)
f = f[f["period_end"] >= "2019-06-30"]
top = f[f["gross_profitability"] >= f["gross_profitability"].quantile(0.9)]
top.sort_values("gross_profitability", ascending=False)[["ticker", "period_end", "gross_profitability", "f_score"]]
varve_fundamentals_facts

Where a number came from: Apple's annual revenue, with the source filing

Every value carries the accession number of the filing that first reported it.

import pandas as pd
f = pd.read_parquet("varve_fundamentals_facts.parquet",
                    filters=[("varve_id", "==", "VD320193"), ("field", "==", "revenue"), ("duration", "==", "FY")])
f = f.sort_values("period_end").tail(3)
f["filing"] = ("https://www.sec.gov/Archives/edgar/data/" + f["cik"].astype(str) + "/"
               + f["accession"].str.replace("-", "") + "/")      # EDGAR paths use the filer's CIK
f[["period_end", "value", "source", "filed", "accession", "restated", "filing"]]
varve_fundamentals_fact_versions

The figure as known on a date: Berkshire Hathaway's revenue on 30 June 2018

FY2016 was first filed as $223.6B and restated to $215.1B in February 2019; on 30 June 2018 the current number was still $223.6B.

import pandas as pd
v = pd.read_parquet("varve_fundamentals_fact_versions.parquet",
                    filters=[("varve_id", "==", "VD1067983"), ("field", "==", "revenue"), ("duration", "==", "FY")])
d = pd.Timestamp("2018-06-30")
known = v[(v["known_from"] <= d) & (v["known_to"].isna() | (v["known_to"] > d))]
known.sort_values("period_end").tail(3)[["period_end", "version", "value", "known_from", "known_to", "accession"]]
varve_fundamentals_ticker_history

Which company held a ticker on a date

FB and META both resolve to Meta; BBBY in 2020 is the original Bed Bath & Beyond.

import pandas as pd
th = pd.read_parquet("varve_fundamentals_ticker_history.parquet")

def holder(ticker, date):
    d = pd.Timestamp(date)
    h = th[(th["ticker"] == ticker) & (th["valid_from"] <= d) & (th["valid_to"].isna() | (th["valid_to"] >= d))]
    return h[["ticker", "varve_id", "cik", "security_type", "valid_from", "valid_to"]]

pd.concat([holder("FB", "2021-06-30"), holder("META", "2023-06-30"), holder("BBBY", "2020-06-30")])
varve_fundamentals_ticker_history

Map your price table's symbols to companies, point-in-time

Common stock only, so a preferred or warrant sharing the root symbol isn't picked up.

import pandas as pd
th = pd.read_parquet("varve_fundamentals_ticker_history.parquet")
th = th[th["security_type"] == "common"]
m = prices[["symbol", "date", "close"]].reset_index().merge(th[["ticker", "varve_id", "cik", "valid_from", "valid_to"]],
                               left_on="symbol", right_on="ticker")
m = m[(m["date"] >= m["valid_from"]) & (m["valid_to"].isna() | (m["date"] <= m["valid_to"]))]
m.sort_values("valid_from").drop_duplicates("index", keep="last")[["symbol", "date", "varve_id", "cik"]]
varve_fundamentals_security_ids

CUSIP, ISIN and FIGI for a company's securities

Berkshire Hathaway: class A, class B and the class B CUSIP used before its 2010 split.

import pandas as pd
s = pd.read_parquet("varve_fundamentals_security_ids.parquet")
s[s["varve_id"] == "VD1067983"][["cusip", "isin", "composite_figi", "security_type", "first_seen", "last_seen"]]
varve_fundamentals_security_ids

CUSIP to company, within the CUSIP's validity window

Use this to key holdings or prices that come with CUSIPs.

import pandas as pd
s = pd.read_parquet("varve_fundamentals_security_ids.parquet")
d = pd.Timestamp("2024-06-30")
s[s["cusip"].isin(["037833100", "084670702"]) & (s["first_seen"] <= d) & (s["last_seen"] >= d)][
    ["cusip", "varve_id", "cik", "isin", "composite_figi"]]
varve_fundamentals_company_identifiers

Prices keyed by ticker to varve_id, point in time

One varve_id per company across ticker and CIK changes: Broadcom's AVGO rows join to one company from 2009 on, although Avago, Broadcom Ltd and Broadcom Inc filed under three CIKs.

import pandas as pd
ci = pd.read_parquet("varve_fundamentals_company_identifiers.parquet", filters=[("id_type", "==", "ticker")])
m = prices[["symbol", "date", "close"]].merge(ci, left_on="symbol", right_on="id_value")
m = m[(m["date"] >= m["valid_from"]) & (m["valid_to"].isna() | (m["date"] <= m["valid_to"]))]
m[["symbol", "date", "close", "varve_id", "varve_sid"]]
varve_fundamentals_company_identifiers

A company's identifiers over time

Broadcom: one ticker, three CUSIPs (Avago, Broadcom Ltd, Broadcom Inc) and three CIKs.

import pandas as pd
ci = pd.read_parquet("varve_fundamentals_company_identifiers.parquet")
ci[ci["varve_id"] == "VD1441634"].sort_values(["id_type", "valid_from"])

Varve Events

varve_events_earnings_releases

Earnings released after the close on 5 August 2026, in order

accepted_et is EDGAR's acceptance time in Eastern time; accepted_verified marks times checked against EDGAR's own index.

import pandas as pd
e = pd.read_parquet("varve_events_earnings_releases.parquet")
e = e[(e["filed"] == "2026-08-05") & (e["session"] == "after_close")]
e.sort_values("accepted_et")[["accepted_et", "ticker", "company", "accepted_verified"]]
varve_events_insider_transactions

Largest open-market insider purchases in the last 90 days

Code P = open-market purchase. price_suspect marks a total typed into the per-share field.

import pandas as pd
i = pd.read_parquet("varve_events_insider_transactions.parquet",
                    columns=["filed", "ticker", "issuer_name", "owner_name", "title", "code",
                             "shares", "price", "value", "price_suspect"],
                    filters=[("code", "==", "P")])
i = i[~i["price_suspect"] & (i["filed"] >= i["filed"].max() - pd.Timedelta(days=90))]
i.nlargest(20, "value")
varve_events_current_reports

Non-reliance notices (8-K Item 4.02) filed in 2026

The company says earlier financial statements should no longer be relied on: a restatement is coming.

import pandas as pd
c = pd.read_parquet("varve_events_current_reports.parquet",
                    filters=[("item", "==", "4.02"), ("filed", ">=", pd.Timestamp("2026-01-01"))])
c.sort_values("filed")[["filed", "accepted_et", "ticker", "company", "accession"]]
varve_events_13f_positions

Largest institutional holders of Apple at the end of June 2026

One quarter file from the unzipped 13F positions archive; a manager can report a CUSIP on several lines, so sum by manager.

import pandas as pd
pos = pd.read_parquet("varve_events_13f_positions/period=2026-06-30.parquet",
                      filters=[("cusip", "==", "037833100")])
pos = pos[pos["putcall"].isna() & ~pos["value_suspect"]]
mgr = pd.read_parquet("varve_events_13f_filings.parquet", columns=["accession", "manager"])
pos.merge(mgr, on="accession").groupby("manager")[["shares", "value_usd"]].sum().nlargest(10, "shares")
varve_events_10k_changes

Companies that rewrote their risk factors most in the last 12 months

Lower similarity = more rewritten. Requiring a few thousand words skips shell companies whose whole section is a paragraph. The very top is often a reverse merger: a new business in a listed shell.

import pandas as pd
c = pd.read_parquet("varve_events_10k_changes.parquet")
e = pd.read_parquet("varve_events_entities.parquet", columns=["cik", "name", "ticker"])
c = c[(c["filed"] >= c["filed"].max() - pd.Timedelta(days=365)) & (c["risk_factors_words"] >= 3000)]
c.nsmallest(20, "risk_factors_similarity").merge(e, on="cik", how="left")[
    ["filed", "ticker", "name", "risk_factors_similarity", "risk_factors_new_sentences", "risk_factors_length_change"]]
varve_events_10k_changes

The latest 10-K change score each company had published by 30 June 2025

A point-in-time snapshot for a cross-sectional sort: only 10-Ks filed by the date count, and each company keeps its most recent one (no score on that one = left out, not an older score).

import pandas as pd
c = pd.read_parquet("varve_events_10k_changes.parquet",
                    columns=["varve_id", "filed", "accepted", "similarity"])
snap = (c[c["filed"] <= "2025-06-30"].sort_values("filed")
        .groupby("varve_id").tail(1).dropna(subset=["similarity"]))
snap["decile"] = pd.qcut(snap["similarity"].rank(method="first"), 10, labels=range(1, 11))
snap.sort_values("similarity")
varve_events_revision_filings

Restatements that cut net income after a non-reliance notice, last two years

An 8-K Item 4.02 says earlier statements should no longer be relied on; the restating filing follows. Scaled by total assets, so winsorize before ranking.

import pandas as pd
r = pd.read_parquet("varve_events_revision_filings.parquet")
e = pd.read_parquet("varve_events_entities.parquet", columns=["cik", "name", "ticker"])
r = r[r["after_nonreliance_notice"] & (r["net_income_revision_to_assets"] < 0)
      & (r["revised"] >= r["revised"].max() - pd.Timedelta(days=730))]
r.merge(e, on="cik", how="left").sort_values("revised", ascending=False)[
    ["revised", "ticker", "name", "revising_form", "key_values_revised", "net_income_revision_to_assets"]]
varve_events_revisions

Annual net income that a restatement turned from profit to loss, filed in 2025

value_prev is the figure before the revision; first_known is when it was first public.

import pandas as pd
v = pd.read_parquet("varve_events_revisions.parquet",
                    filters=[("field", "==", "net_income"), ("duration", "==", "FY")])
v = v[v["sign_flip"] & (v["revised"].dt.year == 2025)]
v.sort_values("revised")[["varve_id", "period_end", "value_prev", "value", "first_known", "revised", "revising_form"]]

Varve Corporate Actions

varve_corporate_actions_split_factors

Put raw (unadjusted) prices on today's share basis

Divide a raw price by the price_divisor in force on its date; NVIDIA's pre-June-2024 prices divide by 10.

import pandas as pd
sf = pd.read_parquet("varve_corporate_actions_split_factors.parquet")
sf["valid_from"] = sf["valid_from"].fillna(pd.Timestamp("1900-01-01"))
sf["varve_id"] = sf["varve_id"].astype(str)
p = pd.merge_asof(prices.sort_values("date"), sf.sort_values("valid_from")[["varve_id", "valid_from", "price_divisor"]],
                  left_on="date", right_on="valid_from", by="varve_id")
p["close_adj"] = p["close"] / p["price_divisor"].fillna(1.0)
p[["varve_id", "date", "close", "close_adj"]]
varve_corporate_actions_reorganizations

Announced holding-company reorganizations and reincorporations not yet completed

status is announced or vote_scheduled until the successor-issuer notice arrives; expected_basis says how precise expected_date is (a stated date, or the end of the month or quarter given).

import pandas as pd
r = pd.read_parquet("varve_corporate_actions_reorganizations.parquet")
r[r["status"] != "completed"].sort_values("expected_date")[
    ["ticker", "company", "kind", "status", "announced", "expected_date", "expected_basis", "meeting_date"]]
varve_corporate_actions_reorganizations

Reincorporations completed since 2020: where companies moved

Completed rows only. same_company is True when Varve keeps one varve_id across the two entities, so the company's Fundamentals and Events history continues unbroken.

import pandas as pd
r = pd.read_parquet("varve_corporate_actions_reorganizations.parquet")
r = r[(r["status"] == "completed") & (r["kind"] == "redomicile") & (r["effective_date"] >= "2020-01-01")]
r.sort_values("effective_date")[["effective_date", "ticker_before", "ticker_after", "company",
                                 "predecessor_incorporation", "successor_incorporation", "same_company"]]

More

Every table and column is in the schema reference (Events and Corporate Actions references in each download); the example notebooks run end to end on the free sample, and the varve-data Python library (pip install varve-data) downloads and loads every table.