Skip to content

feat(risk): add offline P1 execution cost drift and TWR ladder - #820

Merged
Pigbibi merged 1 commit into
mainfrom
feat/p1-cost-drift-and-twr-ladder
Nov 28, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
feat/p1-cost-drift-and-twr-ladder

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

AI assistance

Antigravity AI assistant drafted the offline P1 risk/performance modules and unit tests.

What changed

  • Added pure-offline execution cost & slippage drift monitor (src/quant_platform_kit/risk/execution_cost_drift.py, Roadmap P1 Repo hygiene: align metadata and add CI baseline #1) evaluating adverse fill slippage (bps) and commission ratio with fail-closed promotion pause signals.
  • Added pure-offline Time-Weighted Return (TWR) & net-inflow capital ladder tracker (src/quant_platform_kit/risk/twr_capital_ladder.py, Roadmap P1 Bump actions/checkout from 5 to 6 #2) using start-of-period external cash-flow timing aligned with flow_adjusted_hwm.py.
  • Re-exported public symbols from quant_platform_kit.risk and added unit tests in tests/test_execution_cost_drift.py and tests/test_twr_capital_ladder.py.

How verified

  • Ran .venv/bin/pytest -q tests/test_execution_cost_drift.py tests/test_twr_capital_ladder.py tests/test_flow_adjusted_hwm.py tests/test_policy_v0_sizing.py (28 passed).
  • Ran .venv/bin/python -m ruff check src/quant_platform_kit/risk/execution_cost_drift.py src/quant_platform_kit/risk/twr_capital_ladder.py src/quant_platform_kit/risk/__init__.py tests/test_execution_cost_drift.py tests/test_twr_capital_ladder.py (all checks passed).

Why

Prepares the offline P1 post-trade cost-drift guard and flow-invariant TWR capital-ladder metrics ahead of Phase 9 PAPER execution.

Risk

  • Pure offline library additions with zero broker, cloud, or network I/O; no live/paper switches or existing sizing behavior modified.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T09:55:15.844031Z 5c8a87e Manual request
🔒 Security Review ✅ Completed 2026-11-28T09:56:17.380262Z 5c8a87e Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Pigbibi

Pigbibi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 5c8a87ef1e

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5c8a87ef1e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Pigbibi Pigbibi added agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation and removed agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation labels Nov 28, 2026
@Pigbibi
Pigbibi merged commit 28a9355 into main Nov 28, 2026
17 of 20 checks passed
@Pigbibi
Pigbibi deleted the feat/p1-cost-drift-and-twr-ladder branch November 28, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant