Skip to content

Prefer external history before IBKR fallback - #108

Merged
Pigbibi merged 1 commit into
mainfrom
prefer-yfinance-history
May 26, 2026
Merged

Prefer external history before IBKR fallback#108
Pigbibi merged 1 commit into
mainfrom
prefer-yfinance-history

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • prefer the yfinance historical data path for strategy historical close/candle inputs
  • keep IBKR historical data as fallback only when external history is empty or unavailable
  • add tests that broker historical calls are skipped when fallback data exists and still used when fallback is empty

Why

IBKR historical requests are timing out for QQQ/BOXX in live prechecks. Waiting for two 60s broker timeouts per symbol can exceed the Cloud Run/Gunicorn request window. The strategies only need historical market context here, so the external data source should be the primary path for history.

Tests

  • PYTHONPATH=. PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 /tmp/ues-test-venv/bin/python -m pytest -q tests/test_runtime_strategy_adapters.py
  • ruff check application/runtime_strategy_adapters.py tests/test_runtime_strategy_adapters.py

@Pigbibi
Pigbibi merged commit 007c50a into main May 26, 2026
1 check passed
@Pigbibi
Pigbibi deleted the prefer-yfinance-history branch May 26, 2026 19:49
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.

1 participant