Spaces:
Running on Zero
Running on Zero
Commit History
-
perf(reporting, rag): optimize end-to-end latency and concurrent execution
- Implement dual-track concurrent execution in reporting engine for parallel quantitative analytics and qualitative RAG - Add fast-path concall transcript text extractor reducing transcript parse time from ~284s to <2s - Enable concurrent 5-pillar LLM synthesis via ThreadPoolExecutor(max_workers=5) - Optimize vector embedding batch sizes (64/128) and default Arctic-M 768-dim model configuration - Unify API cache storage in output/<TICKER>/api/ and enforce automatic build byproduct sweeping - Add automatic Google Drive report upload with link sharing - Document complete latency optimization architecture in SYSTEM_LATENCY_OPTIMIZATION_ARCHITECTURE.md2ac7dee -
feat(reporting): integrate qualitative research findings and formatting exhibits in Typst
2a9a5f3
-
fix(reporting): keep reports in the stock's directory and sweep the scaffolding
Two corrections to where a report lands and what it leaves behind. The repository's top-level reports/ folder holds reference notes a person put there, not generated output. REPORTS_DIR and the --reports-dir flag are gone, and report_path() now resolves to output/<TICKER>/<TICKER>_report.pdf, which is where the API already looked for it. Nothing in the codebase writes to reports/ any more. Once the PDF compiles, the build's scaffolding is swept: the chart SVGs, the generated .typ, and any rendered page previews. All three are reproducible from the cached payloads, so the stock's directory holds the report rather than the sixteen files that produced it. --keep-build retains them, and a failed compile keeps them regardless -- the error names the retained source, which is the one moment they are worth having. The sweep is an allowlist of build byproducts, not "everything but the PDF". The same directory carries the ingestion layer's caches and the Drive upload record, which belong to o…ee5650f -
refactor!: hosted-model-only core, Drive report delivery, shared harnesses
Consolidates the platform onto one LLM path, one artifact layout and one verification harness, and removes the code that no longer has a caller. BREAKING: the Flask API is now search plus report delivery. The Self-RAG markdown report and DCF endpoints are gone with the services that produced them, and reports are addressed by their Google Drive link. core/ - llm_config.py talks to a single hosted OpenAI-compatible endpoint. The Ollama, Groq and Gemini branches and their environment variables are gone, along with create_client, create_content_part and read_file_content. A failure now raises LLMError: the previous fallback returned the prompt's own context, which a caller could not tell from real analysis. - config.py drops the hardcoded D:/Stock_Fundamental fallback and three unused dataclasses (FilePaths, WebsiteUrls, ApiEndpoints) that each carried a duplicate set of uppercase aliases. One artifact root per concern: REPORTS_DIR holds every finished PDF, OUTPUT_DIR hold…79cf149 -
feat(reporting): assemble the typeset document and wire the CLI
Renders the Typst source, compiles it to PDF, and exposes the pipeline as a command. Tables are emitted as native Typst markup rather than routed through an intermediate format: Typst gives column spanners, per-column alignment and explicit stroke control directly, so there is nothing to gain from generating HTML or LaTeX first and everything to lose in fidelity. Structural conventions taken from how sell-side research is actually set. Every table and chart is a numbered exhibit with a caption above and a source line below, held together as one non-breakable unit so a source line is never orphaned from the exhibit it describes. Sections are semantic rather than incidental - each answers one question, and an exhibit appears only in the section whose question it addresses. Section order follows the argument rather than the order the data arrives in. Earnings power and near-term trajectory establish what the business earns; returns on capital and financial position establish what it ear…7f09bf5 -
feat(reporting): add vector chart rendering for Tier 1 and Tier 2 exhibits
Every chart is emitted as SVG so Typst embeds it as vector artwork that stays sharp in print, with text converted to paths so output does not depend on the fonts installed on the rendering host. House style: no chart carries a title, because the Typst exhibit caption titles it and the document's own typography should apply rather than matplotlib's - a title set in a different face is the clearest sign a figure was pasted into a report instead of designed with it. Bars start at zero, gridlines are horizontal and hairline, the latest period is emphasised, and series colours step lightness so ordering survives greyscale printing. Tier 1: annual revenue and EBIT with margin overlaid, quarterly trend, margin bridge, capital structure, cash generation, shareholding, peer valuation, trailing rolling trend, return series and working-capital days. Tier 2, with the form chosen per exhibit rather than by habit: - F-Score history as bars, not a line, because the score is a count of signals p…803c11e -
feat(reporting): add arithmetic self-verification of every computed figure
A typeset PDF gives a wrong number the same authority as a right one. This re-derives what can be re-derived by an independent route and reports where the two answers disagree, so the claim that the arithmetic holds becomes checkable rather than asserted. Three kinds of check run, in descending order of what a failure means: - Identities must close to floating-point precision, because they are definitions rather than estimates. The cash flow statement articulates to its own reported movement in cash; free cash flow is operating cash less capex; sources equal uses; the five DuPont factors multiply to return on equity; each composite total equals the sum of its components; implied growth equals reinvestment rate times return. A failure here is a defect in this codebase rather than a data problem, and is reported as such. - Reconciliations compare a figure computed here against the provider's own published value for the same quantity, allowed the rounding the provider's …e5612f1 -
feat(reporting): add Tier 2 composites with mandatory component disclosure
Adds the five composites that sit on top of the Tier 1 series: two published scoring frameworks, two cash-allocation identities, and the DuPont decomposition extended across every reported period. Guardrail: a composite is never reported as a bare number. "F-Score 7" is not analysis; the nine sub-tests are, and the total is a convenience for sorting. Every composite here therefore carries its components as data, and the total is a derived PROPERTY of the structure holding them - so the renderer cannot print a score without having the parts in hand. - Piotroski F-Score (2000): nine ScoreTest records, each holding the test applied, the value, the comparator it was measured against and the verdict. Scored across every year with the three consecutive balance sheets the change tests require. - Altman Z-Score (1968): five AltmanComponent records, each with its ratio, the published coefficient and the contribution that coefficient produced. Coefficients are the original author's a…03d5a7f -
feat(reporting): add PDF report engine foundation with denominator guardrail
Introduces the data and formatting layer for a typeset A4 equity research report built directly from the Financial Data Collector REST payloads, with no language model anywhere in the path. - tokens: single source for colour, type, page geometry and the display window, so a matplotlib figure and the Typst page around it read as one document rather than two. Typefaces are restricted to those shipping lining figures; Georgia and Constantia were rejected for defaulting to old-style digits, which read as broken in a column of financials. - client: typed, disk-cached wrapper over the fourteen collector endpoints, so iterating on layout re-reads one directory instead of issuing fourteen requests. - snapshot: normalised domain model that absorbs the provider's quirks once instead of in every table - the appended TTM row that is not a fiscal year, peer market caps denominated in rupee million where everything else is crore, and the growth annotations that restate an absolute…a2b1e2f