Chart & Event Markers Integration
Relevant source files
The following files were used as context for generating this wiki page:
Chart and Event Markers Integration combines historical price action with qualitative corporate data. This system retrieves per-symbol OHLCV candles, news, and regulatory announcements from immutable content-addressed storage. The application uses these artifacts to provide a temporal context for screening results and listing entries.
The integration spans the Python EDL pipeline, which generates compressed artifacts, and the React frontend, which fetches and parses these objects at runtime. While the core table UI does not yet render visual charts, the API and adapter layers manage the complete data lifecycle for candles and event markers. Sources: frontend/README.md:58-60, frontend/README.md:387-389
Data Architecture and Storage
The system stores chart and event data as immutable JSON objects. The publisher creates content-addressed revisions pinned to specific trading sessions. This architecture ensures that chart data remains consistent with the scanner results of a particular release.
Data Schemas
The ChartSnapshot interface defines the structure for per-symbol data. It includes technical price history and multiple event-driven arrays.
export interface ChartSnapshot {
schemaVersion: number;
symbol: string;
asOfDate: string;
historyStartDate: string | null;
candles: Array<{date:string;open:number;high:number;low:number;close:number;volume:number}>;
volumeEvents: Record<string, unknown>;
corporateActions: Array<Record<string, unknown>>;
earnings: Array<Record<string, unknown>>;
regulatoryAnnouncements?: Array<Record<string, unknown>>;
marketNews: Array<Record<string, unknown>>;
}
Sources: frontend/src/api/realAdapter.ts:25-36
Storage Lifecycle
Charts are generated during the EDL pipeline's final stages. The publisher uploads these objects to Cloudflare R2 storage. R2 retains daily revisions for 90 days and archives monthly releases indefinitely. Sources: frontend/README.md:301-303, frontend/README.md:405-408
Data Retrieval and Decompression
The realAdapter manages the retrieval of chart objects. Because these files are compressed to reduce transfer size, the client must handle decompression before parsing.
Retrieval Flow
- The client requests a symbol's chart via
screenerApi.getChart(symbol, revision). - The adapter resolves the
Manifestto find the correctchartUrlTemplateorobjectUrlTemplate. - The client fetches the binary data.
- If the browser supports
DecompressionStream, it decodes the raw gzip bytes. - If the CDN has already decoded the response (indicated by
Content-Encoding: gzip), the client decodes the text directly.
Event Markers Integration
Event markers provide visual and technical signals derived from corporate activities. The EDL pipeline injects these markers during Phase 4 using the add_corporate_events.py script. Sources: DO NOT DELETE EDL PIPELINE/README.md:188-190
Marker Types and Triggers
| Icon | Name | Trigger |
|---|---|---|
| ★ | LTASM / STASM | Stock enters ASM (Surveillance) groups |
| 📊 | Results Out | Financial results released within last 7 days |
| 🔑 | Insider Trading | SEBI Form C/Reg 7(2) filed in last 15 days |
| 📦 | Block Deal | Bulk or Block deal recorded in last 7 days |
| # | +/- Revision | Price band revision detected |
| ⏰ | Upcoming Results | Scheduled earnings date available |
| 🎁 | Bonus | Upcoming bonus ex-date |
| ✂️ | Split | Upcoming stock split ex-date |
| 💸 | Dividend | Upcoming dividend ex-date |
Sources: DO NOT DELETE EDL PIPELINE/README.md:329-342
Regulatory Announcements and News
The system differentiates between official regulatory filings and general market news. The AnnouncementsPanel component displays these events, allowing users to filter by year or view recent activity from the last 90 days. Sources: frontend/src/components/AnnouncementsPanel.tsx:24-28
Announcement Processing
- Indexing: The
AnnouncementIndextracks records since the last market close. Sources: frontend/src/tests/announcementAdapter.test.ts:58-60 - Detail Retrieval: Evidence and excerpts are loaded only when a user selects a specific filing. This minimizes initial data transfer. Sources: frontend/src/api/realAdapter.ts:281-289
- News Feed: The pipeline retrieves the latest 50 news items per stock, including AI-generated sentiment scores. Sources: DO NOT DELETE EDL PIPELINE/README.md:286-292
Summary
Chart and Event Markers Integration centralizes technical and qualitative data into a single content-addressed revision system. By combining OHLCV candles with regulatory filings and corporate actions, the system provides a comprehensive audit trail for every scanner match. The use of gzip-compressed immutable objects ensures efficient delivery and data integrity across the platform.