Consume unified technical DCA signals#145
Conversation
091df1a to
5df6f16
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 091df1a2a7
ℹ️ 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".
| market_history = ctx.market_data.get("market_history") | ||
| if market_history is None: | ||
| def _empty_market_history(_client, _symbol): | ||
| return () | ||
|
|
||
| market_history = _empty_market_history |
There was a problem hiding this comment.
Preserve missing-history failures for rotation
When global_etf_rotation is invoked without market_history, this fallback feeds an empty series for every ticker into compute_signals; with the default four canaries and canary_bad_threshold=4, that path returns a 100% safe-haven emergency allocation instead of surfacing the missing required input. Since the catalog/manifest still declare market_history as required for this strategy, a platform wiring issue would now silently produce an actionable defensive trade rather than fail fast.
Useful? React with 👍 / 👎.
| technical_indicator_snapshot = ( | ||
| ctx.market_data.get("technical_indicator_snapshot") | ||
| or ctx.market_data.get("derived_indicators") | ||
| ) |
There was a problem hiding this comment.
Advertise the new derived-indicator input path
This new derived_indicators consumer path is not reflected in the runtime metadata: STRATEGY_REQUIRED_INPUTS/the manifest still list only market_history for nasdaq_sp500_smart_dca, and its base runtime adapter does not add derived_indicators to available_inputs (unlike IBIT). In catalog-driven/platform runs that build or validate inputs from those contracts, a unified signal bundle for this new consumer will not be requested or accepted, so the feature only works for callers that bypass the strategy contract and inject ctx.market_data manually.
Useful? React with 👍 / 👎.
Summary
derived_indicators/technical_indicator_snapshotinputs, with platform market-history fallbackTesting
timeout 300 uv run --with pytest python -m pytest tests/test_nasdaq_sp500_smart_dca.py tests/test_ibit_smart_dca.py tests/test_runtime_market_signal_inputs.py tests/test_signal_bundle_contract.py tests/test_signal_bundle_cli.py tests/test_smart_dca_research_cli.py -q