Repository navigation
feat(book): veto on the ratcheted stop from stops.jsonl - #65
Merged
Merged
Conversation
TASK-24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
pr-loop/verifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The book vetoed only on a rating's own
stop_loss, while the actual-portfolio pass exits on the ATR-ratcheted stop instops.jsonl. A name the owner exited on the ratcheted line stayed in, or came back to, the book the next day. Observed on the owner's 2026-10-13 book: a held name with an EXIT card on 2026-10-12 was still in core at full weight.Task (verbatim): TASK-24 — book honors the ratcheted stop in stops.jsonl
What changed
stop_loss, the neweststops.jsonlrow for that ticker/market dated on or after the rating date and before that session). A close at or below it is a stop-out ("needs a new rating"); today's "below its stop" check uses today's level.kuroshio bookreadsstops.jsonlfrom the ledger dir best-effort (filtered to--market);build_booktakes it asstops_rows(None = previous behavior).Not changed: sizing and the
invalidation_pricein holdings.yml still use the rating's stop; propose; the ratchet; stops.jsonl writes.Verification
Gate: ruff clean · pytest 494/494 · 32c89c1
Red-first: the 15
test_ratchet_stop_*cases watched red by the implementer (build_bookrejectedstops_rows), green at 32c89c1Live: run eFyGPyRts1 ×1 on build 345d919 (same code as 32c89c1; only test fixtures and the task file changed) · $0 — rc=0; the name exited on its ratcheted stop is skipped at the ratcheted level and is in neither core nor attack. The reason reads
below its stopinstead of thestopped outphrase the probe line names, because the screen-day close was also under the stop and that check runs first; the effect is the same.Not verified: the cron run (the change is live from the next daily book after merge)
Problems found
Follow-ups
none
Reviewer notes
Start here:
stop_in_effect/stopped_outinkuroshio/core/book.pyReproduce:
pytest tests/test_book.py -q -k ratchet🤖 Generated with Claude Code