Skip to content

feat(cli): /records shows daily equity, fills and realized P&L - #651

Merged
iAmGiG merged 1 commit into
developmentfrom
feat/cli-records-602
Nov 1, 2026
Merged

iAmGiG merged 1 commit into
developmentfrom
feat/cli-records-602

Conversation

@iAmGiG

@iAmGiG iAmGiG commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Closes #602.

Every routine writes account_daily, position_daily and fills to state/user.db, but nothing in the CLI read them.

The change

/records [days|all], defaulting to the last 10 recorded days:

  • Equity by day, with day P&L.
  • The fills in that period.
  • Their realized P&L at average cost, with a total.

It reads DailyRecords and makes no broker calls, so it works offline and shows the state as of the last routine. A sale with no known cost basis says so rather than guessing: on the real records, /records all lists 33 such sales from before records began, and keeps them out of the total.

It isn't a FunctionTool, because #331 hasn't settled that layer.

Testing

  • New tests/unit/cli/test_records_command.py, on real records in a temp state dir: the QQQ stop-out's fill and +$237.60, date limits, unknown cost basis, bad arguments, no network, and no records changed.
  • Run against a copy of the real records, the output matches the 10-30 report.
  • pytest tests/ -m "not db": 1879 passed, 2 skipped.

Every routine writes these to state/user.db, but nothing in the CLI read them. The
command reads DailyRecords and makes no broker calls, so it works offline and shows the
state as of the last routine. A sale with no known cost basis says so.

Closes #602

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iAmGiG iAmGiG added enhancement New feature or request Reporting Report generation and statistics component:cli CLI/terminal interface and REPL features labels Nov 1, 2026
@iAmGiG
iAmGiG merged commit e02fde7 into development Nov 1, 2026
7 checks passed
@iAmGiG
iAmGiG deleted the feat/cli-records-602 branch November 4, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:cli CLI/terminal interface and REPL features enhancement New feature or request Reporting Report generation and statistics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI view of the daily records (equity, fills, realized P&L)

1 participant