QuantPlatformKit now provides a shared strategy contract for the platform/strategy split:
quant_platform_kit.strategy_contracts.StrategyManifestquant_platform_kit.strategy_contracts.StrategyContextquant_platform_kit.strategy_contracts.StrategyDecisionquant_platform_kit.strategy_contracts.StrategyEntrypointquant_platform_kit.strategy_contracts.StrategyRuntimeAdapterquant_platform_kit.common.strategies.load_strategy_entrypoint(...)quant_platform_kit.common.strategies.validate_strategy_manifest(...)quant_platform_kit.common.strategies.validate_strategy_decision(...)quant_platform_kit.common.strategy_contracts.validate_strategy_runtime_adapter(...)
PR1 kept the old global compatibility helpers for one compatibility window.
They have now been removed in the next-window cleanup batch; platforms should use
resolve_platform_strategy_definition(...) and get_enabled_profiles_for_platform(...).
The current boundary-refactor release line is:
QuantPlatformKit:v0.7.1UsEquityStrategies:v0.7.0CryptoStrategies:v0.4.0
Downstream repositories should prefer these fixed tags over long-lived commit SHA pins.
Each profile should expose either:
- an explicit
entrypointobject, or - a module-level
manifest+evaluate(ctx)pair.
Recommended import target for downstream platforms:
from quant_platform_kit.common.strategies import load_strategy_entrypointload_strategy_entrypoint(...) resolves candidates in this order:
StrategyDefinition.entrypoint- a catalog component named
entrypoint - existing legacy component modules that now expose
entrypoint, ormanifest+evaluate
That means strategy repos can add the new contract without deleting legacy signal_logic, allocation, core, or rotation modules in the same PR.
The new StrategyDecision only keeps:
positionsbudgetsrisk_flagsdiagnostics
Fields such as sell_order_symbols, buy_order_symbols, portfolio_rows, cash_sweep_symbol, and other broker/UI ordering hints should move to platform-side decision mappers in later PRs.
Some platforms still need strategy-owned runtime metadata during the migration window.
For IBKR feature-snapshot profiles, that metadata now moves behind:
StrategyRuntimeAdapter- strategy-repo getter functions such as
get_platform_runtime_adapter(profile, platform_id=...)
Use this adapter for strategy-owned runtime metadata such as:
- status icon defaults
- required feature snapshot columns
- snapshot contract / manifest expectations
- managed-symbol extraction helpers
- temporary runtime-config loaders kept during the migration window
Do not move broker execution fields back into StrategyDecision.
Platform repos should gradually switch from:
resolve_strategy_definition(...)load_strategy_component_module(...)
to:
resolve_platform_strategy_definition(...)load_strategy_entrypoint(...)- platform-local decision mappers
During the compatibility window, old component loaders may stay in place behind feature flags or rollback paths.
UsEquityStrategies: add per-profile manifest + entrypoint adapters for every live profile.CryptoStrategies: addcrypto_leader_rotationentrypoint and artifact/input manifest declarations.InteractiveBrokersPlatform: stop reading strategy private constants inmain.py, consume unified decisions via a mapper.LongBridgePlatform/CharlesSchwabPlatform: remove allocation shims and hard-coded strategy asset lists.BinancePlatform: replacecore/rotationshims with a unified entrypoint and explicit artifact contract.
- Add a
StrategyManifestfor the live profile in the strategy repository. - Expose a unified
entrypointormanifest + evaluate(ctx)pair. - Keep legacy strategy functions as internal adapters only if they are still needed for rollback safety.
- Return only contract fields from the unified path:
positionsbudgetsrisk_flagsdiagnostics
- Cover the new profile with contract and regression tests before wiring it into a platform runtime.
- Resolve the canonical profile through platform policy and
load_strategy_entrypoint(...). - Build
StrategyContextfrom platform-owned market data, portfolio snapshots, runtime config, and validated artifacts. - Keep broker-specific behavior in a local decision mapper:
- order sizing
- order type preference
- notifications
- runtime state updates
- Do not read private strategy constants or platform-only fields from strategy returns in
main.py.
- Fetch and validate provider payloads in the platform repository, not inside the pure strategy repo.
- Normalize the accepted payload into
ctx.artifactsor a platform-owned runtime helper before callingevaluate(ctx). - Validate freshness, shape, version, and optional checksum at the platform boundary.
- Keep the strategy layer focused on decision logic over normalized inputs, not provider-specific transport details.
| Repository | Mainline execution path | Compatibility window still kept |
|---|---|---|
InteractiveBrokersPlatform |
main.py -> strategy_runtime.load_strategy_runtime(...) -> unified entrypoint -> decision_mapper.map_strategy_decision(...) |
no legacy signal-module bridge remains. |
LongBridgePlatform |
main.py -> strategy_runtime.load_strategy_runtime(...) -> unified entrypoint -> decision_mapper.map_strategy_decision_to_plan(...) |
no platform-local allocation loader remains. |
CharlesSchwabPlatform |
main.py -> strategy_runtime.load_strategy_runtime(...) -> unified entrypoint -> decision_mapper.map_strategy_decision_to_plan(...) |
no platform-local allocation loader remains. |
BinancePlatform |
main.py / cycle services -> strategy_runtime.load_strategy_runtime(...) -> unified entrypoint -> decision mappers |
no direct component loader or main/runtime compatibility wrapper remains. |
- Strategy repositories now expose manifest + entrypoint adapters for live profiles without changing trading formulas.
UsEquityStrategiesnow also exposes a typed IBKR runtime adapter for migration-window snapshot/runtime metadata.- Platform-only output fields remain outside
StrategyDecision; platforms now derive orders and notifications through local mappers. BinancePlatformremoved repo-localstrategy_core.pyandstrategy/rotation.py; live-pool loading now follows an explicit artifact contract instead of assuming a sibling checkout is the only source.LongBridgePlatformandCharlesSchwabPlatformmainline flows no longer pass long chains of strategy-specific allocation arguments throughmain.py.QuantPlatformKitremoved the deprecated global resolver helpers after one full compatibility window.LongBridgePlatformandCharlesSchwabPlatformremovedload_allocation_module(...); loaders now expose unified entrypoints only.InteractiveBrokersPlatformremovedload_signal_logic_module(...),STRATEGY_LOGIC, and the legacy snapshot/runtime fallback path; runtime metadata now comes fromUsEquityStrategies.get_platform_runtime_adapter(...)only.BinancePlatformremovedload_strategy_component(...), directcore/rotationloading, and the temporary main/runtime wrapper helpers; runtime and execution now stay on unified entrypoints plus decision mappers only.
No platform-local compatibility API from PR1-PR6 is intentionally kept after the current cleanup batches.
Remove these only after the next platform release has shipped on the unified entrypoint path and rollback is no longer needed:
No remaining platform-runtime cleanup item is pending from this migration track.
Detailed repo-by-repo split: next_window_cleanup_split.md
- Platform repos depend on
QuantPlatformKitfor contract types, loader validation, and shared broker helpers. InteractiveBrokersPlatform,LongBridgePlatform, andCharlesSchwabPlatformdepend onUsEquityStrategiesentrypoints staying API-compatible for at least one window.BinancePlatformdepends onCryptoStrategiesentrypoints plus the explicit live-pool artifact contract; sibling repo checkout is only an optional fallback now.InteractiveBrokersPlatformnow depends onUsEquityStrategies.get_platform_runtime_adapter(...)for runtime metadata on the unified path.