quantlab.dataset.massive.ten_k#
How much each 10-K’s text changed from the filer’s previous one, as a daily panel on the permaticker axis.
Massive’s /stocks/vX/10-K sections records (the REST raw tier
rest/10k_sections: one record per filing and section, with the filer’s
SEC cik, filing_date, the fiscal period_end and the section’s
text) are compared with the same filer’s report for the fiscal year
before, section by section (Cohen, Malloy and Nguyen 2020, “Lazy
Prices”). For the business (Item 1) and risk_factors (Item 1A)
sections the panel holds, on the permaticker axis and SEP’s trading
calendar:
<section>_similarity: the cosine similarity of the two texts’ word counts;<section>_jaccard: the Jaccard similarity of their sets of words;<section>_length_change: the log of the ratio of their word counts.
<section> is business or risk. Words are runs of three or more
letters, lowercased, English stop words left out, counted into 2**20
hashed buckets (sklearn’s HashingVectorizer, the same buckets in
every process). A section shorter than MIN_WORDS words on either side
(a smaller reporting company’s “not required”) gives NaN.
Of several records of one filer, section and fiscal period, the first
filed is the report (a later one is an amendment); the report before it is
the filer’s report of that section whose period ends 300 to 430 days
earlier, none otherwise. A filing is shown from its available date, the
first SEP trading day on or after its filing date, until the filer’s next
filing, and for at most stale_after_days; its value goes on every SEP
security of the universe whose TICKERS secfilings names the CIK and
that is priced on the filing date (both classes of a firm with two).
The comparison reads every record each time the panel is built, so it
takes minutes on the whole raw tier; workers processes vectorize the
pages.
Examples#
Build the store and read one security’s risk-factor similarity:
config = MassiveTenKChangesConfig(
zarr_file_path="/data/quantlab/market/massive/massive_10k_changes_1d/massive_10k_changes_1d.zarr",
raw_data_dir_path="/data/quantlab/downloads/sharadar",
massive_dir="/data/quantlab/downloads/massive",
workers=32,
)
panel = MassiveTenKChangesDataset(config).update().panel("2024-01-02", "2024-12-31")
panel["risk_similarity"].sel(symbol=199059)
Classes
Daily panel of how much each security's latest 10-K changed from the year before. |
Functions
Compare each section with the filer's previous annual report of it. |