Skip to content

[Bug]: End-date bars dropped (Fama-French, gap detection, yfinance fallback, Finnhub), local-time bounds (Finnhub, Kalshi, Polymarket), Massive pagination truncates #73

Closed

Description

@quantum-like

Affected library

data

Affected package version

0.2.0 (main at 885bc110)

Environment

Linux, source checkout of main at 885bc110 with the repo's dev environment (uv sync); offline test suite.

Observed behavior

  1. Fama-French YYYY-MM end filter cuts at day 28.
  2. Gap detection reports a one-day gap at the end date of a complete series.
  3. yfinance macro fallback omits the end date (exclusive end).
  4. Finnhub, Kalshi and Polymarket convert date bounds in the host's local timezone; a Finnhub date-only end drops that day.
  5. Massive aggregate fetches return only the first 50,000-row page.

Expected behavior

End dates are inclusive, bounds are UTC calendar days, and all next_url pages are fetched.

Minimal reproduction

Each case has a focused unit test on quantum-like/ml4t-data branch review/fixes (one commit per fix, on top of 885bc110). Every test fails on main and passes with its fix:

  • tests/test_fama_french_provider.py::test_fetch_month_filter_includes_final_calendar_day
  • tests/test_update_manager.py::test_detect_gaps_in_storage_keeps_bar_on_inclusive_end
  • updated assertion in tests/test_macro_downloader.py
  • tests/test_finnhub_provider.py::test_fetch_raw_data_uses_inclusive_utc_day
  • tests/test_kalshi_unit.py::test_fetch_raw_data_uses_utc_calendar_bounds
  • tests/test_polymarket_unit.py::test_fetch_price_history_uses_utc_day_bounds
  • tests/test_polygon_provider.py::test_fetch_raw_data_follows_next_url

Compatibility impact

Public behavior or results

Acceptance criteria

Each case has an offline unit test that fails on main and passes with the fix, including under a non-UTC TZ.

I have a PR ready with these fixes and will link it here.

Amir

Activity

  1. added
    type: bugConfirmed or reported incorrect behavior
    compatibility: affectedHas Python, platform, dependency, or cross-library compatibility impact
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility: affectedHas Python, platform, dependency, or cross-library compatibility impactpriority: normalNormal planned workstatus: needs-triageAwaiting maintainer classificationtype: bugConfirmed or reported incorrect behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions