Skip to content

docs(ev): correct kelly_percent units (0-100, not 0.0-1.0)#207

Merged
Mlaz-code merged 1 commit into
mainfrom
fix/237-kelly-percent-docs
May 5, 2026
Merged

docs(ev): correct kelly_percent units (0-100, not 0.0-1.0)#207
Mlaz-code merged 1 commit into
mainfrom
fix/237-kelly-percent-docs

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes Issue 1 from #237: docs described kelly_percent as a fraction (0.0–1.0) but the API actually emits a percentage (0–100). Verified live: kelly_percent: 12.78, 20.54, etc.
  • Adds a safety callout in the Kelly Criterion section addressing #237's broader concern that the field is full Kelly with no quality-of-signal adjustment.

Changes

File What
content/en/api-reference/opportunities-ev.mdx Schema row + 2 example values; Kelly Criterion section rewritten (formula in 0–100 units, sizing guide rebuilt, full-Kelly safety callout added)
content/en/quickstart.mdx Example value 0.02182.18
content/en/api-reference/websocket.mdx 2 example values 0.0383.8
content/en/api-reference/stream.mdx SSE example value 0.0383.8
content/en/examples/value-betting.mdx Discord embed + Telegram template now use .toFixed(2)%
content/en/sdks/python.mdx Print formatters {:.1%} (multiplies by 100, wrong for already-percentage values) → {:.2f}%

The Python SDK formatter bug was the most subtle: {:.1%} on a value of 12.78 would render as 1278.0%. Fixed.

Issue 2 (full Kelly without quality adjustment) — deferred

#237's second concern — that publishing full Kelly is dangerous without baking in confidence_score/warnings — requires a wire-format product decision:

  • (a) keep emitting full Kelly + add kelly_percent_adjusted field
  • (b) change kelly_percent in place + add kelly_percent_raw

Both options need migration discussion. Documenting the safety note now is the minimum correct action; the wire change can land separately once direction is chosen.

Test plan

Closes #237 (Issue 1)
Refs #237 (Issue 2 — needs product decision)

🤖 Generated with Claude Code

…ly safety note

Issue 1 from #237: docs described kelly_percent as a fraction (0.0-1.0) but the
API actually emits a percentage (0-100). A consumer reading the docs literally
would interpret 34.43 as "3,443% of bankroll" or crash on values >1.0.

Fixes the schema in 6 doc pages:
- api-reference/opportunities-ev.mdx — schema row, 2 example values, Kelly
  Criterion section (formula + sizing guide rewritten in 0-100 units)
- quickstart.mdx — example value 0.0218 -> 2.18
- api-reference/websocket.mdx — 2 example values 0.038 -> 3.8
- api-reference/stream.mdx — example value 0.038 -> 3.8
- examples/value-betting.mdx — Discord embed + Telegram template now
  format as percentage with .toFixed(2)
- sdks/python.mdx — print formatters changed from {:.1%} (which
  multiplies by 100, wrong for already-percentage values) to {:.2f}%

Adds an explicit safety callout in the Kelly Criterion section explaining
that the field is full Kelly with no quality-of-signal adjustment, and
recommending fractional Kelly (1/4 or 1/2) plus 1-2% bankroll cap when
warnings is non-empty or confidence_score < 80. This addresses the
secondary concern in #237 with documentation rather than a wire change.

Issue 2 (publishing full Kelly without quality adjustment) requires a
product call on whether to:
  a) keep emitting full Kelly + add a kelly_percent_adjusted field, or
  b) change kelly_percent in place + add kelly_percent_raw

Both options affect the wire and need migration discussion. Documenting
the safety note now is the minimum correct action.

Closes #237 (Issue 1)
Refs #237 (Issue 2 — needs product decision)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.sharpapi.io Ready Ready Preview, Comment May 5, 2026 0:27am

Request Review

@Mlaz-code Mlaz-code merged commit 1b73fba into main May 5, 2026
2 checks passed
Mlaz-code added a commit that referenced this pull request May 7, 2026
…ly safety note (#207)

Issue 1 from #237: docs described kelly_percent as a fraction (0.0-1.0) but the
API actually emits a percentage (0-100). A consumer reading the docs literally
would interpret 34.43 as "3,443% of bankroll" or crash on values >1.0.

Fixes the schema in 6 doc pages:
- api-reference/opportunities-ev.mdx — schema row, 2 example values, Kelly
  Criterion section (formula + sizing guide rewritten in 0-100 units)
- quickstart.mdx — example value 0.0218 -> 2.18
- api-reference/websocket.mdx — 2 example values 0.038 -> 3.8
- api-reference/stream.mdx — example value 0.038 -> 3.8
- examples/value-betting.mdx — Discord embed + Telegram template now
  format as percentage with .toFixed(2)
- sdks/python.mdx — print formatters changed from {:.1%} (which
  multiplies by 100, wrong for already-percentage values) to {:.2f}%

Adds an explicit safety callout in the Kelly Criterion section explaining
that the field is full Kelly with no quality-of-signal adjustment, and
recommending fractional Kelly (1/4 or 1/2) plus 1-2% bankroll cap when
warnings is non-empty or confidence_score < 80. This addresses the
secondary concern in #237 with documentation rather than a wire change.

Issue 2 (publishing full Kelly without quality adjustment) requires a
product call on whether to:
  a) keep emitting full Kelly + add a kelly_percent_adjusted field, or
  b) change kelly_percent in place + add kelly_percent_raw

Both options affect the wire and need migration discussion. Documenting
the safety note now is the minimum correct action.

Closes #237 (Issue 1)
Refs #237 (Issue 2 — needs product decision)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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