Skip to content

docs: explain the dashboard's field names and the four money settings - #240

Merged
eaitbrahim merged 1 commit into
mainfrom
docs/money-settings
Aug 11, 2026
Merged

docs: explain the dashboard's field names and the four money settings#240
eaitbrahim merged 1 commit into
mainfrom
docs/money-settings

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Two documentation gaps, split along what the operator sees vs. what the operator edits.

TUI help (h overlay) — the vocabulary on screen

_equity_lines prints keel's internal field names verbatim, and nothing on the dashboard explains them:

equity_state_mode: paper
high_water_mark: 11000
drawdown: total=0 (ceiling 0.2) weekly=0 (ceiling 0.1)
rail11 (drawdown breaker): ok
paper_cash_usdc: 11000

The v overlay adds sig blk ent exi err. A screen of zeroes reads identically whether keel found no setup or found one and a rail vetoed it — the difference between an idle deployment and a correctly-declining one.

Adds a Glossary section to the existing h overlay (after "Live balance", before "Help mode"), in the existing _row/_note idiom: cycle, signal, sig / blk / ent / exi / err, paper_cash_usdc, equity_state_mode, high_water_mark / drawdown / rail11.

  • No new key binding.
  • Widest new line is 85 columns against the help's existing 88, so nothing newly clips under _paint; scrolling is unchanged (161 lines total).
  • Four new tests in the existing style, section-scoped so an assertion can't be satisfied by a word three sections away.

README — the settings in a file

Adds "How much money moves" after "Confirm vs. autonomy", covering the four settings and, crucially, how they interact.

setting the surprise
paper.starting_equity_usd ONE-TIME seed, first paper run only (agent.py, the paper_trader.get_cash() is None branch). Editing it later resizes nothing, and no command clears the persisted paper_cash_usdc.
paper.monthly_contribution_usd compounds against that small base
caps.max_exposure_usd dual role — held-at-once ceiling and the live sizing equity proxy, so risk_pct is a fraction of it, not of real equity
rail 14's monthly allowance lives in broker_subscriptions (DB, not config) — which is why it drifts out of step with the caps

The interaction is the point: sizing scales with equity (or the proxy), the rail-14 allowance is a fixed dollar figure. When they drift apart every setup is vetoed and the system looks broken while working exactly as designed. Recorded with the verified case — $11,000 equity, risk_pct: 0.01, a 3.35%-wide stop sizing to $3,284.67 against a $500/month allowance; reseeding at $500 sizes the same setup at $149.30. Plus the mechanic that makes it counter-intuitive: a tighter stop yields a LARGER position (size = risk ÷ stop-distance), which is how a 1% risk became a 30% position.

Verification

Every claim was read out of the source, not assumed. Notable precision fixes made during review: starting_equity_usd: 0 seeds from real mark-to-market equity (a value > 0 is an override, not a fallback); the sizing proxy applies to the live non-DCA ENTER path only — paper mode passes equity_override; the contribution is per UTC calendar month; and config.yaml does still supply rail 14's tier catalogue and unattested fallback, so the DB claim is scoped to the in-force allowance.

Documentation only — no behaviour, default, or config value changed. pyproject.toml untouched; nothing under docs/experiments/ touched.

$ uv run ruff check keel tests packages scripts
All checks passed!

$ uv run pytest -q
2668 passed, 1 skipped in 31.65s
SKIPPED [1] packages/keel-broker-api/keel_broker_api/conformance/suite.py:254:
  adapter serves no granularity the suite could exercise

$ uv run mypy
Success: no issues found in 221 source files

2668 = the 2664 baseline + 4 new tests; exactly the one expected skip.

🤖 Generated with Claude Code

Two gaps, split along what the operator SEES vs. what the operator EDITS.

The TUI prints keel's internal field names verbatim -- `equity_state_mode`,
`high_water_mark`, `drawdown`, `rail11`, `paper_cash_usdc`, and the activity
overlay's `sig blk ent exi err` columns -- and nothing on screen explains any of
them. A dashboard of zeroes reads identically whether keel found no setup or
found one and a rail vetoed it, which is the difference between an idle
deployment and a correctly-declining one. Add a Glossary section to the `h`
overlay, in the existing `_row`/`_note` idiom, defining each term and making the
`sig 0` vs. `sig 1 blk 1` distinction explicit. No new key binding; the widest
new line is 85 columns against the help's existing 88, so nothing newly clips
under `_paint`.

The README documents the rails but not the four settings that decide how much
money actually moves, nor how they interact. Add "How much money moves":

- `paper.starting_equity_usd` is a ONE-TIME seed applied on the first paper run
  only (`agent.py`, the `get_cash() is None` branch). Editing it later resizes
  nothing, and no command clears the persisted `paper_cash_usdc`.
- `paper.monthly_contribution_usd` compounds against that small base.
- `caps.max_exposure_usd` is both the held-at-once ceiling AND the live sizing
  equity proxy, so `risk_pct` is a fraction of it rather than of real equity.
- rail 14's allowance lives in `broker_subscriptions`, not config -- which is
  why it drifts out of step with the caps.

Sizing scales with equity; the rail-14 allowance is a fixed dollar figure. When
they drift apart every setup is vetoed and the system looks broken while working
as designed -- recorded with the verified $11,000/$3,284.67-vs-$500 case, and
with the mechanic that makes it counter-intuitive: a tighter stop yields a
LARGER position, so a 1% risk became a 30% position.

Documentation only -- no behaviour, default or config value changes.

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 0909d8d into main Aug 11, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the docs/money-settings branch August 13, 2026 16:54
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.

1 participant