Skip to main content

Module combined

Module combined 

Source
Expand description

Combined per-field panel files: one wide gzip CSV per series (panels/{name}.csv.gz, header day,SYM1,SYM2,…, one row per trading day, empty cell = NaN), holding the full universe. The container reads ONE object per series instead of hundreds of per-symbol files. Same gzip-CSV conventions as csv_io/fundamentals.

Structs§

RebuildSummary
What a rebuild wrote: number of series files and the max day-count across them.

Constants§

PANELS_DIR
Default object-key directory for combined per-field panel files.

Functions§

assemble
Union-dates assembly: rows = sorted union of all symbols’ days, cols = symbols in order, missing cells NaN. (Mirrors the per-symbol loaders’ assembly.) Public so producers (e.g. the CLI’s FMP snapshot-factor writer) can build a combined Panel from per-symbol (day, value) rows before serializing it with write_combined_panel.
load_combined_panel
Read the combined {dir}/{name} file (probing .csv.gz/.parquet/.csv) and assemble a Panel for symbols (in the given order; a symbol absent from the file gets a NaN column) over [from, to] inclusive. The format is detected from content. Ok(None) if the combined file does not exist in any supported format.
rebuild_combined_panels
Build panels/{series}.csv.gz for every OHLCV field + fundamental field from the per-symbol archives. Reads each per-symbol file once (concurrently), then transposes per field. Full overwrite, idempotent. A missing/corrupt per-symbol file leaves NaN cells (same fail-soft as the per-symbol loaders).
write_combined_panel
Serialize a Panel to combined gzip CSV (day,<sym…>, empty cell for NaN).