Skip to content

fix(risk): add daily loss NEW_RISK contract - #608

Merged
Pigbibi merged 1 commit into
mainfrom
fix/qpk-daily-loss-new-risk-20260918
Sep 17, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/qpk-daily-loss-new-risk-20260918

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add optional daily_loss_usd reconciliation fact and max_daily_loss_usd runtime limit
  • fail closed on missing/invalid configured daily-loss facts and prohibit at/above the limit
  • omit the daily-loss axis when no limit is configured, preserving backward compatibility

Tests

  • PYTHONPATH=src python3 -m pytest tests/test_account_new_risk_gate.py tests/test_risk_gate.py -q (130 passed, 405 subtests passed)
  • python3 -m ruff check src/quant_platform_kit/risk/account_new_risk_gate.py src/quant_platform_kit/risk/contracts.py tests/test_account_new_risk_gate.py (passed)
  • full suite: 1987 passed, 1 skipped, 1 unrelated time-sensitive failure in test_automatic_codex_decision_rejects_missing_observation_source_before_ai (observation_in_future vs expected observation_source_unavailable)

Co-authored-by: Cursor <cursoragent@cursor.com>
@Pigbibi
Pigbibi merged commit 1826204 into main Sep 17, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/qpk-daily-loss-new-risk-20260918 branch September 17, 2026 20:17
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