Skip to content

Enable fractional LongBridge orders#44

Merged
Pigbibi merged 1 commit into
mainfrom
codex/longbridge-fractional-orders
May 6, 2026
Merged

Enable fractional LongBridge orders#44
Pigbibi merged 1 commit into
mainfrom
codex/longbridge-fractional-orders

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add LongBridge env controls for fractional quantity steps and min notional
  • size sells/buys with quantity steps instead of hard integer shares
  • preserve raw LongBridge position diagnostics behind LONGBRIDGE_DEBUG_POSITION_SNAPSHOT
  • avoid blocking fractional buys when broker max-purchase estimate returns whole-share zero

Dependencies

  • QuantStrategyLab/QuantPlatformKit fractional quantity helper PR
  • QuantStrategyLab/UsEquityStrategies fractional strategy position PR

Tests

  • ./.venv/bin/python -m pytest tests/test_runtime_config_support.py tests/test_rebalance_service.py tests/test_runtime_composer.py tests/test_runtime_broker_adapters.py tests/test_strategy_runtime.py

@Pigbibi Pigbibi force-pushed the codex/longbridge-fractional-orders branch from 93d2534 to 2ffba54 Compare May 6, 2026 20:53
@Pigbibi Pigbibi merged commit 881a8d3 into main May 6, 2026
1 check passed

@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: 2ffba54dfc

ℹ️ 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 runtime_config_support.py
Comment on lines +150 to +152
explicit_step = _optional_float_env(step_env)
if explicit_step is not None:
return explicit_step

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject non-positive order quantity step from environment

_quantity_step_env returns the explicit LONGBRIDGE_ORDER_QUANTITY_STEP value without validation, so values like 0 or negative numbers are accepted and flow into execution sizing. In fractional/whole-share sizing paths this step is passed to floor_to_quantity_step(...), which can produce invalid quantities or raise at runtime (for example when a misconfigured deployment sets 0). Validate that the resolved step is finite and strictly greater than zero (and fail fast with a clear config error).

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi deleted the codex/longbridge-fractional-orders branch May 21, 2026 10:44
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