Skip to content

Materialize IBKR HK market history inputs - #131

Merged
Pigbibi merged 1 commit into
mainfrom
fix/ibkr-hk-market-history
Jun 2, 2026
Merged

Materialize IBKR HK market history inputs#131
Pigbibi merged 1 commit into
mainfrom
fix/ibkr-hk-market-history

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep US market_history strategies on the existing loader-function contract
  • materialize HK direct market_history profiles into per-symbol date/close histories before strategy evaluation
  • add focused strategy runtime coverage for HK materialization

Verification

  • /usr/bin/python3 -m py_compile strategy_runtime.py tests/test_strategy_runtime.py
  • git diff --check

Full pytest was not run on the VPS because the available Python environments do not have pytest/pandas installed, and installing pandas on this 2GB VPS is intentionally avoided.

@Pigbibi
Pigbibi marked this pull request as ready for review June 2, 2026 15:57
@Pigbibi
Pigbibi merged commit fdab0a4 into main Jun 2, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/ibkr-hk-market-history branch June 2, 2026 15:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dff31fa6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread strategy_runtime.py

def _get_direct_market_history_profiles() -> frozenset[str]:
try:
from hk_equity_strategies import get_direct_market_history_profiles

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a helper available in the pinned HK package

With the current requirements.txt pin for hk-equity-strategies (71141ce9...), this top-level get_direct_market_history_profiles symbol is not exported, so the import falls into the compatibility fallback and _requires_materialized_market_history() is false for hk_listed_global_etf_rotation. In that deployed environment the materialization path never runs and the HK strategy still receives the loader callable as market_history, which its direct market-history implementation treats as row/mapping input, causing HK dry runs to fail before producing targets; please either update the dependency pin or keep a local fallback allow-list for the enabled HK direct profile.

Useful? React with 👍 / 👎.

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