Goal
Refactor TimeSeriesService into MarketDataService and add a storage-first workflow.
Why
ARGUS should use stored historical data before calling external APIs again. This keeps data access centralized and prepares the project for analytics and reporting workflows that can reuse saved market data.
Scope
- Rename or refactor
TimeSeriesService into MarketDataService
- Check DuckDB for requested historical price bars first
- Return stored price bars if the full requested data is available
- Call the API client only if no matching stored data is found
- Normalize fetched API data into internal models
- Save fetched historical data to DuckDB before returning it
- Trend Analysis get their own serivce and they call analytics to create charts (not vise versa)
- Add a
MarketDataSet to internal models so this service can reliably transport dataframe with internal meta data
- Keep client access inside
MarketDataService
Out of scope
- Partial range handling: if only part of the requested data exists, treat it as not found
Acceptance criteria
Goal
Refactor
TimeSeriesServiceintoMarketDataServiceand add a storage-first workflow.Why
ARGUS should use stored historical data before calling external APIs again. This keeps data access centralized and prepares the project for analytics and reporting workflows that can reuse saved market data.
Scope
TimeSeriesServiceintoMarketDataServiceMarketDataSetto internal models so this service can reliably transport dataframe with internal meta dataMarketDataServiceOut of scope
Acceptance criteria
TimeSeriesServiceis refactored or renamed toMarketDataServicetrend_analysis_serviceNote
Priority: Should