-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't workingdata-sourcesIssues related to data source integrations (Alpha Vantage, Polygon, etc.)Issues related to data source integrations (Alpha Vantage, Polygon, etc.)
Description
Problem: Alpha Vantage outputsize=compact only returns recent 100 days, not historical data.
Manifestation:
- Requesting historical dates (2024-01-01) returns 2025 data
- Date filtering removes all data resulting in empty DataFrames
- Technical indicators fail with "insufficient data"
Root Cause:
# Wrong logic - only used 'full' for large ranges
use_full = days_range > 100
# Should use 'full' for ANY historical requestSolution Applied:
# Use full output if requesting historical data (>30 days old) OR large range
end_date_obj = datetime.datetime.strptime(processed_end, "%Y-%m-%d")
now = datetime.datetime.now()
days_from_now = (now - end_date_obj).days
use_full = days_from_now > 30 or days_range > 100Files Fixed:
src/data_sources/alpha_vantage_gex.py(lines 220-228)
Prevention:
- Test data fetching with both recent and historical date ranges
- Validate that date ranges in test data match requested ranges
- Monitor for sample/fake data patterns in results
Priority: High - critical for backtesting and historical analysis
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdata-sourcesIssues related to data source integrations (Alpha Vantage, Polygon, etc.)Issues related to data source integrations (Alpha Vantage, Polygon, etc.)