(filings->dataset filings & {:keys [name] :or {name "filings"}})Convert a seq of filing metadata maps to a tech.ml.dataset. Useful for filtering/sorting filing lists with dataset operations.
Convert a seq of filing metadata maps to a tech.ml.dataset. Useful for filtering/sorting filing lists with dataset operations.
(get-filings-dataset ticker-or-cik & opts)Fetch filings for a company and return as a dataset. Options same as edgar.filings/get-filings.
Fetch filings for a company and return as a dataset. Options same as edgar.filings/get-filings.
(multi-company-facts tickers & {:keys [concept form as-of] :or {form "10-K"}})Fetch XBRL facts for multiple tickers/CIKs and combine into a single dataset. Returns a long-format dataset with an additional :ticker column. If a ticker fails (HTTP error, unknown CIK, etc.) it is skipped silently. If all tickers fail or tickers is empty, returns an empty dataset. Options: :concept - string or collection of concept strings to keep (default all) :form - "10-K" | "10-Q" (default "10-K") :as-of - "YYYY-MM-DD" string; exclude filings submitted after this date and keep only the most recently filed observation per [ticker concept unit start end]
Fetch XBRL facts for multiple tickers/CIKs and combine into a single dataset.
Returns a long-format dataset with an additional :ticker column.
If a ticker fails (HTTP error, unknown CIK, etc.) it is skipped silently.
If all tickers fail or tickers is empty, returns an empty dataset.
Options:
:concept - string or collection of concept strings to keep (default all)
:form - "10-K" | "10-Q" (default "10-K")
:as-of - "YYYY-MM-DD" string; exclude filings submitted after this date
and keep only the most recently filed observation per [ticker concept unit start end](pivot-wide ds)Pivot a long-format facts dataset to wide format: one row per period (:end) — per [:ticker :end] when the dataset has a :ticker column, as e/panel output does — and one column per :concept, valued from :val.
Facts from 10-K filings (:form "10-K", "10-K/A", ...) whose window is 3, 6 or 9 months are dropped first: a 10-K carries quarterly-footnote windows next to its fiscal-year figures, and those must neither replace an annual value nor surface as extra quarter-end rows.
One observation is kept per [ticker end concept unit]:
Pivot a long-format facts dataset to wide format: one row per period
(:end) — per [:ticker :end] when the dataset has a :ticker column, as
e/panel output does — and one column per :concept, valued from :val.
Facts from 10-K filings (:form "10-K", "10-K/A", ...) whose window is
3, 6 or 9 months are dropped first: a 10-K carries quarterly-footnote
windows next to its fiscal-year figures, and those must neither replace
an annual value nor surface as extra quarter-end rows.
One observation is kept per [ticker end concept unit]:
- duration facts: the longest window ending at :end wins (a 10-K's
fiscal-year figure over an irregular window sharing its end date; a
10-Q's year-to-date figure over its 3-month figure)
- among observations of the same window length, the most recently
:filed wins (restatements)
Units are never mixed in one column: a concept reported in a single unit
keeps its plain name as the column; a concept reported in several units
gets one column per unit, named "<concept> (<unit>)".
Columns: :ticker (when present) and :end first, then the concept columns
alphabetically. Rows are sorted by :ticker (when present), then :end
descending. Returns a tech.ml.dataset.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 |