Financial statement extraction with normalization.
Three output layers for each statement: raw-* ? all matching observations, unprocessed *-statement ? normalized, restatement-deduplicated, long-format get-financials ? all three statements, optionally wide-format
Concept fallback chains: each line item is a vector of concept names tried in order; the first one present in the facts data wins.
Duration vs instant: Income statement + cash flow -> duration observations (:frame does NOT end in "I") Balance sheet -> instant observations (:frame ends in "I")
Point-in-time / look-ahead-safe mode: Pass :as-of "YYYY-MM-DD" to any public function to restrict to filings where :filed <= as-of-date. Without :as-of the latest restated value is returned (as-reported / always-latest behaviour).
Financial statement extraction with normalization. Three output layers for each statement: raw-* ? all matching observations, unprocessed *-statement ? normalized, restatement-deduplicated, long-format get-financials ? all three statements, optionally wide-format Concept fallback chains: each line item is a vector of concept names tried in order; the first one present in the facts data wins. Duration vs instant: Income statement + cash flow -> duration observations (:frame does NOT end in "I") Balance sheet -> instant observations (:frame ends in "I") Point-in-time / look-ahead-safe mode: Pass :as-of "YYYY-MM-DD" to any public function to restrict to filings where :filed <= as-of-date. Without :as-of the latest restated value is returned (as-reported / always-latest behaviour).
(balance-sheet ticker-or-cik
&
{:keys [form concepts shape as-of]
:or {form "10-K" shape :long}})Return normalized balance sheet as a long-format dataset.
Options: :form - "10-K" (default) or "10-Q" :concepts - override balance-sheet-concepts :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, excludes filings where :filed > as-of-date, giving point-in-time / look-ahead-safe results.
Return normalized balance sheet as a long-format dataset.
Options:
:form - "10-K" (default) or "10-Q"
:concepts - override balance-sheet-concepts
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, excludes filings where :filed > as-of-date,
giving point-in-time / look-ahead-safe results.(cash-flow ticker-or-cik
&
{:keys [form concepts shape as-of] :or {form "10-K" shape :long}})Return normalized cash flow statement as a long-format dataset.
Options: :form - "10-K" (default) or "10-Q" :concepts - override cash-flow-concepts :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, excludes filings where :filed > as-of-date, giving point-in-time / look-ahead-safe results.
Return normalized cash flow statement as a long-format dataset.
Options:
:form - "10-K" (default) or "10-Q"
:concepts - override cash-flow-concepts
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, excludes filings where :filed > as-of-date,
giving point-in-time / look-ahead-safe results.(get-financials ticker-or-cik
&
{:keys [form shape as-of] :or {form "10-K" shape :long}})Return all three normalized statements for a company.
Returns {:income-statement ds :balance-sheet ds :cash-flow ds}
Options: :form - "10-K" (default) or "10-Q" :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). All three statements use point-in-time deduplication: filings where :filed > as-of-date are excluded.
Return all three normalized statements for a company.
Returns {:income-statement ds :balance-sheet ds :cash-flow ds}
Options:
:form - "10-K" (default) or "10-Q"
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
All three statements use point-in-time deduplication:
filings where :filed > as-of-date are excluded.(income-statement ticker-or-cik
&
{:keys [form concepts shape as-of]
:or {form "10-K" shape :long}})Return normalized income statement as a long-format dataset.
Options: :form - "10-K" (default) or "10-Q" :concepts - override income-statement-concepts :shape - :long (default) or :wide :as-of - ISO date string "YYYY-MM-DD" (default nil). When set, excludes filings where :filed > as-of-date, giving point-in-time / look-ahead-safe results suitable for backtesting and event studies.
Return normalized income statement as a long-format dataset.
Options:
:form - "10-K" (default) or "10-Q"
:concepts - override income-statement-concepts
:shape - :long (default) or :wide
:as-of - ISO date string "YYYY-MM-DD" (default nil).
When set, excludes filings where :filed > as-of-date,
giving point-in-time / look-ahead-safe results suitable
for backtesting and event studies.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |