Skip to content

fix(equities): harden execution safeguards and expand market universes - #434

Merged
brokermr810 merged 145 commits into
mainfrom
test
Nov 30, 2026
Merged

brokermr810 merged 145 commits into
mainfrom
test

Conversation

@brokermr810

Copy link
Copy Markdown
Collaborator

Summary

HK portfolio execution could queue fractional or below-board-lot quantities, reject an entire deployment when only some constituents lacked rules, and repeatedly alternate stale/recovered notices. This PR validates order sizes before queueing, preserves per-symbol execution safeguards, reconciles complete equity catalogs, and stabilizes quote diagnostics.

It also adds four Hang Seng sector pools and four commonly used crypto pools.

Changes

  • Round Forthright and Tiger HK strategy quantities down to whole board lots before queueing; skip unavailable rules and below-lot intents without increasing budgets or redistributing weights.
  • Allow partially validated Forthright HK universes to deploy while retaining per-order validation; keep single-stock and wholly unvalidated deployments blocked.
  • Reconcile HK and US symbol identities only from complete validated directories, with transactional updates and protection against partial or unexpectedly small snapshots.
  • Report the actual broker and distinguish submitted acknowledgments from terminal cancellations. Include broker cancellation details without inventing an explanation.
  • Debounce repeated equity quote notices and require sustained recovery for recovery messages. Execution freshness and risk checks still run on every cycle.
  • Add Hang Seng finance, utilities, properties, and commerce/industry pools with official constituent-count validation.
  • Add BTC/ETH, crypto market-cap top 20 and top 50, and volume top 30 within the market-cap top 100. Reuse the base snapshot and validate ranked members.
  • Register the eight pools idempotently and expose them through the existing sync workflow.

Desktop companion: QuantDinger-Vue commit 353ad96 adds market tabs, scoped synchronization selections, and localized pool labels.

Test plan

  • Equity safeguard regression suite: 245 tests passed during the equity change verification.
  • Universe snapshot, management, contract, and history-backfill tests: 63 passed.
  • Local backend image built, migration completed, and API health verified.
  • Synced all eight new pools locally: HK constituent counts 10/6/10/69; crypto counts 2/20/50/30.
  • Desktop companion lint, localization checks, and production build passed.

Deployment and compatibility

Run the normal migration to register the new pools, then synchronize their snapshots. Deploy the relevant backend, catalog-sync, and trading/runtime workers to activate their code changes. Historical logs and orders are preserved; orders are not replayed.

These changes do not resolve the broker-side Forthright 107 / System Cancel response or guarantee upstream quote availability. No API routes or schemas changed.

tianhe added 30 commits November 1, 2026 17:17
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	backend_api_python/app/routes/community.py
tianhe and others added 26 commits November 28, 2026 04:52
Signed-off-by: Prakash Jha <[email protected]>
(cherry picked from commit a5c7b82)
Signed-off-by: TIANHE <[email protected]>
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	docs/trading/LIVE_TRADING_SAFETY.md
#	docs/trading/LIVE_TRADING_SAFETY_CN.md
Signed-off-by: TIANHE <[email protected]>

# Conflicts:
#	docs/trading/LIVE_TRADING_SAFETY.md
#	docs/trading/LIVE_TRADING_SAFETY_CN.md
@sonarqubecloud

Copy link
Copy Markdown

@brokermr810
brokermr810 merged commit 469722c into main Nov 30, 2026
15 checks passed
MrRakun35 pushed a commit to MrRakun35/NovaTrade that referenced this pull request Dec 1, 2026
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.

6 participants