How visikai/ohlc-toolkit works
OHLC Toolkit is a Polars-native library for fetching, reading, validating, and transforming market-data frames. Its documented workflow fetches a release and verifies its assets, reads and checks the resulting frame, aggregates it into windows, then adds returns; quality policy is a separate follow-up step. The package also exposes schedules and phased indicators as distinct capabilities. The README and sampled source support the main workflow links; unsampled subsystem internals are represented at their exact enclosing directories, without implying unverified wiring.
Main entry points: reader.py Read source · fetcher.py Fetch snapshot · continuity.py Read snapshot frame · engine.py Compute windows
Components 20
Snapshot access
- Fetch snapshot
src/ohlc_toolkit/snapshot/fetcher.py - Read snapshot frame
src/ohlc_toolkit/snapshot/continuity.py - Verify continuity
src/ohlc_toolkit/snapshot/continuity.py
Frame processing
- Read source
src/ohlc_toolkit/source/reader.py - Validate source
src/ohlc_toolkit/source/validation.py - Source profiles
src/ohlc_toolkit/source/profile.py - Compute windows
src/ohlc_toolkit/windows/engine.py - Window reference
src/ohlc_toolkit/windows/reference.py - Quality policy
src/ohlc_toolkit/windows/quality.py - Window resolution
src/ohlc_toolkit/windows/resolution.py
Analytics
- Returns and excursions
src/ohlc_toolkit/returns/primitives.py - Return alignment
src/ohlc_toolkit/returns/alignment.py - Phased indicators
src/ohlc_toolkit/indicators - Indicator frame checks
src/ohlc_toolkit/indicators/frames.py
Schedules
- Window schedules
src/ohlc_toolkit/schedules/generators.py - Emit cadence rules
src/ohlc_toolkit/schedules/cadence.py
Shared foundations
- Durations and calendar
src/ohlc_toolkit/temporal - Logging and errors
src/ohlc_toolkit/config
Other components
- Toolkit caller
- Published release
Connections 18
- Toolkit caller → Fetch snapshot: requests fetch
- Published release → Fetch snapshot: provides assets
- Fetch snapshot → Read snapshot frame: verified result
- Read snapshot frame → Read source: reads frame
- Toolkit caller → Read source: reads source
- Read source → Validate source: validates frame
- Read source → Source profiles: uses profile
- Toolkit caller → Compute windows: aggregates frame
- Compute windows → Quality policy: window frame
- Toolkit caller → Returns and excursions: adds returns
- Returns and excursions → Return alignment: resolves counterparts
- Toolkit caller → Verify continuity: checks continuity
- Toolkit caller → Window schedules: generates schedule
- Toolkit caller → Emit cadence rules: resolves cadence
- Toolkit caller → Phased indicators: computes indicators
- Phased indicators → Indicator frame checks: checks frame
- Toolkit caller → Window reference: uses oracle
- Toolkit caller → Window resolution: resolves windows