Skip to content

docs(strategy): entry_technique is a recorded label, not a sizing/stop control - #231

Merged
eaitbrahim merged 1 commit into
mainfrom
docs/entry-technique-is-a-label
Aug 11, 2026
Merged

docs(strategy): entry_technique is a recorded label, not a sizing/stop control#231
eaitbrahim merged 1 commit into
mainfrom
docs/entry-technique-is-a-label

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Summary

keel/strategy/indicators_cts.py documented a risk-graded entry ladder — confirm_3bar = "smaller size, wider stop", aggressive = "larger size, tighter stop". Nothing in the codebase implements any of it.

entry_technique is computed in engine.py:144 and reaches exactly two destinations: the signals audit payload (engine.py:360) and a technique= field on an agent.enter_evaluated log line (agent.py:1166). git grep -nE "technique (==|!=|in )" -- '*.py' returns nothing outside tests. Position size and stop distance are identical whether CTS scores 2 or 12.

This PR removes the documented behaviour the code never had and rewrites the docstrings to describe what entry_technique actually is: a recorded label naming the confluence tier at signal time, kept for audit and later analysis.

Nothing changes at runtime. The diff is docstrings only:

  • low=5 / high=8 defaults: untouched
  • the three returned literals confirm_3bar / signal_candle / aggressive (persisted in the signals table): untouched, same spellings
  • DEFAULT_WEIGHTS and every call site: untouched

Wiring the ladder into sizing/stops remains possible later, but it is a live position-sizing change and needs its own evidence — backtest data showing graded sizing beats flat sizing, plus a rails review (sizing interacts with the per-order and per-day caps) — before it earns a docstring claim like the one this removes.

Closes #228

Test plan

  • uv run ruff check keel tests packages scripts — all checks passed
  • uv run pytest -q — 2444 passed, 1 skipped (matches main baseline exactly; no test count change since no behaviour changed)
  • uv run mypy — no issues found in 219 source files
  • Diff reviewed: docstrings only, zero logic change

🤖 Generated with Claude Code

…p control

indicators_cts.py documented a risk-graded entry ladder (confirm_3bar =
smaller size/wider stop, aggressive = larger size/tighter stop). Nothing
implements it: entry_technique reaches only the signals audit payload and
an agent.enter_evaluated log line, and no sizing or stop-placement code
branches on it (verified via git grep across *.py, tests excluded).
Position size and stop distance are identical whether CTS scores 2 or 12.

Rewrite the module docstring and entry_technique's docstring to describe
what the value actually is: a recorded confluence-tier label, kept for
audit and later analysis. State plainly that wiring the ladder would be a
live position-sizing change requiring backtest evidence that graded sizing
beats flat sizing, plus a rails review.

No logic changed: low=5/high=8 defaults, the returned literals
(confirm_3bar/signal_candle/aggressive -- persisted in the signals table),
DEFAULT_WEIGHTS, and every call site are untouched.

Closes #228

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@eaitbrahim eaitbrahim added the documentation Improvements or additions to documentation label Aug 11, 2026
@eaitbrahim
eaitbrahim merged commit af80788 into main Aug 11, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the docs/entry-technique-is-a-label branch August 11, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The graded entry ladder is inert — entry_technique is computed, logged, and never acted on

1 participant