Skip to content

Conversation

@merdan-9
Copy link
Contributor

Problem

Users experienced a YFPricesMissingError when selecting the "1w" (weekly) timeframe in the web interface. The error occurred because:

  • The web interface was sending interval=1w to Yahoo Finance API
  • Yahoo Finance expects interval=1wk for weekly data (not 1w)
  • The backend wasn't properly mapping user-facing timeframes to Yahoo Finance intervals

Error Message

YFPricesMissingError('possibly delisted; no price data found (1w 2025-08-26 00:00:00 -> 2025-09-25 11:54:56.758320) (Yahoo error = "Invalid input - interval=1w is not supported. Valid intervals: [1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 4h, 1d, 5d, 1wk, 1mo, 3mo]")')

Solution

  1. Fixed interval mapping: Added proper mapping from 1w1wk and 1mo1mo in yfinance_intervals
  2. Cleaned up timeframes: Removed redundant timeframes list since interval validation is handled by yfinance_intervals
  3. Enhanced display formatting: Added proper display names ("1 week", "1 month") for the new timeframes
  4. Added date limits: Configured appropriate date range limits for weekly data (730 days max)

ghost

This comment was marked as resolved.

@machineily machineily merged commit 34f10f5 into Y-Research-SBU:main Sep 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants